Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Webhook Events


(error)

Danger

Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here(link takes you to an external page).

If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.

Programmable Chat sends webhooks for most things that happen in your app, and are designed to allow you to monitor and intercept user actions in your own backend service, in a Function, or in a Studio flow.

The Webhooks configuration page is accessible from the left nav bar when configuring a Chat service.

Webhook targets for the Service instance (the URL that Twilio will invoke) are configured in the Twilio Console. Twilio will fire these webhooks at two different moments:

  • Pre-Event Webhooks will fire before an action has been committed to the Chat instance, blocking publication until a response is received. This gives your backend (or Function) the opportunity to intercept, modify, or reject any action across the instance, making these hooks useful for spam/language filtering, complex permission schemes, or other business logic. Pre-event webhooks are fired only for actions from the Chat SDK; the REST API actions will never fire them.
  • Post-Event Webhooks fire after any action taken on a Chat Service. This means they arrive after messages have been delivered, after channel membership has changed, etc. Post-Event hooks are therefore the right tool for archiving or post-processing. Unlike Pre-Event webhooks, Post-Event webhooks can also be triggered from the REST API if the correct header is passed (see below).

Additionally to global, service-level webhooks, Channel-Scoped Webhooks allow you to configure up to five specific webhooks per channel, optionally triggering them on specific words or phrases.

(information)

Info

Twilio can send your web application an HTTP request when certain events happen, such as an incoming text message to one of your Twilio phone numbers. These requests are called webhooks, or status callbacks. For more, check out our guide to Getting Started with Twilio Webhooks. Find other webhook pages, such as a security guide and an FAQ in the Webhooks section of the docs.


Table of Contents

table-of-contents page anchor

Most events — but not all of them — have both a pre-event and a post-event webhook. The former is fired before the event has been published, and Twilio waits for a response before publishing it. The latter are fired after publication, assuming the event was not rejected by your pre-event webhook response.

The below table enumerates all Chat webhook events in corresponding pairs.

Pre-EventPost-EventDescription (incl. Post-Event)
onMessageSendonMessageSentFires when a new message is posted to a channel.
onMessageRemoveonMessageRemovedFires when a message is deleted from a channel.
onMessageUpdateonMessageUpdatedFires when a posted message's body or any attribute is changed.
onMediaMessageSendonMediaMessageSentFires when a new media message is posted to a channel.
onChannelAddonChannelAddedFires when a new channel, public or private, is created.
onChannelUpdateonChannelUpdatedFires when any attribute of a channel is changed.
onChannelDestroyonChannelDestroyedFires when a channel is removed from the Service.
onMemberAddonMemberAddedFires when a User has joined a Channel as a Member.
onMemberUpdateonMemberUpdatedFires when Member's attributes are updated.
onMemberRemoveonMemberRemovedFires when a User is removed from the set of Channel Members.
(no pre-event webhook)onUserAddedFires when a new User has been created. (cannot be intercepted with a Pre-Event hook)
onUserUpdateonUserUpdatedFires when any configurable attribute of a User is changed. For User's reachability status update only Post-Event webhook is triggered.

Triggering Webhooks for REST API Events

triggering-webhooks-for-rest-api-events page anchor

Upon configuration, only actions from SDK-driven clients (like mobile phones or browsers) will cause webhooks without further action on your part. This includes both Service-level webhooks and Channel-Scoped Webhooks, and as a default behavior helps avoid infinite feedback loops.

Your Post-Event Webhook target, however, may be an important tool for archiving. In this case, you may also want to enable webhook "echoes" from actions you take on the REST API. To do so, you can add a header X-Twilio-Webhook-Enabled=true to any such request. Requests bearing this header will yield webhooks to the configured Post-Event webhook target.

Using Pre-Event Webhooks to Modify or Reject Changes

using-pre-event-webhooks-to-modify-or-reject-changes page anchor

In the case of Pre-Event webhooks, Twilio will wait for a response from your service before publishing a result. The arrival, HTTP status code, and content of your response determines how Programmable Chat will proceed.

