Conversations API
Webhooks

Webhooks

Webhooks are automated notifications sent between applications when specific events occur, enabling real-time communication by transmitting data through HTTP requests.

Conversations webhooks provide instant access to conversation details and the latest message information, allowing you to manage customer inquiries efficiently. They support real-time integrations to automate workflows for message routing, escalation, and analytics, enhancing operational reporting with comprehensive conversation and message-level metadata.

With these webhooks, you can receive notifications for incoming messages and conversational events through the Subscriptions Management.

On our web interface, go to Subscriptions Management → Create subscription. Choose the Customer engagement option in the Channel menu, and select the events you want to subscribe to.

Additionally, you can use the Subscriptions Management API endpoints (opens in a new tab) to create the wanted subscriptions.

Check the sections below for more information about the events.

Supported events

The webhook currently supports a range of event types that allow you to stay informed about key activities in real time. The supported events are:

  • Messaging
    • Inbound Message Received (MO message)
    • Outbound Message Sent (MT message)
    • Message Updated
    • Message Deleted
  • Conversation lifecycle
    • Conversation Created
    • Conversation Assignment Changed
    • Conversation Priority Changed
    • Conversation Status Changed
    • Conversation Queue Changed
    • Conversation Form Changed
    • Conversation Form Field Changed
    • Conversation SLA Policy Changed
    • Conversation Customer Changed
    • Conversation Summary Changed
    • Conversation Topic Changed
    • Conversation Tag Added
    • Conversation Tag Removed
  • Agent
    • Agent Status Changed

Event structure

An event is represented as a multilevel JSON object sent to client endpoints.

Root JSON element

The root of the payload contains three key event fields:

  • type: Defines the type of event being delivered.
  • payload: Contains the event-specific data.
  • timestamp: Date and time of the event.

Webhook integrators can filter and process incoming events based on the type field to handle only the relevant ones.

JSON fieldTypeDescriptionSupported values
typeEnumerationEvent type valueINBOUND_MESSAGE
OUTBOUND_MESSAGE
INBOUND_MESSAGE_UPDATED
CONVERSATION_DELETED
CONVERSATION_CREATED
CONVERSATION_STATUS_UPDATED
CONVERSATION_ASSIGNMENT_UPDATED
CONVERSATION_FORM_UPDATED
CONVERSATION_QUEUE_UPDATED
CONVERSATION_TAG_ADDED
CONVERSATION_TAG_REMOVED
CONVERSATION_NOTE_ADDED
CONVERSATION_NOTE_UPDATED
CONVERSATION_NOTE_REMOVED
CONVERSATION_PRIORITY_UPDATED
CONVERSATION_CUSTOMER_UPDATED
CONVERSATION_TOPIC_UPDATED
CONVERSATION_SUMMARY_UPDATED
CONVERSATION_FORM_FIELD_UPDATED
CONVERSATION_SLA_POLICY_UPDATED
CONVERSATION_AGENT_STATUS_CHANGED
payloadNested objectEvent payloadSee the Payload structure.
timestampTimestampEvent timestampTimestamp in the yyyy-MM-dd'T'HH:mm:ss.SSSZ format.

Example

json
{
  "type": "CONVERSATION_CREATED",
  "payload": { ... },
  "timestamp": "2023-06-20T16:44:24.572+00:00"
}

Payload structure

When a webhook is triggered, it sends a payload containing key data about the event. In this case, the payload consists of two main event categories that provide the essential information needed to process the event effectively. These elements are:

  1. Agent events: Events related to agent activity, such as availability status.
  2. Conversation lifecycle events: Events that track the various stages of a conversation, including when it starts, updates, or ends.

Each of these elements plays a specific role in ensuring that the receiving system has all the context it needs.

Agent events payload

This event structure applies to the CONVERSATION_AGENT_STATUS_CHANGED event.

JSON fieldTypeDescriptionSupported values
idStringUnique agent ID.UUID v4 value.
userIdStringUnique encrypted user ID.
emailStringAgent email address.
roleEnumerationAgent role.AGENT
SUPERVISOR
BOT
statusNested objectAgent status details.See below.
invokerNested objectInvoker (the entity that made the change).See below.

