Convrs API

The Convrs API is a simple, secure JSON API that allows you to interact with the Convrs platform.

As Convrs is event driven, real time events can be delivered by Websockets or via a Webhook that resides on your servers.

To request information from the Convrs API, you can use the same websocket connection, or if using webhooks you can perform JSON POST requests to the API.

Enabling the Convrs API

How to enable and configure API access for your organization.

Enable API Access

Enable the Convrs API for your organization.

Note
If the Convrs API menu item is missing, contact Convrs Support to enable this service for your account.

Steps:

  1. Log onto the Convrs Dashboard and navigate to the Integrations menu.
  2. Click on Convrs API.
  3. Click on Enable API.

Result: A token will be generated that you need to access the API. This token must be kept secure and is issued for your organization only.

Reset Token

Reset your API token if it has been compromised.

Steps:

  1. Navigate to Integrations > Convrs API.
  2. Click on Reset Token.

Result: A new token will be issued, and the old token will no longer work.

Configure Webhook

Set up a webhook URL to receive real-time events.

Steps:

  1. Navigate to Integrations > Convrs API.
  2. Enter your webhook URL in the Webhook URL field.
  3. Click Update Webhook.

Disable API

Remove API access for your organization.

Steps:

  1. Navigate to Integrations > Convrs API.
  2. Click on Disable API.

Result: Your API access will be removed.

Connecting to the API

How to connect to the Convrs API endpoint.

API Endpoint

The endpoint URLs for both websockets and POST requests can be found in the app.

Note
Only secure requests are supported (HTTPS/WSS).

Steps:

  1. Navigate to Integrations > Convrs API.
  2. The API Endpoints table displays the HTTPS and WSS URLs for your environment.

JSON Objects

Understanding the structure of JSON objects used in the API.

Response Format

The standard format for API responses.

Note
All datetimes are in UTC using ISO 8601 format (e.g., "2020-04-18T16:15:24").
FieldTypeDescription
cmdstringThe name of the command/event (case sensitive)
okinteger1 if successful, 0 if an error occurred
dataobject/arrayObject or array containing the response data
uidstringUnique identifier of the user (optional)
errorstringHuman-readable error message (when ok=0)
errorCodeintegerNumeric error code (when ok=0)

Success response example:

{
  "cmd": "GetUser",
  "ok": 1,
  "data": {
    "uid": "73-tel-615940546",
    "name": "Billy Bob",
    "email": "billy@example.com"
  }
}

Error response example:

{
  "cmd": "GetUser",
  "ok": 0,
  "error": "unknown user",
  "errorCode": 1005
}

User Object Fields

Fields returned in user objects from GetUser, GetUsers, and events.

Note
If the same person engages two separate bots, they will have two separate uid values.
FieldTypeDescription
uidstringUnique identifier for the user (e.g., "73-tel-615940546")
namestringFull name reported by the messaging platform
first_namestringUser's first name
last_namestringUser's last name
emailstringUser's email address (may be empty)
phonestringUser's phone number (may be empty)
botstringSource messaging platform (Telegram, Messenger, Web, Line, Viber, CMS, WA3)
botIDintegerNumeric code of the bot
langstringUser's natural language code (e.g., "en")
createdstringISO 8601 datetime when user was created
notesstringNotes associated with the user
urlstringUnique URL to chat with this user (safe for CRM display)

Using Websockets

How to connect and communicate using websockets.

Connect via Websocket

Authenticate your websocket connection.

Note
Only 1 active websocket per organization is allowed. You do not need to add the token for each subsequent command.

Steps:

  1. Connect to the WSS endpoint shown on the Integrations > Convrs API screen.
  2. Send the connect command with your token.

Request:

{
  "cmd": "connect",
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7"
}

Response:

{
  "cmd": "connected",
  "ok": 1
}

Heartbeat

Keep your websocket connection alive.

Request:

{
  "cmd": "heartbeat"
}

Response:

{
  "ok": 1,
  "cmd": "heartbeat",
  "data": {
    "datetime": "2020-04-29T14:34:34.376Z"
  }
}

Tips
  • Send heartbeat periodically (e.g., once per minute) to maintain the connection

Using Webhooks and POST Requests

How to receive events and send commands via HTTP.

Receiving Events via Webhook

Configure a webhook to receive real-time events.

Note
Webhook calls are made with Content-Type: application/json.