Response Status CodeBodyResult
HTTP 200 OK{}(or no content)Chat will publish the change unmodified.
HTTP 200 OK{ "body": "modified message" } (See the list of modifiable fields.)Chat will publish the change with modifications as given in the response. All values are optional, and missing fields will be left unmodified from the original event. See below for which fields can be modified for each data type (Channels, Messages, or Users). If modified values fail validation, the error will be returned to the SDK (or REST client) that triggered the event.
HTTP 403 Forbidden(none)Chat will reject the change and no publication will be made.
HTTP 404 Not Found(none)Chat will publish the change unmodified.
(no response or timeout)Chat will publish the change unmodified.

In all cases, any change to the attributes value will be applied wholly; you cannot partially-update this value by providing only a subset of fields. The new value for attributes, as ever, must be provided as a string with all intervening double-quotes escaped.

Channel Events

channel-events page anchor

In response to the onChannelAdd and onChannelUpdate events, your Pre-Event Webhook response may modify the following properties of the channel:

  • friendly_name
  • unique_name
  • attributes

An example response modifying a channel

HTTP 200 OK Content-Type: text/json { "friendly_name": "friendly name of channel", "unique_name": "very unique name", "attributes" : "{\"key\" : \"value\"}" }

In response to onMessageSend and onMessageUpdate events, your Pre-Event Webhook response may modify the following properties of the message:

  • body
  • attributes

An example response modifying a chat message.

HTTP 200 OK Content-Type: text/json { "body": "modified message text", "attributes": "{\"key\" : \"value\"}" }

In response to onUserUpdate events, your Pre-Event Webhook response may modify the following properties of the User:

  • friendly_name
  • attributes

An example response modifying a chat User.

HTTP 200 OK Content-Type: text/json { "friendly_name": "modified friendly name", "attributes": "{\"key\" : \"value\"}" }


Selective muting for Push notifications

selective-muting-for-push-notifications page anchor

Additionally, in response to onMessageSend, OnMemberAdd and OnMemberRemove the following property can be modified - mute_notification. This allows to suppress Push notification for named events.

HTTP 200 OK Content-Type: text/json { "mute_notification": "true" }


Configuring Webhooks with the REST API

configuring-webhooks-with-the-rest-api page anchor

Service-level Webhooks, both Pre-Event and Post-Event, are configured on the Service itself with the following parameters.

Configuration AttributeTypeMeaning
PreWebhookUrlstring (absolute url)The absolute URL where Twilio should send Pre-Event webhook requests.
PostWebhookUrlstring (absolute url)The absolute URL where Twilio should send Post-Event webhook requests.
WebhookMethodstring ("POST" or "GET")Twilio will use this HTTP method when sending webhook requests of all types.
WebhookFiltersstring, repeatableThe list of webhook event triggers that are enabled for this Service. The entire list must be provided on any POST to Service configuration.
PreWebhookRetryCountinteger [0, 3]Pre-Event webhooks that fail after a 5s timeout will be retried according to this setting. The maximum number of retries is 3 (i.e. 4 attempts total).
PostWebhookRetryCountinteger [0, 3]Post-Event webhooks that fail after a 5s timeout will be retried according to this setting. The maximum number of retries is 3 (i.e. 4 attempts total).

Configuring Chat Webhook URLs

configuring-chat-webhook-urls page anchor

This snippet configures the URLs invoked by Twilio. It does not change the set of enabled webhook event triggers.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.chat.v2.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.update({
_14
preWebhookUrl: 'https://hooks.yoursite.com/pre-webhooks',
_14
postWebhookUrl: 'https://hooks.yoursite.com/post-webhooks',
_14
webhookMethod: 'POST'
_14
})
_14
.then(service => console.log(service.friendlyName));

Output

