Skip to main content

Bot Open API (1.0.0)

Download OpenAPI specification:Download

Login

Return auth token for use open api

Request Body schema: application/json
required
appId
string
appSecret
string

Responses

Request samples

Content type
application/json
{
  • "appId": "string",
  • "appSecret": "string"
}

Response samples

Content type
application/json
{
  • "authToken": "string",
  • "expireAt": "string"
}

Bot

Returns a bot usage data.

This endpoint allows you to retrieve bot usage data

Authorizations:
ApiKeyAuth
query Parameters
monthDate
string
Example: monthDate=2021-08-01

specify month of retrieval data

channelId
integer

specify channelId

Responses

Response samples

Content type
application/json
{
  • "totalMessages": 0,
  • "totalUsers": 0
}

User

Returns a list of users.

Authorizations:
ApiKeyAuth
query Parameters
page
integer > 1

return requested page

limit
integer > 25

return number of users

Request Body schema: application/json
required
channelIds
Array of integers unique
Items Enum: 1010 1014 1016 1017

Each channel have unique code.

{ 1010: 'webchat', 1014: 'whatsapp', 1016: 'telegram', 1017: 'facebook'}

startDate
string

Date must be ISO format string in UTC.

endDate
string

Date must be ISO format string in UTC.

Responses

Request samples

Content type
application/json
{
  • "channelIds": [
    ],
  • "startDate": "2021-10-01T00:00:00.000Z",
  • "endDate": "2021-10-02T00:00:00.000Z"
}

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "page": 0,
  • "pages": 0,
  • "total": 0,
  • "limit": 0,
  • "hasNextPage": 0
}

Returns specific user data.

Authorizations:
ApiKeyAuth
path Parameters
botUserId
required
string

bot user unique id

Responses

Response samples

Content type
application/json
{
  • "customFields": {
    },
  • "tags": [
    ]
}

Transcript

Returns a list of transcripts & bot user custom fields.

Authorizations:
ApiKeyAuth
query Parameters
page
integer >= 1
Default: 1

number of page to be returned

limit
integer [ 25 .. 1000 ]
Default: 50

number of records to be returned per page

Request Body schema: application/json
required
botUserId
string

Unique bot user identifier according to channel. For 'whatsapp' channel it should be the phone number of bot user

channelId
integer
Enum: 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021

Each channel has a unique code.

{ 1010: 'webchat', 1011: 'workflow', 1012: 'googleBusinessMessages', 1013: 'general', 1014: 'whatsapp', 1015: 'RCSBusinessMessages', 1016: 'telegram', 1017: 'facebook', 1018: 'sms', 1019: 'hangoutsChat', 1020: 'google', 1021: 'instagramMessaging' }

startDate
string

Date must be ISO format string in UTC & must not be older than 3 months from current date. If no startDate is provided data of last 3 months will be returned

endDate
string

Date must be ISO format string in UTC. If no endDate is provided data upto current date & time is returned

Responses

Request samples

Content type
application/json
{
  • "botUserId": "+919876543210",
  • "channelId": 1014,
  • "startDate": "2021-10-02T00:00:00.000Z",
  • "endDate": "2021-10-03T00:00:00.000Z"
}

Response samples

Content type
application/json
{
  • "botUser": {
    },
  • "transcripts": [
    ],
  • "paginationDetails": {
    }
}