Steps:

  1. Set your webhook URL in the Convrs Dashboard under Integrations > Convrs API.
  2. Convrs will POST a JSON object to your webhook URL on new events.
  3. Your response should be any valid HTTP response (200 OK recommended).

Sending Commands via POST

Send commands to the API via HTTP POST.

Steps:

  1. Create a JSON object including the token, cmd, and any required parameters.
  2. POST to the HTTPS endpoint shown on the Integrations > Convrs API screen.
  3. Set the Content-Type header to application/json

Example POST request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetUser",
  "uid": "73-tel-615940546"
}

Available Events

Events delivered to active websocket connections or webhooks. Events are sent automatically when user data changes.

onUserCreate

Sent when a new user is created within the Convrs system.

Payload:

{
  "cmd": "onUserCreate",
  "ok": 1,
  "data": {
    "uid": "73-tel-615940546",
    "name": "Billy Bob",
    "first_name": "Billy",
    "last_name": "Bob",
    "bot": "Telegram",
    "botID": 73,
    "lang": "en",
    "created": "2020-04-23T16:15:24.000Z",
    "notes": "",
    "email": "",
    "phone": "",
    "url": "https://app.conv.rs/u/abc123"
  }
}

Note
Email and phone are typically blank on creation and arrive via onUserUpdate as the user interacts with the bot.

onUserUpdate

Sent when a user object is updated. Contains both the full user object and the specific fields that changed.

Payload:

{
  "cmd": "onUserUpdate",
  "ok": 1,
  "data": {
    "user": {
      "uid": "73-tel-615940546",
      "name": "Billy Bob",
      "first_name": "Billy",
      "last_name": "Bob",
      "bot": "Telegram",
      "botID": 73,
      "lang": "en",
      "created": "2020-04-23T16:15:24.000Z",
      "notes": "",
      "email": "billy@example.com",
      "phone": "+44 7912 031410",
      "url": "https://app.conv.rs/u/abc123"
    },
    "update": {
      "email": "billy@example.com"
    }
  }
}

FieldDescription
data.userThe complete user object after the update
data.updateObject containing only the fields that were updated and their new values

onUserDelete

Sent when a user is deleted from the Convrs database.

Payload:

{
  "cmd": "onUserDelete",
  "ok": 1,
  "uid": "73-tel-615940546"
}

Note
Users are only deleted when a bot is deleted or manually deleted within the platform (e.g., GDPR request).

onUserDisable

Sent when a user has been disabled (e.g., blocked the bot on their messaging platform).

Payload:

{
  "cmd": "onUserDisable",
  "ok": 1,
  "uid": "73-tel-615940546"
}

Note
No more messages will be sent to disabled users.

onUserEnable

Sent when a previously disabled user starts engaging with the bot again.

Payload:

{
  "cmd": "onUserEnable",
  "ok": 1,
  "uid": "73-tel-615940546"
}

onUserConversation

Sent when a conversation between a user and agent has been closed.

Payload:

{
  "cmd": "onUserConversation",
  "ok": 1,
  "uid": "73-tel-615940546",
  "data": [
    {
      "uid": "73-tel-615940546",
      "mid": "5fd89d8f15cf735bd7aaaee0",
      "msg": "Hello, I need help",
      "typ": "text",
      "sender": "client",
      "dt": "2020-12-15T10:30:00.000Z",
      "agent": "John Smith",
      "bot": "Telegram"
    },
    {
      "uid": "73-tel-615940546",
      "mid": "5fd89d9015cf735bd7aaaee1",
      "msg": "Hi! How can I assist you today?",
      "typ": "text",
      "sender": "agent",
      "dt": "2020-12-15T10:30:15.000Z",
      "agent": "John Smith",
      "bot": "Telegram"
    }
  ]
}

FieldDescription
dataArray of message objects from the conversation
data[].midUnique message identifier
data[].msgMessage text content
data[].typMessage type: "text", "image", "note", "transfer", "system"
data[].senderWho sent the message: "client", "agent", or "system"
data[].dtISO 8601 datetime when message was sent

Commands - User Data

Commands for retrieving and updating user information.

GetUser

Retrieve a single user by their uid.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"GetUser"
uidYesstringThe user's unique identifier

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetUser",
  "uid": "73-tel-615940546"
}

Response:

{
  "ok": 1,
  "cmd": "GetUser",
  "data": {
    "uid": "73-tel-615940546",
    "name": "Billy Bob",
    "first_name": "Billy",
    "last_name": "Bob",
    "bot": "Telegram",
    "botID": 73,
    "lang": "en",
    "created": "2020-04-28T17:48:15.000Z",
    "notes": "",
    "email": "",
    "phone": "",
    "url": "https://app.conv.rs/u/abc123"
  }
}

GetUsers

Retrieve multiple users. Returns up to 5000 users maximum.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"GetUsers"
botIDNointegerFilter by bot ID
CreatedDateNostringFilter users created after this date (ISO 8601)

Request - All users:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetUsers"
}

Request - Filtered by date and bot:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetUsers",
  "botID": 73,
  "CreatedDate": "2020-03-01T00:00:00"
}

Response:

{
  "ok": 1,
  "cmd": "GetUsers",
  "data": [
    { "uid": "73-tel-615940546", "name": "Billy Bob", ... },
    { "uid": "73-tel-615940547", "name": "Jane Doe", ... }
  ]
}

SetUserData

Set custom user data associated with a user. Optionally trigger a flow route after setting data.

Note
By default, data is merged at the top level (existing keys preserved). Set overwrite=1 to replace completely.
FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SetUserData"
uidYesstringThe user's unique identifier
dataYesobjectObject containing the user data to set
routeNostringFlow route to trigger after setting data
overwriteNointegerSet to 1 to replace all data instead of merging (default: 0)

Request - Merge data:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserData",
  "uid": "73-tel-615940546",
  "data": {
    "customerId": "CUST-12345",
    "accountType": "premium"
  }
}

Request - Overwrite and trigger flow:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserData",
  "uid": "73-tel-615940546",
  "data": { "status": "verified" },
  "route": "welcome_verified",
  "overwrite": 1
}

Response:

{
  "ok": 1,
  "cmd": "SetUserData"
}

SetUserName

Set the name of a user. Automatically splits into first_name and last_name.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SetUserName"
uidYesstringThe user's unique identifier
nameYesstringThe new name (3-50 characters)

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserName",
  "uid": "73-tel-615940546",
  "name": "John Doe"
}

Response:

{
  "ok": 1,
  "cmd": "SetUserName"
}

SetUserEmail

Set the email of a user.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SetUserEmail"
uidYesstringThe user's unique identifier
emailYesstringA valid email address

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserEmail",
  "uid": "73-tel-615940546",
  "email": "john@example.com"
}

Response:

{
  "ok": 1,
  "cmd": "SetUserEmail"
}

SetUserNotes

Set notes for a user.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SetUserNotes"
uidYesstringThe user's unique identifier
notesYesstringNotes text (max 1024 characters)

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserNotes",
  "uid": "73-tel-615940546",
  "notes": "VIP customer. Preferred contact: morning hours."
}

Response:

{
  "ok": 1,
  "cmd": "SetUserNotes"
}

SetUserPhone

Set the phone number of a user.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SetUserPhone"
uidYesstringThe user's unique identifier
phoneYesstringInternational phone number (must be valid)

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserPhone",
  "uid": "73-tel-615940546",
  "phone": "+441511234567"
}

Response:

{
  "ok": 1,
  "cmd": "SetUserPhone"
}

Commands - User Tags

Commands for managing user tags.

GetUserTags

Retrieve all tags for a user.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"GetUserTags"
uidYesstringThe user's unique identifier

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetUserTags",
  "uid": "73-tel-615940546"
}

Response:

{
  "ok": 1,
  "cmd": "GetUserTags",
  "data": ["customer", "vip", "newsletter"]
}

SetUserTag

Add a tag to a user. The tag must already exist in the system.

Note
All tags are case insensitive and converted to lowercase.
FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SetUserTag"
uidYesstringThe user's unique identifier
tagYesstringThe tag name (3-50 characters)

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SetUserTag",
  "uid": "73-tel-615940546",
  "tag": "Customer"
}

Response:

{
  "ok": 1,
  "cmd": "SetUserTag"
}

DeleteUserTag

Remove a tag from a user.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"DeleteUserTag"
uidYesstringThe user's unique identifier
tagYesstringThe tag name to remove

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "DeleteUserTag",
  "uid": "73-tel-615940546",
  "tag": "Customer"
}

Response:

{
  "ok": 1,
  "cmd": "DeleteUserTag"
}

CreateUserTag

Create a new tag in the system.