_57
{
_57
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_57
"consumption_report_interval": 100,
_57
"date_created": "2015-07-30T20:00:00Z",
_57
"date_updated": "2015-07-30T20:00:00Z",
_57
"default_channel_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_57
"default_channel_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_57
"default_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_57
"friendly_name": "friendly_name",
_57
"limits": {
_57
"channel_members": 500,
_57
"user_channels": 600
_57
},
_57
"links": {
_57
"channels": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels",
_57
"users": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users",
_57
"roles": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Roles",
_57
"bindings": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings"
_57
},
_57
"notifications": {
_57
"log_enabled": true,
_57
"added_to_channel": {
_57
"enabled": false,
_57
"template": "notifications.added_to_channel.template"
_57
},
_57
"invited_to_channel": {
_57
"enabled": false,
_57
"template": "notifications.invited_to_channel.template"
_57
},
_57
"new_message": {
_57
"enabled": false,
_57
"template": "notifications.new_message.template",
_57
"badge_count_enabled": true
_57
},
_57
"removed_from_channel": {
_57
"enabled": false,
_57
"template": "notifications.removed_from_channel.template"
_57
}
_57
},
_57
"post_webhook_url": "https://hooks.yoursite.com/post-webhooks",
_57
"pre_webhook_url": "https://hooks.yoursite.com/pre-webhooks",
_57
"pre_webhook_retry_count": 2,
_57
"post_webhook_retry_count": 3,
_57
"reachability_enabled": false,
_57
"read_status_enabled": false,
_57
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_57
"typing_indicator_timeout": 100,
_57
"url": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_57
"webhook_filters": [
_57
"webhook_filters"
_57
],
_57
"webhook_method": "POST",
_57
"media": {
_57
"size_limit_mb": 150,
_57
"compatibility_message": "new media compatibility message"
_57
}
_57
}

Enable All Service-level Chat Webhooks

enable-all-service-level-chat-webhooks page anchor

To stop receiving webhooks for a particular event, omit that event from the set of WebhookFilters provided here. Only remaining filters will be triggered.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_12
// Download the helper library from https://www.twilio.com/docs/node/install
_12
// Find your Account SID and Auth Token at twilio.com/console
_12
// and set the environment variables. See http://twil.io/secure
_12
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12
const authToken = process.env.TWILIO_AUTH_TOKEN;
_12
const client = require('twilio')(accountSid, authToken);
_12
_12
client.chat.v2.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.update({
_12
webhookFilters: ['onMessageSent', 'onMessageSend', 'onMessageUpdate', 'onMessageUpdated', 'onMessageRemove', 'onMessageRemoved', 'onChannelAdd', 'onChannelAdded', 'onChannelDestroy', 'onChannelDestroyed', 'onChannelUpdate', 'onChannelUpdated', 'onMemberAdd', 'onMemberAdded', 'onMemberRemove', 'onMemberRemoved', 'onUserUpdate', 'onUserUpdated']
_12
})
_12
.then(service => console.log(service.friendlyName));

Output

_74
{
_74
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_74
"consumption_report_interval": 100,
_74
"date_created": "2015-07-30T20:00:00Z",
_74
"date_updated": "2015-07-30T20:00:00Z",
_74
"default_channel_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_74
"default_channel_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_74
"default_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_74
"friendly_name": "friendly_name",
_74
"limits": {
_74
"channel_members": 500,
_74
"user_channels": 600
_74
},
_74
"links": {
_74
"channels": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels",
_74
"users": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users",
_74
"roles": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Roles",
_74
"bindings": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings"
_74
},
_74
"notifications": {
_74
"log_enabled": true,
_74
"added_to_channel": {
_74
"enabled": false,
_74
"template": "notifications.added_to_channel.template"
_74
},
_74
"invited_to_channel": {
_74
"enabled": false,
_74
"template": "notifications.invited_to_channel.template"
_74
},
_74
"new_message": {
_74
"enabled": false,
_74
"template": "notifications.new_message.template",
_74
"badge_count_enabled": true
_74
},
_74
"removed_from_channel": {
_74
"enabled": false,
_74
"template": "notifications.removed_from_channel.template"
_74
}
_74
},
_74
"post_webhook_url": "post_webhook_url",
_74
"pre_webhook_url": "pre_webhook_url",
_74
"pre_webhook_retry_count": 2,
_74
"post_webhook_retry_count": 3,
_74
"reachability_enabled": false,
_74
"read_status_enabled": false,
_74
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_74
"typing_indicator_timeout": 100,
_74
"url": "https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_74
"webhook_filters": [
_74
"onMessageSent",
_74
"onMessageSend",
_74
"onMessageUpdate",
_74
"onMessageUpdated",
_74
"onMessageRemove",
_74
"onMessageRemoved",
_74
"onChannelAdd",
_74
"onChannelAdded",
_74
"onChannelDestroy",
_74
"onChannelDestroyed",
_74
"onChannelUpdate",
_74
"onChannelUpdated",
_74
"onMemberAdd",
_74
"onMemberAdded",
_74
"onMemberRemove",
_74
"onMemberRemoved",
_74
"onUserUpdate",
_74
"onUserUpdated"
_74
],
_74
"webhook_method": "webhook_method",
_74
"media": {
_74
"size_limit_mb": 150,
_74
"compatibility_message": "new media compatibility message"
_74
}
_74
}