Status

JSON fieldTypeDescriptionSupported values
idStringUnique status ID.UUID v4 value.
nameStringStatus name.Read more about agent statuses.
groupEnumerationStatus group.ACTIVE
BUSY
INVISIBLE
AWAY

Conversation events payload

Conversation events generally follow a uniform structure. All events share a set of standard fields that provide core conversation data, such as ID, status, and timestamp. Depending on the event type, additional fields may be included to provide more context or data.

In other words, all conversation events share a common base structure. Some event types build on this by including additional fields relevant to their specific function. Keep in mind that not every field listed in the table appears in all events.

Refer to the table below for more details about the Conversation event types.

JSON fieldTypeEvent type availabilityDescriptionSupported values
idStringAll events.Unique conversation ID.UUID v4 value.
statusEnumerationAll events.Conversation status.OPEN
WAITING
SOLVED
PENDING (available only in certain cases)
CLOSED
queueNested objectAll events.Conversation queue data.See below.
priorityEnumerationAll events.Conversation priority.LOW
NORMAL
HIGH
URGENT
channelEnumerationAll events.Conversation channel.See the list of supported Conversations channels.
directionEnumerationAll events.Conversation direction.INBOUND
OUTBOUND
assigneeNested objectAll events.Conversation assignee data.See below.
customerNested objectAll events.Conversation customer data.See below.
formNested objectAll events.Conversation form data.See below.
topicStringAll events.Conversation topic.
summaryStringAll events.Conversation summary.
timestampTimestampAll events.Event timestamp. Note that the same timestamp is also part of root structure.Timestamp in the yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
invokerNested objectAll events.Invoker (the entity that made the change).See below.
tagsNested objectAll events.List of all associated conversation tags.See below.
lastMessageNested objectOnly available in:
CONVERSATION_CREATED
CONVERSATION_STATUS_UPDATED
CONVERSATION_ASSIGNMENT_UPDATED
CONVERSATION_FORM_UPDATED
CONVERSATION_QUEUE_UPDATED
CONVERSATION_TAG_ADDED
CONVERSATION_TAG_REMOVED
CONVERSATION_NOTE_ADDED
CONVERSATION_NOTE_UPDATED
CONVERSATION_NOTE_REMOVED
CONVERSATION_PRIORITY_UPDATED
CONVERSATION_CUSTOMER_UPDATED
CONVERSATION_TOPIC_UPDATED
CONVERSATION_SUMMARY_UPDATED
CONVERSATION_FORM_FIELD_UPDATED
CONVERSATION_SLA_POLICY_UPDATED
Last message info that can be used for additional conversation information fetching.See below.
messageNested objectOnly available in:
INBOUND_MESSAGE
OUTBOUND_MESSAGE
CONVERSATION_MESSAGE_UPDATED
CONVERSATION_DELETED
Full message data.See below.
sentimentNumberOnly available in the CONVERSATION_STATUS_UPDATED event type when the status is CLOSED.Final conversation sentiment (after the conversation is closed).-1.0 to 1.0
formFieldsList of nested objectsOnly available in the CONVERSATION_STATUS_UPDATED event type when the status is CLOSED.List of final conversation form fields with their respective values (after the conversation is closed).See below.
fieldNested objectOnly available in the CONVERSATION_FORM_FIELD_UPDATED event type.Contains field name and value.See below.
noteNested objectOnly available in:
CONVERSATION_NOTE_ADDED
CONVERSATION_NOTE_UPDATED
CONVERSATION_NOTE_DELETED
Conversation note data.See below.
policyNested objectOnly available in the CONVERSATION_SLA_POLICY_UPDATED event type.Conversation SLA policy data.See below.
addedTagNested objectOnly available in the CONVERSATION_TAG_ADDED event type.Data about the recently added tag.See below.
removedTagNested objectOnly available in the CONVERSATION_TAG_REMOVED event type.Data about the recently removed tag.See below.
socialContextNested objectOnly available in the INBOUND_MESSAGE event type.Contains social media context (sent only for Facebook Posts and Instagram Posts).See below.