Note
Returns data: 1 if tag was created, data: 0 if tag already exists.
FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"CreateUserTag"
tagYesstringThe tag name (3-50 characters)
colorNostringHex color code (e.g., "#FF5733")
descriptionNostringTag description (max 100 characters)

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "CreateUserTag",
  "tag": "Premium",
  "color": "#FFD700",
  "description": "Premium subscription customers"
}

Response:

{
  "ok": 1,
  "cmd": "CreateUserTag",
  "data": 1
}

Commands - Conversations

Commands for retrieving conversation history.

GetConversation

Retrieve all chat messages for a specific user.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"GetConversation"
uidYesstringThe user's unique identifier

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetConversation",
  "uid": "73-tel-615940546"
}

Response:

{
  "ok": 1,
  "cmd": "GetConversation",
  "data": [
    {
      "uid": "73-tel-615940546",
      "email": "billy@example.com",
      "name": "Billy Bob",
      "phone": "+447912031410",
      "url": "https://app.conv.rs/u/abc123",
      "aid": 42,
      "agent": "John Smith",
      "agentemail": "john@company.com",
      "mid": "5fd89d8f15cf735bd7aaaee0",
      "msg": "Hello, I need help with my order",
      "typ": "text",
      "sender": "client",
      "dt": "2020-12-15T10:30:00.000Z",
      "bot": "Telegram"
    }
  ]
}

GetConversationsFlat

Retrieve completed conversations between agents and users. Supports polling and date range queries. Limited to 1000 conversations.

Note
When called with no date parameters, the API remembers the state of the last call for polling.
Response FieldDescription
cidConversation ID (unique per conversation)
uidUser identifier
midMessage identifier
typMessage type: "text", "image", "transfer", "note", "system"
sender"client", "agent", or "system"
botChannel: Messenger, Web, Line, Viber, Telegram, CMS (SMS), WA3 (WhatsApp)

GetOpenConversations

Retrieve currently open conversations between agents and users.

Response FieldDescription
idConversation ID
uidUser identifier
aidAgent ID
agentAgent name
bidBot ID
sdtStart datetime
acoAgent message count
ucoUser message count

Understanding WhatsApp Message Templates

WhatsApp message templates are pre-approved message formats required for sending business-initiated messages outside the 24-hour conversation window. Understanding how templates work and following best practices is essential to maintaining your messaging capabilities and avoiding account restrictions.

What Are WhatsApp Templates?

Understanding the WhatsApp template messaging system.

When a user messages your business on WhatsApp, a 24-hour "conversation window" opens during which you can send free-form messages. However, to initiate contact with a user outside this window—such as sending appointment reminders, shipping notifications, or marketing messages—you must use a pre-approved template.

Templates are submitted through Meta Business Manager and reviewed before use. Approval is typically immediate for verified businesses but may take up to 24 hours.

Template Categories
  • Utility templates - Transactional messages like order confirmations, shipping updates, appointment reminders
  • Authentication templates - One-time passwords and verification codes
  • Marketing templates - Promotional content, offers, and re-engagement messages (requires explicit opt-in)

Template Quality Rating

How Meta monitors and rates your template performance.

Meta assigns a quality rating to each template based on user feedback over the past seven days. Ratings are:

  • High - Template is performing well with good engagement
  • Medium - Some negative signals detected; monitor closely
  • Low - Significant user complaints; template may be paused

Quality signals include user blocks, reports, read rates, and feedback reasons. Templates with consistently low ratings will be automatically paused or permanently disabled.

Template Pausing

If a template receives excessive negative feedback:

  • First pause: 3 hours
  • Second pause: 6 hours
  • Third occurrence: Permanently disabled

If quality improves to Medium or High for 7 consecutive days, the template returns to Active status.

Best Practices to Avoid Account Restrictions

Guidelines to maintain your WhatsApp messaging capabilities.

1. Always obtain opt-in consent

Sending messages without user consent is the primary cause of account restrictions. Users must explicitly agree to receive WhatsApp messages from your business before you contact them.

2. Personalize your messages

Avoid generic, impersonal templates. Use placeholders to include the recipient's name and relevant details. Personalized messages receive better engagement and fewer complaints.

3. Provide value, not spam

Send messages that users actually want to receive. Limit message frequency and ensure each message provides clear value. Businesses with strong engagement typically maintain read rates of 65-80%.

4. Include opt-out options

Always provide a clear way for users to stop receiving messages. This is especially important for marketing templates.

5. Follow template formatting guidelines

  • Avoid excessive variable placeholders relative to message length
  • Don't use adjacent placeholders like {{1}} {{2}}
  • Don't include emojis, markup, or newline characters in headers/footers
  • Keep messages concise and clear

6. Monitor your quality rating

Regularly check your template quality ratings in Meta Business Manager. Address any templates showing Medium or Low ratings before they get paused.

Account Ban Triggers

The following violations can result in immediate account suspension:

  • Promoting prohibited goods/services (adult content, gambling, firearms, unapproved financial services)
  • Sharing misinformation, scams, or misleading claims
  • Bulk messaging to users who haven't opted in
  • Misleading business verification information

Official WhatsApp Resources

Links to WhatsApp's official documentation and policies.

Commands - Sending Messages

Commands for sending messages via the API.

Throttling Limits
  • Only 1 message can be sent to a mobile number per second
  • Only 10 messages can be sent per second per token

Contact Support if you need these limits adjusted for your use case.

SendWhatsAppTemplate

Send a WhatsApp template message. Templates must be pre-approved by WhatsApp.

Warning
Send WhatsApp templates during business hours for the user's local time to avoid being reported as spam.
FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SendWhatsAppTemplate"
botIDYesintegerThe Convrs WhatsApp bot identifier
phoneYesstringInternational mobile phone number
templateNameYesstringThe WhatsApp template name
languageYesstringThe template language code (e.g., "en")
parametersNoarrayArray of template parameters for dynamic content
headerNoobjectHeader parameters (for templates with headers)
agentEmailNostringEmail of agent to assign the chat to
webhookURLNostringURL to receive delivery status updates
webhookPayloadNoobjectCustom object to include in webhook callbacks
webhookHeadersNoarrayArray of headers for webhook callbacks

Request - Simple template:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SendWhatsAppTemplate",
  "botID": 3941,
  "phone": "+44151999999",
  "language": "en",
  "templateName": "followup_inquiry_request"
}

Request - Template with parameters:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SendWhatsAppTemplate",
  "botID": 3941,
  "phone": "+44151999999",
  "language": "en",
  "templateName": "order_confirmation",
  "parameters": [
    { "type": "text", "text": "David" },
    { "type": "text", "text": "ORD-12345" }
  ]
}

Request - With webhook for delivery tracking:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SendWhatsAppTemplate",
  "botID": 3941,
  "phone": "+44151999999",
  "language": "en",
  "templateName": "order_update",
  "webhookURL": "https://yourserver.com/whatsapp-callback",
  "webhookPayload": { "orderId": "ORD-12345" }
}

Success Response:

{
  "ok": 1,
  "cmd": "SendWhatsAppTemplate",
  "phoneNumber": "+44151999999",
  "countryIso2": "GB",
  "uid": "3941-wa3-44151999999",
  "mid": "6462d3d8c8b0b08fddc34ca8"
}

Error Response:

{
  "ok": 0,
  "cmd": "SendWhatsAppTemplate",
  "error": "WhatsApp error",
  "errorCode": 3002,
  "whatsappErrorCode": 131047,
  "whatsappErrorDesc": "Re-engagement message"
}

GetWhatsAppTemplate

Retrieve a cached WhatsApp template to inspect its structure.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"GetWhatsAppTemplate"
botIDYesintegerThe Convrs bot identifier
templateNameYesstringThe WhatsApp template name
languageYesstringThe template language code

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetWhatsAppTemplate",
  "botID": 3941,
  "language": "en",
  "templateName": "followup_inquiry_request"
}

Response:

{
  "ok": 1,
  "cmd": "GetWhatsAppTemplate",
  "template": {
    "name": "followup_inquiry_request",
    "language": "en",
    "status": "APPROVED",
    "components": [...]
  }
}

SendSMSMessage

Send an SMS message to a mobile phone number.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SendSMSMessage"
botIDYesintegerThe Convrs SMS bot identifier
phoneYesstringInternational mobile phone number
messageYesstringThe text message to send
agentEmailNostringEmail of agent to assign the chat to

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SendSMSMessage",
  "botID": 3941,
  "phone": "+44151999999",
  "message": "Hello! Your order has been shipped."
}

Response:

{
  "ok": 1,
  "cmd": "SendSMSMessage",
  "phoneNumber": "+44151999999",
  "countryIso2": "GB",
  "uid": "3941-cms-44151999999",
  "mid": "9462d3d8c8b0b48fddc34ca8"
}