Webhook Bodies by Event Type

webhook-bodies page anchor

When Twilio makes an HTTP request to your server, it will include contextual information related to the action that triggered the WebHook call to your backend.

In addition to the event-specific parameters, each request will also contain the following parameters and information:

parameter nametypedescription
AccountSidstring, SIDThe Twilio Account SID which the Service instance belongs to
InstanceSidstring, sidThe Programmable Chat Service instance SID which the action relates to
ClientIdentitystringThe identity string of the SDK client endpoint that triggered the event callback (as taken from the Access Token for the client endpoint).

Note: Each HTTP request is issued with the Content-Type header application/x-www-urlencoded.

Pre-Event Webhook Bodies

webhook-bodies-pre-event page anchor
parameter nametypedescription
EventTypestringAlways onMessageSend
ChannelSidstringChannel SID identifier of the Channel the Message is being sent to
BodystringThe body of message
Attributesstring, optional, valid JSON structure or nullA JSON structure contained in a string. This can be null if attributes are not present in message entity.
FromstringThe author of the message
DateCreateddate stringThe timestamp of creation of the message (DEPRECATED)
TostringChannel String Identifier of the Channel the Message is being sent to (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onMessageRemove
MessageSidstringThe Message SID
ChannelSidstringSID identifier of the Channel the Message is being sent to
BodystringThe body of message
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in message entity.
FromstringThe author of the message
DateCreateddate stringThe timestamp from message creation
RemovedBystringThe remover of the message
TostringChannel String Identifier of the Channel the Message is being sent to (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onMessageUpdate
MessageSidstringThe Message SID
ChannelSidstringSID identifier of the Channel the Message is being sent to
BodystringThe body of message
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in message entity
FromstringThe author of the message
DateCreateddate stringThe timestamp from message creation
ModifiedBystringThe updater/modifier of the message
TostringChannel String Identifier of the Channel the Message is being sent to (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onMediaMessageSend
ChannelSidstringChannel SID identifier of the Channel the Message is being sent to
BodystringThe body of message
Attributesstring, optional, valid JSON structure or nullA JSON structure contained in a string. This can be null if attributes are not present in message entity.
FromstringThe author of the message
MediaFilenamestringThe filename of the underlying media file as specified when uploaded
MediaContentTypestringThe MIME type of the file this media represents.
MediaSidstringMedia SID identifier
MediaSizeintMedia size in bytes
DateCreateddate stringThe timestamp of creation of the message (DEPRECATED)
TostringChannel String Identifier of the Channel the Message is being sent to (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onChannelAdd
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in channel entity
CreatedBystringThe identity of the user that created a channel
FriendlyNamestring, optionalThe friendly name of the channel, if set
UniqueNamestring, optionalThe unique name of the channel, if set
ChannelTypestringThe Channel type. Either private or public
DateCreateddate stringThe date of creation of the channel (DEPRECATED)
Namestring, optionalThe friendly name of the channel, if set (DEPRECATED)
ChannelSidstringChannel String Identifier (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onChannelDestroy
ChannelSidstringChannel String Identifier
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in channel entity
DateCreatedstringThe date of creation of the channel
CreatedBydate stringThe identity of the user that created a channel
FriendlyNamestring, optionalThe friendly name of the channel, if set
UniqueNamestring, optionalThe unique name of the channel, if set
ChannelTypestringThe Channel type. Either private or public
Namestring, optionalThe friendly name of the channel, if set (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onChannelUpdate
ChannelSidstringChannel String Identifier
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in channel entity.
DateCreateddate string,The date of creation of the channel
CreatedBystringThe identity of the user that created a channel
FriendlyNamestring, optionalThe friendly name of the channel, if set
UniqueNamestring, optionalThe unique name of the channel, if set
Namestring, optionalThe friendly name of the channel, if set (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onMemberAdd
ChannelSidstringChannel String Identifier
IdentitystringThe Identity of the User being added to the channel as a Member
RoleSidstring, optionalThe Role SID of added member
ReasonstringThe reason for the addition of the member. Could be: ADDED or JOINED
Rolestring, optionalThe role of added member (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onMemberRemove
ChannelSidstringChannel String Identifier
IdentitystringThe Identity of the User being removed from the channel
MemberSidstringThe member SID of member being removed
RoleSidstring, optionalThe role of removed member
ReasonstringThe reason of the removal of the member. Could be: REMOVED or LEFT
Rolestring, optionalThe role of removed member (DEPRECATED)
parameter nametypedescription
EventTypestringAlways onMemberUpdate
ChannelSidstringChannel String Identifier
IdentitystringThe Identity of the Member being updated
MemberSidstringThe member SID identifier
RoleSidstring, optionalThe role of updated member
DateCreatedstring, ISO8601 timeCreation date of member
AttributesJSON, string, optionalThe optional Attributes (if set) of the Member being updated as a JSON structure in string format
parameter nametypedescription
UserSidstring, SIDThe SID of the User about to be updated
EventTypestringAlways onUserUpdate
IdentitystringThe Identity of the User being updated
FriendlyNamestring, optionalThe optional (if set) FriendlyName of the User being updated
RoleSidstringThe Role SID the user being updated
DateCreatedstring, ISO8601 timeThe date and time of initial User creation
DateUpdatedstring, ISO8601 timeThe date and time the user was last updated
AttributesJSON, string, optionalThe optional Attributes (if set) of the User being updated as a JSON structure in string format.
IsOnlineboolean, optionaltrue if the user has an active session and can create and receive real-time events. This field is present only if the Reachability Indicator feature is enabled for the Service instance.
IsNotifiableboolean, optionaltrue if the user has an active session and can create and receive push notifications. This field is present only if the Reachability Indicator and Push Notifications features are enabled for the Service instance. The User must have at least one Push Notification registration for Chat.

Post-Event Webhook Bodies

webhook-bodies-post-event page anchor
parameter nametypedescription
EventTypestringAlways onMessageSent
MessageSidstringThe Message SID of the new Message
IndexintThe index of the Message within the Channel Message list
ChannelSidstringChannel SID identifier of the Channel the Message is being sent to
BodystringThe body of the message
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in message entity
FromstringThe author of the message
DateCreateddate stringThe timestamp of message creation
parameter nametypedescription
EventTypestringAlways onMessageRemoved
MessageSidstringThe Message SID of the removed Message
IndexintThe index of the removed Message within the Channel Message list
ChannelSidstringThe SID identifier of the Channel the Message is being sent to
BodystringThe body of message
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in message entity
FromstringThe author of the message
RemovedBystringThe remover of the message
DateCreateddate stringThe timestamp of message creation
DateRemoveddate stringThe timestamp of removal of the message
parameter nametypedescription
EventTypestringAlways onMessageUpdated
MessageSidstringThe Message SID of the updated Message
IndexintThe index of the updated Message within the Channel Message list
ChannelSidstringSID identifier of the Channel the Message is being sent to
BodystringThe body of message
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in message entity
FromstringThe author of the message
ModifiedBystringThe identity of the user that updated the message
DateCreateddate stringThe timestamp of message creation
DateUpdateddate stringThe timestamp of update of the message
parameter nametypedescription
EventTypestringAlways onMediaMessageSent
MessageSidstringThe Message SID of the new Message
IndexintThe index of the Message within the Channel Message list
ChannelSidstringChannel SID identifier of the Channel the Message is being sent to
BodystringThe body of the message
Attributesstring, optional, valid JSON structure or nullStringified JSON structure. This can be null if attributes are not present in message entity
FromstringThe author of the message
DateCreateddate stringThe timestamp of message creation
MediaFilenamestringThe filename of the underlying media file as specified when uploaded
MediaContentTypestringThe MIME type of the file this media represents.
MediaSidstringMedia SID identifier
MediaSizeintMedia size in bytes
parameter nametypedescription
EventTypestringAlways onChannelAdded
ChannelSidstringThe SID of the newly added Channel
Attributesstring, optional, JSON structureThe arbitrary JSON structure of the channel
DateCreateddate stringThe date of channel creation
CreatedBystringThe identity of the user that created a channel
FriendlyNamestring, optionalThe friendly name of the channel, if set
UniqueNamestring, optionalThe unique name of the channel, if set
ChannelTypestringThe Channel type. Either private or public
parameter nametypedescription
EventTypestringAlways onChannelDestroyed
ChannelSidstringChannel String Identifier
Attributesstring, optional, JSON structureThe arbitrary JSON structure of the channel
DateCreateddate string,The date of creation of the channel
DateDestroyeddate string,The date of destruction of the channel
CreatedBystringThe identity of the user that created a channel
FriendlyNamestring, optionalThe friendly name of the channel, if set
UniqueNamestring, optionalThe unique name of the channel, if set
ChannelTypestringThe Channel type. Either private or public
parameter nametypedescription
EventTypestringAlways onChannelUpdated
ChannelSidstringChannel String Identifier
Attributesstring, optional, JSON structureThe arbitrary JSON structure of the channel
DateCreateddate string,The date of creation of the channel
DateUpdateddate stringThe date of update of the channel
CreatedBystringThe identity of the user that created a channel
FriendlyNamestring, optionalThe friendly name of the channel, if set
UniqueNamestring, optionalThe unique name of the channel, if set
ChannelTypestringThe Channel type. Either private or public
parameter nametypedescription
EventTypestringAlways onMemberAdded
MemberSidstringThe Member SID of the newly added Member
ChannelSidstringChannel String Identifier
IdentitystringThe Identity of the User being added to the channel as a Member
RoleSidstring, optionalThe Role SID of added member
ReasonstringThe reason for the addition of the member. Could be ADDED or JOINED
DateCreateddate stringThe date of Member addition
parameter nametypedescription
EventTypestringAlways onMemberRemoved
ChannelSidstringChannel String Identifier
IdentitystringThe Identity of the User being removed from the channel
MemberSidstringThe Member SID of member being removed
RoleSidstring, optionalThe role of removed member
ReasonstringThe reason for the removal of the member. Could be REMOVED or LEFT
DateCreateddate stringThe date of Member addition
DateRemoveddate stringThe date of Member removal
parameter nametypedescription
EventTypestringAlways onMemberUpdated
ChannelSidstringChannel String Identifier
IdentitystringThe Identity of the updated member
MemberSidstringThe member SID identifier
RoleSidstring, optionalThe role of updated member
DateCreatedstring, ISO8601 timeCreation date of member
DateUpdatedstring, ISO8601 timeThe date when member was last updated
AttributesJSON, string, optionalThe optional Attributes (if set) of the Member being updated as a JSON structure in string format
LastConsumedMessageIndexint, optionalIndex of the last consumed message by the member
parameter nametypedescription
UserSidstring, SIDThe SID of the User that was updated.
EventTypestringAlways onUserUpdated
IdentitystringThe Identity of the User that was updated
FriendlyNamestring, optionalThe optional FriendlyName (if set) of the updated User
RoleSidstringThe Role SID the User that was updated
DateCreatedstring, ISO8601 timeThe date and time the User was first created
DateUpdatedstring, ISO8601 timeThe date and time the User was updated
AttributesJSON, string, optionalThe optional Attributes of the updated user (if set). JSON structure in string format.
IsOnlineboolean, optionaltrue if the user has an active session and can create and receive real-time events. This field is present only if Reachability Indicator feature is enabled for the Service instance.
IsNotifiableboolean, optionaltrue if the user has an active session and can create and receive push notifications. This field is present only if the Reachability Indicator and Push Notifications features are enabled for the Service instance. The User must also have at least one Push Notification registration for Chat.
parameter nametypedescription
UserSidstring, SIDThe SID of the User that was updated.
EventTypestringAlways onUserAdded
IdentitystringThe Identity of the User that was updated
FriendlyNamestring, optionalThe optional FriendlyName (if set) of the updated User
RoleSidstringThe Role SID the User that was updated
DateCreatedstring, ISO8601 timeThe date and time the User was first created
AttributesJSON, string, optionalThe optional Attributes of the updated user (if set). JSON structure in string format.

Rate this page: