Conversations API
Overview

Conversations API

Conversations over API is a platform for cross-channel communication where businesses can interact with their customers over a single API. You can integrate a custom range of Conversations (opens in a new tab) features to fulfill your needs:

  • Supervisor dashboard
  • Agent real-time communication interface
  • Custom waiting strategy
  • External bot integration such as welcome bot, mid-conversation bot, closing/satisfaction bot

Conversations HTTP API supports the following functionalities:

  • Conversation threading
  • Channels
  • Agent, queues, and routing management
  • Call center features

Depending on your business needs, you can use conversation threading only and skip the agent, queue, and routing management. However, if needed, you can also combine any of the functionalities mentioned above.

The solution also includes automated conversations over:

You can find the technical specifications for the API integration in our Conversations API (opens in a new tab) documentation.

If you run into any issues, contact our Support (opens in a new tab) team.

Available channels

These are the supported channels over Conversations API:

Webhooks

CLOSED EARLY ACCESS

Important

This feature is released as Closed Early Access.

Webhooks are automated messages sent from one application to another when a specific event occurs. They enable real-time communication between systems by delivering data via HTTP requests.

Conversations webhooks provide instant access to conversation details and the latest message information, allowing you to manage customer inquiries more efficiently. They also enable real-time integrations to automate workflows for message routing, escalation, and analytics. As a result, they enhance operational reporting with comprehensive conversation and message-level metadata.

The following events are available:

  1. Conversations created - Includes the unique MessageID and Last Message metadata for the first message of a conversation. This event occurs under the following circumstances:
    • A conversation is initiated by an inbound message (e.g., when a customer contacts the contact center, starting a new conversation).
    • An outbound conversation is started via web interface (e.g., when an agent begins a new conversation using the Start Conversation dialogue).
    • Customers utilize the CCAAS Public API to create an empty conversation (where there are no messages in the conversation initially).
  2. Conversations status updated - The event occurs whenever the conversation status is updated, including statuses such as Open, Waiting, Solved, or Closed.
  3. Conversations assignment updated - The event occurs whenever the assigned agent for a conversation is changed.
  4. Message received - The event occurs whenever a new inbound message is received in a specific conversation.
  5. Message updated - The event occurs whenever a message is updated.
  6. Message deleted - The event occurs whenever a message is deleted.
Note

The Message updated and Message deleted events are only available for Social Media (opens in a new tab) channels (Facebook Posts (opens in a new tab), Instagram Posts (opens in a new tab), and Google Play Store Reviews (opens in a new tab)). Additionally, if a conversation is deleted, the event will not be triggered, as it does not comply with Data retention (opens in a new tab) rules.

MessageID and Last Message metadata are properties of the events listed above.

MessageID is a platform-wide unique identifier available for all supported events, while the Last Message metadata includes:

  • Sender and recipient details
  • Message direction (inbound/outbound)
  • Message channel (e.g., WhatsApp, SMS, Email)

With these webhooks, you can receive notifications for incoming messages and conversational events through the Subscriptions management (opens in a new tab).

Check the tables below for more information about the events.

Conversation created

General event structure

FieldTypeDescriptionSupported values
idStringUnique conversation ID.UUID v4
statusEnumerationConversation status.OPEN, WAITING, SOLVED, CLOSED
queueObjectConversation queue data.See below.
priorityEnumerationConversation priority.LOW, NORMAL, HIGH, URGENT
channelEnumerationConversation channel.SMS, VIBER, FACEBOOK_MESSENGER, WHATSAPP, RCS, EMAIL, LIVE_CHAT, APPLE_BUSINESS_CHAT, LINE, TELEGRAM, CALLS, VIBER_BOT, FACEBOOK_POST, INSTAGRAM_POST, INSTAGRAM_MESSAGING, GOOGLE_PLAY, KAKAO_SANGDAM
directionEnumerationConversation origin.INBOUND, OUTBOUND
assigneeObjectConversation assignee data. A conversation can be unassigned, assigned to an agent, or a bot.See below.
customerObjectContains end customer data.See below.
lastMessageObjectLast message information that can be used to fetch additional conversation details.See below.
formObjectConversation form (disposition) data.See below.
topicStringConversation topic.
summaryStringConversation summary.
timestampTimestampConversation creation timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.