SendTextMessage

Send a text message to a specific Convrs user (by uid).

Note
Currently supports Telegram channel. Contact support for other channels.
FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SendTextMessage"
uidYesstringThe Convrs user ID
messageYesstringMessage text (max 2000 characters, UTF-8)

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SendTextMessage",
  "uid": "73-tel-615940546",
  "message": "Thank you for your inquiry!"
}

Response:

{
  "ok": 1,
  "cmd": "SendTextMessage"
}

SendMessage

Send a message with server-side routing logic. Routes are configured on the server.

Note
Contact Convrs support for information on configuring server-side routing logic.
FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"SendMessage"
phoneYesstringMobile phone number
routeYesstringName of the route for message processing (max 256 chars)
messageNostringMessage text (max 2000 characters, UTF-8)
userdataNoobjectAdditional user data for the route

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "SendMessage",
  "phone": "44-792-202-1411",
  "route": "welcome",
  "message": "Welcome to our service!"
}

Response:

{
  "ok": 1,
  "cmd": "SendMessage",
  "mid": "5fd89d8f15cf735bd7aaaee0"
}

GetMessageDetails

Retrieve delivery status information about a sent message.

FieldRequiredTypeDescription
tokenYesstringYour API token
cmdYesstring"GetMessageDetails"
midYesstringThe message ID from SendSMSMessage or SendWhatsAppTemplate

Request:

{
  "token": "2730b3490cf32a1c16ac8b91e034aa9f073996f7",
  "cmd": "GetMessageDetails",
  "mid": "6462d3d8c8b0b08fddc34ca8"
}

Response:

{
  "ok": 1,
  "cmd": "GetMessageDetails",
  "uid": "3941-wa3-44151999999",
  "botID": 3941,
  "ack": 3
}

Commands - Reports

Extract report data from the Convrs platform via the API. Report queries return the same data used by the Convrs dashboard reports, delivered as JSON.

Report Command

Request report data by specifying a report ID, date range, and optional filters.

Response FieldDescription
subcmdThe report ID that was requested
reportSchema metadata describing the report structure
report.idReport identifier
report.nameHuman-readable report name
report.descriptionReport description
report.dataTypeData structure type (e.g. SIMPLE_TABLE, DISTRIBUTION, TIME_SERIES_SINGLE)
report.fieldsArray of field definitions describing each column in the data
dataArray of report data objects

Date Range and Filters

Requirements for date range and optional filter parameters.

  • Both from and to must be provided in ISO 8601 format (UTC).
  • The maximum date range is 90 days. Requests exceeding this will return error code 4003.
  • from must be before to (error code 1021 if reversed).
  • Optional filters are report-dependent — not all reports support all filters. Unsupported filters are ignored.

Note
All dates and times are in UTC.

Rate Limits and Timeouts

Rate limits and timeout behaviour for report queries.

Report Rate Limits
  • 10 requests per 60 seconds per API token (error code 4004 when exceeded)
  • This is in addition to the standard API rate limit
  • Report queries have a 60 second timeout (error code 2003 on timeout)

Response Data Formats

How to interpret field values in the report data.

Each field in the report.fields array includes a type property that describes how to interpret the corresponding values in the data array:

Field TypeValue FormatExample
numberInteger1234
durationMilliseconds330000 (5 minutes 30 seconds)
percentDecimal percentage45.5
decimalNumber with decimal3.7
dateISO 8601 date string"2026-03-15"
datetimeISO 8601 datetime string"2026-03-15T14:30:00Z"
textPlain string"Sales Team"
categoryCategory string"Customer Service"
idRaw identifier12345
agentNumeric agent ID42
botBot name (resolved)"WhatsApp Support"
countryISO 3166-1 alpha-2 code"SG"
hourHour of day (0-23)14
Note

Most lookup fields (such as agent and country) return raw identifiers. Your application should resolve these to display names as needed. The bot field is an exception — bot names are resolved server-side.

Available Reports

The following reports are available via the API. Use the Report ID as the subcmd value.

