Engati - User Guide
...
Building Your Bot
Configuring Integrations

Engati APIs

7min

The Engati APIs allow you to integrate with the platform and create useful functionality around the platform.

The APIs are REST-based using JSON as the standard response type. You can now import the cURL as well.

Authentication

The Engati APIs follow basic authentication utilizing API Keys to authenticate the API calls. The API Keys can be generated by going to the Integration > Engati APIs Settings and creating an app. The API Keys can be revoked or regenerated at any point of time. Revoked or older keys would throw authentication errors for the API calls made using them. The API Keys need to be added to the Authorization header as follows –

“Authorization”: “Basic <API Key>”

API Endpoints

Following is the list of API endpoints currently supported along with their parameters and sample responses. Customer identifier and bot key details required for the APIs can also be accessed from the Developer Settings section on the portal.

Navigate to Integration > Engati API.

Document image


Base URL for the APIs – https://api.engati.com/

Get matching users

This API will return the list of users matching the set of attribute values as specified.

Document image

Sample Curl command
Sample Curl command


Required Parameters

List of required parameters for this API call are:

Parameter

Description

Type

attribute_name

The name of the attribute associated with the user

String

attribute_value

The value of the attribute associated with the user

String







Error codes

Some of the error codes you might get while making the API call are:

Error Codes

Description

401

Unauthorized

403

Forbidden

404

Not Found

500

Server-side API failure

Retrieve chat history for a user

This API will return the messages exchanged between the bot and the user, based on the parameters specified.

Using the user id present on the frontend.
Using the user id present on the frontend.

/bot-api/v1.0/customer/{customerId}/bot/{botKey}/channel-user/{channeluserId}/conversations
Sample Curl command
Sample Curl command


Required Parameters

Parameters you can pass to filter the API response are:

Parameter

Description

Type

userId [Path parameter]

The user identifier. Retrieved from users list API

String

start_date [Optional]

Start Date (UTC time in milliseconds), If blank, all records will be considered.

long

end_date [Optional]

End Date (UTC time in milliseconds), If blank, the current UTC time will be considered.

long

page_number [Optional]

The number of pages for which the data should be displayed. By default, the first page will be shown.

integer

Page_size [Optional]

Total number of records to be shown in the API call, the default value is set to 500

integer

Error codes

Some of the error codes you might get while making the API call.

Error Codes

Description

400

Error Code: 1002,

Error Message: INVALID_BOT_OR_CUSTOMER_ID,

Error Details: The bot id/customer id/user id provided is invalid Error Code: 1003, Error Message: INVALID_INPUT_DATE_VALUE, Error Details: The start_date and end_date values are the time in milliseconds and the end_date should be greater than start_date. Error Code: 1004, Error Message: INVALID_PAGE_NUMBER, Error Details: Please enter the correct page number. The page number in the API is a positive integer value starting with 1.

401

Unauthorized

403

Forbidden

500

Server-side API failure

If you face any issues or queries please reach out to us at support@engati.com.

Updated 03 Apr 2024
Doc contributor
Did this page help you?
Yes
No