Assignee

The Assignee model is designed as a composite JSON object to ensure its scalability and adaptability for future use.

FieldTypeDescriptionSupported values
idStringAgent ID, can also be the Bot ID or “NULL” when a conversation is unassigned. The agent data can be obtained through the Get agent (opens in a new tab) endpoint.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).

Queue

The Queue model is designed as a composite JSON object to ensure its scalability and adaptability for future use.

FieldTypeDescriptionSupported values
idStringQueue ID. The queue data can be obtained through the Get queues (opens in a new tab) endpoint in order to avoid fetching all queues.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).

Form

The Form model is designed as a composite JSON object to ensure its scalability and adaptability for future use.

FieldTypeDescriptionSupported values
idStringForm ID. The form data can be obtained through the Get conversation form (opens in a new tab) endpoint.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).

Customer

The Customer model is designed as a composite JSON object to ensure its scalability and adaptability for future use.

FieldTypeDescriptionSupported Values
idStringCustomer ID. The customer data can be obtained through a private endpoint: GET /ccaas/1/customers/{customerId}UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).

Message data

The Last Message data includes metadata from the last message.

FieldTypeDescriptionSupported Values
fromStringThe sender of the last message. Use direction to determine whether this is from an agent or a customer.Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringThe destination of the last message. Use direction to determine whether it is an agent or a customer.
channelEnumerationChannel of the last message.
directionEnumerationDirection of the last message.INBOUND, OUTBOUND
Example: Inbound conversation created from an inbound message
json
 
{
    "type": "CONVERSATION_CREATED",
    "payload":
    {
        "id": "ce83e955-1133-4adb-9847-47c83e6fc8bf",
        "status": "OPEN",
        "queue":
        {
            "id": "448bf76d-0047-49a3-93a4-ea8722d6aea9"
        },
        "priority": "URGENT",
        "channel": "WHATSAPP",
        "direction": "INBOUND",
        "assignee":
        {
            "id": null
        },
        "lastMessage":
        {
            "from": "givenCustomerNumber",
            "to": "givenAgentNumber",
            "channel": "WHATSAPP",
            "direction": "INBOUND"
        },
        "customer":
        {
            "id": "D12945086921DDDF4F36EBB3BE7AEFF1"
        },
        "form":
        {
            "id": "2cd74b30-3a06-4cfa-949a-77aa0d8cd17f"
        },
        "topic": null,
        "summary": null,
        "timestamp": "2023-06-20T16:44:24.572+00:00"
    }
}
 

Conversation status updated

General event structure

FieldTypeDescriptionSupported Values
idStringUnique conversation ID.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).
statusEnumerationConversation status.OPEN, WAITING, SOLVED, CLOSED
lastMessageObjectLast message information that can be used to fetch additional conversation details.See below.
timestampTimestampConversation creation timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.

Message data

The Last Message data includes metadata from the last message.

FieldTypeDescriptionSupported Values
fromStringThe sender of the last message. Use direction to determine whether this is from an agent or a customer.Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringThe destination of the last message. Use direction to determine whether it is an agent or a customer.
channelEnumerationChannel of the last message.
directionEnumerationDirection of the last message.INBOUND, OUTBOUND
Example: Conversation status changed to Closed
json
 
{
    "type": "CONVERSATION_STATUS_UPDATED",
    "payload":
    {
        "id": "ce83e955-1133-4adb-9847-47c83e6fc8bf",
        "status": "CLOSED",
        "lastMessage":
        {
            "from": "givenCustomerNumber",
            "to": "givenAgentNumber",
            "channel": "WHATSAPP",
            "direction": "INBOUND"
        },
        "timestamp": "2023-06-20T16:49:56.971+00:00"
    }
}
 