Payload elements

Refer to the following tables for details about different payload elements.

Assignee

JSON fieldTypeDescriptionSupported values
idStringAgent ID.UUID v4 value.
nameStringAgent name.
emailStringAgent email address.
roleEnumerationAgent role.AGENT
SUPERVISOR
BOT

Customer

JSON fieldTypeDescriptionSupported values
idStringCustomer ID.UUID v4 value.
nameStringCustomer name.
personIdNumberAssociated People Person ID.

Form

JSON fieldTypeDescriptionSupported values
idStringForm ID.UUID v4 value.
nameStringForm name.

Form fields

List of fields (see below).

JSON fieldTypeDescriptionSupported values
idStringField ID.UUID v4 value.
nameStringField name.
valueStringField value.

Note

JSON fieldTypeDescriptionSupported values
idStringNote ID.UUID v4 value.
typeEnumerationNote type.INTERNAL, JIRA_COMMENT, ATTACHMENT
contentObjectNote content.

Policy

JSON fieldTypeDescriptionSupported values
policyIdStringSLA policy ID.UUID v4 value.
policyNameStringSLA policy name.
severityIdStringSLA severity ID.UUID v4 value.
severityNameStringSLA severity name.

Tags

List of tags (see below).

Tag, Added Tag, Removed Tag
JSON fieldTypeDescriptionSupported values
idStringTag ID.UUID v4 value.
nameStringTag name.

Queue

JSON fieldTypeDescriptionSupported values
idStringQueue ID.UUID v4 value.
nameStringQueue name.

Last message

JSON fieldTypeDescriptionSupported values
fromStringMessage sender (who/what sent the message).Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringMessage destination (who/what received the message).Ranges from alphanumeric to UUID v4 values, depending on the channel.
directionEnumerationMessage direction.INBOUND, OUTBOUND
channelEnumerationLast message channel.Supported Conversations channels.

Message

JSON fieldTypeDescriptionSupported values
idStringUnique message ID.UUID v4 value.
messageIdStringUnique platform message ID.Ranges from alphanumeric to UUID v4 values, depending on the channel.
fromStringMessage sender (who/what sent the message).Ranges from alphanumeric to UUID v4 values, depending on the channel.
toStringMessage destination (who/what received the message).Ranges from alphanumeric to UUID v4 values, depending on the channel.
channelEnumerationLast message channel.Supported Conversations channels.
conversationIdStringUnique ID of the conversation the message belongs to.UUID v4 value.
createdAtTimestampMessage creation timestamp.Timestamp in the yyyy-MM-dd'T'HH:mm:ss.SSSZ format.
updatedAtTimestampMessage updated at timestamp.Timestamp in the yyyy-MM-dd'T'HH:mm:ss.SSSZ format.

Social context

JSON fieldTypeDescriptionSupported values
usernameStringSocial media username.

General data shared in all payloads

Invoker
JSON fieldTypeDescriptionSupported values
idStringInvoker ID.For the AGENT invoker type, the value is agentId. For the SYSTEM invoker type, the value is null.
nameStringInvoker name.For the AGENT invoker type, the value is agent name. For the SYSTEM invoker type, the value is null.
typeEnumerationInvoker type.AGENT, SYSTEM

Webhook examples

Review the following webhook examples to understand the structure and data involved. These examples will help clarify how the events are represented and how to handle them effectively in your integration.

Conversation status updated



Conversation closed



Conversation assignment updated



Conversation queue updated



Conversation customer updated



Conversation form updated



Conversation summary updated



Conversation topic updated



Conversation tag added



Conversation tag removed



Conversation note added



Conversation note updated



Conversation note deleted



Conversation outbound message sent (system)



Conversation outbound message sent (agent)



Conversation inbound message received



Conversation created



Conversation message updated



Conversation message deleted



Conversation form field updated



Conversation SLA policy changed



Agent status changed



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