Report IDNameDescription
Volume
chatsByHourHourly DistributionConversation volume across hours of the day
chatsByDayDaily VolumeConversation volume trend over the date range
chatsByBotChats by ChannelChat volume grouped by bot/channel
channelVolumeSummaryChannel Volume SummaryVolume, response times, and message totals by channel type
chatsByBotByDayChats by Channel by DayDaily chat volume trend per channel
serviceLevelService LevelService level metrics including answered and missed chats
closureReasonsClosure ReasonsDistribution of how conversations end
queueTimeDistributionQueue Wait Time DistributionCustomer wait times grouped into time buckets
inboundVsOutboundInbound vs OutboundConversation direction split over time
durationDistributionDuration DistributionConversation length distribution
dayOfWeekPatternsDay of Week PatternsVolume and metrics by day of week
peakHoursPeak Hours AnalysisIdentifies busiest hours with peak indicators
firstResponseDistributionFirst Response Time DistributionAgent response times in buckets
repeatContactAnalysisRepeat Contact AnalysisUsers with multiple contacts (FCR approximation)
chatsByCountryChats by CountryConversation volume by customer country
chatsByCountryByDayChats by Country by DayDaily conversation trends by country
serviceLevelByCountryService Level by CountryService quality metrics by customer country
Agent
chatsByAgentChats by AgentChat volume and performance metrics by agent
chatsByAgentByDayChats by Agent by DayDaily chat volume trend per agent
chatsByAgentByDayByBUChats by Agent by Day by BUDaily chat volume per agent for a specific Business Unit
chatsByAgentByChannelChats by Agent by ChannelAgent performance metrics with channel breakdown
chatsByAgentByBUChats by Agent by BUAgent performance for a specific Business Unit
chatsByBUChats by Business UnitAgent performance across all Business Units
agentAvailabilityAgent AvailabilityAgent status change history over the date range
transferRateTransfer Rate AnalysisPercentage of conversations transferred by agent
messageCountAnalysisMessage Count AnalysisAverage messages per conversation by agent
agentWorkloadBalanceAgent Workload BalanceChat distribution and workload balance across agents
Users
usersCreatedUsers CreatedNew user registrations by bot/channel
usersCreatedWhoChatUsers Created Who ChatNew users split by whether they were assigned to an agent
usersCreatedByCountryUsers Created by CountryNew user registrations by country
WhatsApp
whatsAppTemplateUsageWhatsApp Template UsageUsage statistics for WhatsApp message templates
campaignsCampaign PerformanceWhatsApp campaign delivery metrics and performance
templateDeliveryFunnelTemplate Delivery FunnelTemplate message delivery progression
templatePerformanceTemplate PerformanceCompare template effectiveness across key metrics
whatsAppQualityDashboardWhatsApp Quality DashboardChannel quality ratings and messaging limits
templateLanguageEffectivenessTemplate Language EffectivenessPerformance comparison across template languages
templateOptimalTimingTemplate Optimal TimingBest times to send templates for maximum replies
AI
csatDistributionCSAT Score DistributionDistribution of AI-predicted customer satisfaction scores
sentimentDistributionSentiment DistributionDistribution of conversation sentiments
emotionDistributionEmotion DistributionDistribution of detected customer emotions
categoryVolumeCategory VolumeConversation volume by AI-detected topic category
sentimentByHourSentiment by HourCustomer sentiment patterns by hour of day
csatByAgentCSAT by AgentCustomer satisfaction scores by agent
csatByChannelCSAT by ChannelCustomer satisfaction across channels
csatByBUCSAT by Business UnitCustomer satisfaction across business units
sentimentByAgentSentiment by AgentConversation sentiment breakdown by agent
sentimentByChannelSentiment by ChannelConversation sentiment across channels
csatTrendCSAT TrendCustomer satisfaction trend over time
sentimentTrendSentiment TrendDaily sentiment distribution over time
emotionTrendEmotion TrendDaily emotion distribution trend
emotionByCategoryEmotion by CategoryEmotions detected by topic category
agentSentimentRankingAgent Sentiment RankingAgent leaderboard by customer sentiment score
dissatisfactionDriversDissatisfaction DriversCategories most associated with customer dissatisfaction
categoryByAgentCategory by AgentTopic categories handled by each agent
aiBotContainmentAI Bot ContainmentAI agent resolution and transfer metrics
csatByCountryCSAT by CountryCustomer satisfaction scores by country
sentimentByCountrySentiment by CountryCustomer sentiment breakdown by country
categoryByCountryCategory by CountryTop conversation categories for each country
Sales
outboundVolumeOutbound VolumeDaily outbound conversation volume trend
agentOutboundPerformanceAgent Outbound PerformanceOutbound activity metrics by agent
responseRateAnalysisResponse Rate AnalysisUser response rates to outbound messages over time
smsVsWhatsAppSMS vs WhatsApp ComparisonCompare outbound performance across messaging channels
templateUsageByBUTemplate Usage by BUTemplate usage breakdown by business unit
outboundByAgentByDayOutbound by Agent by DayDaily outbound volume per agent
Executive
csExecutiveSummaryCS Executive SummaryOverview of inbound customer service performance
teamScorecardTeam Performance ScorecardCompare performance metrics across business units
qualityAssuranceSummaryQuality Assurance SummaryAI-driven quality insights
channelPerformanceChannel Performance ComparisonCompare performance metrics across channels
customerLifecycleCustomer Lifecycle ReportTrack customer journey from acquisition through support
escalationAnalysisEscalation AnalysisTransfer and escalation insights
countryPerformanceScorecardCountry Performance ScorecardExecutive overview comparing all countries