Conversation assignment updated

General event structure

FieldTypeDescriptionSupported Values
idStringUnique conversation ID.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).
assigneeObjectConversation assignee data. A conversation can be unassigned, assigned to an agent, or a bot.See below.
lastMessageObjectLast message information that can be used to fetch additional conversation details.See below.
timestampTimestampConversation creation timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.

Assignee

The Assignee model is designed as a composite JSON object to ensure its scalability and adaptability for future use.

FieldTypeDescriptionSupported Values
idStringAgent ID, can also be the Bot ID or “NULL” when a conversation is unassigned. The agent data can be obtained through the Get agent (opens in a new tab) endpoint.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).

Message data

The Last Message data includes metadata from the last message.

FieldTypeDescriptionSupported Values
fromStringThe sender of the last message. Use direction to identify whether it is the agent or the customer.Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringThe destination of the last message. Use direction to determine whether it is the agent or the customer.
channelEnumerationChannel of the last message.
directionEnumerationDirection of the last message.INBOUND, OUTBOUND
Example: Conversation assignment changed event
json
 
{
    "type": "CONVERSATION_ASSIGNMENT_UPDATED",
    "payload":
    {
        "id": "ce83e955-1133-4adb-9847-47c83e6fc8bf",
        "assignee":
        {
            "id": "FBCFE58EA5C33A80B569F631DBB27C41"
        },
        "lastMessage":
        {
            "from": "givenCustomerNumber",
            "to": "givenAgentNumber",
            "channel": "WHATSAPP",
            "direction": "INBOUND"
        },
        "timestamp": "2023-06-20T16:45:39.138+00:00"
    }
}
 

Message received

Root element

The INBOUND_MESSAGE event includes both message and authentication parameters, with authentication containing Live Chat (opens in a new tab) authentication details.

FieldTypeDescriptionSupported Values
messageObjectInbound message data container.See below.
authenticationObjectLive Chat authentication data.See below.

Message

FieldTypeDescriptionSupported Values
idStringUnique message ID.UUID v4
messageIdStringPlatform-wide unique identifier available for all supported events.UUID v4
conversationIdStringUnique ID of the conversation the message belongs to.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).
channelEnumerationMessage channel.SMS, VIBER, FACEBOOK_MESSENGER, WHATSAPP, RCS, EMAIL, LIVE_CHAT, APPLE_BUSINESS_CHAT, LINE, TELEGRAM, CALLS, VIBER_BOT, FACEBOOK_POST, INSTAGRAM_POST, INSTAGRAM_MESSAGING, GOOGLE_PLAY, KAKAO_SANGDAM
fromStringCustomer number.Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringAgent number.Ranges from alphanumeric to UUID v4 values, depending on the channel.
createdAtTimestampMessage creation timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
updatedAtTimestampMessage update timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
contentObjectMessage model depending on the channel and content type.

Authentication

FieldTypeSupported Values
authenticationTypeEnumerationEMAIL, PHONE, EXTERNAL_ID, NOT_AUTHENTICATED
valueString
personIdIntegerInteger value in range 1 - 2147483647 (Person ID in People (opens in a new tab))
firstNameString
lastNameString
Example: WhatsApp text message
json
 
{
  "type": "INBOUND_MESSAGE",
  "payload": {
    "message": {
      "id": "bb88179a-76c0-4f7b-b076-852c53e8b646",
      "channel": "WHATSAPP",
      "from": "385989674681",
      "to": "447860064529",
      "conversationId": "6ec0d737-e066-450e-a435-f2b77cd8bbe3",
      "createdAt": "2023-06-18T13:12:36.581+00:00",
      "updatedAt": "2023-06-18T13:12:36.581+00:00",
      "content": {
        "text": "Hi",
        "context": null,
        "referral": null,
        "type": "TEXT"
      }
    },
    "authentication": null
  }
}
 

Message updated

Root element

The event includes message and authentication parameters, with authentication carrying Live Chat (opens in a new tab) authentication parameters.

FieldTypeDescriptionSupported Values
messageObjectInbound message data container.See below.
authenticationObjectLive Chat authentication data.Always NULL

Message

FieldTypeDescriptionSupported Values
idStringUnique message ID.UUID v4
messageIdStringPlatform-wide unique identifier available for all supported events.UUID v4
conversationIdStringUnique ID of the conversation associated with the message.UUID v4
channelEnumerationChannel of the message.FACEBOOK_POST, INSTAGRAM_POST, GOOGLE_PLAY
fromStringCustomer number.Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringAgent number.Ranges from alphanumeric to UUID v4 values, depending on the channel.
createdAtTimestampMessage creation timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
updatedAtTimestampMessage update timestamp (effectively equal to creation timestamp).Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
contentObjectSingle Send model.
Example: Facebook Post text message
json
 
{
    "type": "INBOUND_MESSAGE_UPDATED",
    "payload":
    {
        "message":
        {
            "id": "bb88179a-76c0-4f7b-b076-852c53e8b646",
            "messageid": "bb88179a-76c0-4f7b-b076-852c53e8b646",
            "channel": "FACEBOOK_POST",
            "from": "givenFacebookPostCustomerNumber",
            "to": "givenFacebookPostAgentNumber",
            "conversationId": "6ec0d737-e066-450e-a435-f2b77cd8bbe3",
            "createdAt": "2023-06-18T13:12:36.581+00:00",
            "updatedAt": "2023-06-18T13:12:36.581+00:00",
            "content":
            {
                "text": "Hi",
                "context": null,
                "referral": null,
                "type": "TEXT"
            }
        },
        "authentication": null
    }
}
 

Message deleted

Root element

The event includes message and authentication parameters, with authentication carrying Live Chat (opens in a new tab) authentication parameters.

FieldTypeDescriptionSupported Values
messageObjectInbound message data container.See below.
authenticationObjectLive Chat authentication data.Always NULL

Message

FieldTypeDescriptionSupported Values
idStringUnique message ID.UUIDv4
messageIdStringPlatform-wide unique identifier available for all supported events.UUIDv4
conversationIdStringUnique ID of the conversation associated with the message.UUID v4 value or a 32-character upper-case alphanumeric string value (legacy).
channelEnumerationChannel of the message.FACEBOOK_POST, INSTAGRAM_POST, GOOGLE_PLAY
fromStringCustomer number.Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringAgent number.Ranges from alphanumeric to UUID v4 values, depending on the channel.
createdAtTimestampMessage creation timestamp.Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
updatedAtTimestampMessage update timestamp (effectively equal to creation timestamp).Timestamp in yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
contentObjectSingle Send model.
Example: Facebook Post text message
json
 
{
    "type": "INBOUND_MESSAGE_DELETED",
    "payload":
    {
        "message":
        {
            "id": "bb88179a-76c0-4f7b-b076-852c53e8b646",
            "messageid": "bb88179a-76c0-4f7b-b076-852c53e8b646",
            "channel": "FACEBOOK_POST",
            "from": "givenFacebookPostCustomerNumber",
            "to": "givenFacebookPostAgentNumber",
            "conversationId": "6ec0d737-e066-450e-a435-f2b77cd8bbe3",
            "createdAt": "2023-06-18T13:12:36.581+00:00",
            "updatedAt": "2023-06-18T13:12:36.581+00:00",
            "content":
            {
                "text": "Hi",
                "context": null,
                "referral": null,
                "type": "TEXT"
            }
        },
        "authentication": null
    }
}
 
NoteIn most of the examples here, the authenticationData value is set to "NULL", but this is not always the case. For instance, in Live Chat (opens in a new tab), this value represents the authentication type and the method by which the end user is authenticated. Additionally, for authenticated users, the personID is also retrieved from People (opens in a new tab).

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Service Terms & ConditionsPrivacy policyTerms of use