Note
Not all reports are available via the API. Reports with complex visual data structures (timelines, heatmaps) and interactive reports are excluded.

Webhook Callbacks

If you provide a webhookURL when sending WhatsApp templates, you'll receive delivery status updates.

Callback payload:

{
  "ok": 1,
  "mid": "6462d3d8c8b0b08fddc34ca8",
  "uid": "3941-wa3-44151999999",
  "botID": 3941,
  "ack": 2,
  "timestamp": "2024-11-14T14:28:08",
  "webhookPayload": { "orderId": "ORD-12345" }
}

Message Acknowledgement Codes

Understanding message delivery status codes returned by GetMessageDetails and webhook callbacks.

CodeMeaning
-2User does not exist on WhatsApp (WhatsApp only)
-1An error occurred (check whatsappErrorCode for details)
0Message is at the server (WhatsApp)
1Message has been sent
2Message has been delivered to the user's device
3Message has been seen/read by the user (WhatsApp only)
10User has replied to the template message

API Error Codes

Error codes returned by the API in the errorCode field.

Validation Errors (1000-1099)

CodeDescription
1000Missing API Token
1001Invalid API Token
1002Invalid end date passed to the API
1003Invalid start date passed to the API
1004Unknown command passed to the API
1005Unknown user (uid)
1006Invalid phone number
1007Invalid phone number length
1008Missing Chatbot ID
1009Missing phone number
1010Missing message
1011Missing route
1012Unknown or invalid route
1013Message max characters reached (2000)
1014Route name too large (max 256)
1015Unknown ChatBot ID
1016Wrong chatbot type for this operation
1017Invalid JSON object passed to API
1018Websocket connection reused (previous connection closed)
1019Websocket Connect expected as first command
1020Unknown Message ID
1021Start date is after end date
1022Invalid name format
1023Invalid note format
1024Invalid email format
1025Missing uid

System Errors (2000-2099)

CodeDescription
2000Unable to create a user
2001User is chatting to an agent, message cannot be sent
2002Unable to assign user to agent (invalid agent email)
2003Internal timeout (typically 5 seconds)
2004Internal error
2005SMS sending error
2006User has been unsubscribed from automatic content
2007Rate limit reached for this phone number
2008Rate limit reached for this token
2009WhatsApp too busy to send more messages

WhatsApp Errors (3000-3049)

CodeDescription
3000No WhatsApp Templates exist for this ChatBot
3001No WhatsApp template exists for this name and language
3002WhatsApp API error (see whatsappErrorCode and whatsappErrorDesc)
3003Missing WhatsApp Template name
3004Missing WhatsApp Template language field

Tag Errors (3050-3099)

CodeDescription
3050Invalid tag format
3051Invalid tag color format (must be hex like #FF5733)
3052Invalid tag description format
3053Tag does not exist

Report Errors (4000-4005)

CodeDescription
4000Unknown or missing report ID
4001Report is not available via the API
4002Missing date range (both from and to are required)
4003Date range exceeds maximum (90 days)
4004Report rate limit exceeded (10 requests per 60 seconds)
4005Report API not enabled for this organization

Phone Number Formats

Valid phone number formats for API commands that require a phone number.

All numbers must include an international prefix and be mobile numbers. The following formats are accepted:

  • +447922029419 - With plus prefix
  • 447922021419 - Without plus prefix
  • +44 792 202 1419 - With spaces
  • 44-792-202-1419 - With dashes

The API will normalize the phone number and return the standardized format in the response.

Salesforce