Desk Platform API v1
Desk Platform API
Desk Platform API
Version 1

Webhooks

Copy link

With webhooks turned on in your Sendbird application, your server will receive HTTP POST requests from Sendbird server in the form of the response containing information on all events that occur within the application.

The webhooks can be useful when you build your own custom notification service, such as a SMS notification or an email system for your offline users.


Configuration

Copy link

You can configure a webhook endpoint URL and other settings on the Settings > Desk > Webhooks on the Sendbird Dashboard.


Webhook endpoint requirements

Copy link

HTTP POST requests with JSON payloads are sent to your webhook endpoint upon specific events in your Sendbird application.

  • The endpoint must support HTTP/1.1 and keep-alive.
  • The endpoint needs to respond to POST requests.
  • The endpoint needs to parse JSON payloads.

By default, Sendbird server sends an HTTP POST request and waits for a response from your webhook endpoint for 1 second. The server sends the same POST request up to three times until it receives a response. To avoid too many requests, you should implement the endpoint to respond immediately to the server with a 200 OK response.

Note: When you need a process or function which handles webhook payloads, it should be implemented to be executed asynchronously from that of which responds to the server. If they are executed synchronously, it can cause the endpoint to stop working properly when many events happen on your application.


Headers

Copy link

HTTP POST requests from Sendbird server will include the following headers.

content-type: application/json
x-hub-signature: {x_hub_signature}
...

x-hub-signature

Copy link

Used as a request header to ensure that the source of the request comes from Sendbird server and the request is not altered by external influences. Based on both the POST request body and your API token, the value of the x-hub-signature starting with sha1= is generated by SHA-1 encryption on the Sendbird server side. To verify the request on your server side, create a comparison value exactly the same way as Sendbird server does, and then check if the result is equal to the value of the x-hub-signature.

# Python sample: how to check the x-hub-signature header value

secret_key = bytes(secret_key, 'utf‐8')
http_request_body = bytes(http_request_body, 'utf‐8')
x_hub_signature_for_comparison = 'sha1=' + hmac.new(secret_key, http_request_body, hashlib.sha1).hexdigest()
assert signature_to_compare == 'x_hub_signature'   # Check if the value of the 'x-hub-signature' request header is the same as the comparison value you've created.

Data structure

Copy link

All webhook events depend on the following data structure.

{
    "id": (Number),
    "eventType": (String),
    "dataType": (String),
    "createdAt": (String),
    "createdBy": (String),
    "project":{
        "id": (Number),
        "pid": (String)
    },
    "data": (Object)
}

List of properties

Copy link
Property nameTypeDescription

id

int

The unique ID of the webhook.

project

nested object

An object that contains information of the project.

project.id

int

The unique ID of the project which consists of integers.

project.pid

string

The unique ID of the project which consists of random characters.

eventType

string

The type of the event.

data

nested object

An object that contains information about the webhook.

dataType

string

The type of the data. Valid values are TICKET or AGENT_CONNECTION_LOG.

createdAt

string

The date and time when the webhook was created, in ISO 8601 format.

createdBy

String

The subject who created the webhook. Valid values are limited to the following:
- agent_{agent_id}: Indicates that the webhook is created by an agent whose ID is identical to the value of the agent_id.
- customer_{customer_id}: Indicates that the webhook is created by a customer whose ID is identical to the value of customer_id.
- system: Indicates that the webhook is created by Sendbird server.
- token_{masked_token}: Indicates that the webhook is created by Desk Platform API. The masked_token only shows the first 5 characters while remaining is replaced with asterisk (*) symbols.


Webhook events

Copy link

Ticket events

Copy link
EventTriggered when

TICKET.CREATED

A ticket is created.

TICKET.STATUS.UPDATED

The status of a ticket is updated.

TICKET.CLOSED

A ticket is closed.

TICKET.UPDATED

The information of a ticket is updated. This webhook is sent only when the customer satisfaction rating of the ticket is updated.

TICKET.MESSAGE.CLOSE_CONFIRMATION

An agent sends a confirmation request message to a customer for ticket closing.

TICKET.MESSAGE.CLOSE_CONFIRMATION.CONFIRMED

A customer agrees to close a ticket.

TICKET.MESSAGE.CLOSE_CONFIRMATION.DECLINED

A customer declines to close a ticket.

TRANSFER.CREATED

A ticket is transferred.

Agent's connection log events

Copy link
EventTriggered when

AGENT_CONNECTION_LOG.CREATED

A connection log is created due to a change of the connection status of an agent.


TICKET.CREATED

Copy link

The following shows a webhook payload of a TICKET.CREATED event.

{
    "id": 97627,
    "eventType": "TICKET.CREATED",
    "dataType": "TICKET",
    "createdAt": "2020-07-21T07:32:38.740534Z",
    "createdBy": "customer_1352",
    "project":{
        "id": 13,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data":{
        "id": 3351,
        "project": 13,
        "channelName": "Issue #818",
        "createdAt": "2020-07-21T07:32:38.669346Z",
        "channelUrl": "sendbird_group_channel_730883_973004c40cc0c881e603b61ba5dab3ce17a2a",
        "closedAt": null,
        "issuedAt": null,
        "durationTime": null,
        "pendingTime": 0,
        "conversationTime": 36838815,
        "customer": {
            "id": 680,
            "sendbirdId": "hi_duskan",
            "channelType": "SENDBIRD",
            "project": 13,
            "createdAt": "2020-03-12T05:25:35.055635Z",
            "memo": null,
            "displayName": "Duskan",
            "photoThumbnailUrl": "https://sendbird.com/main/img/profiles/profile_duskan.png",
            "customFields": []
        },
        "closeStatus": "NOT_CLOSED",
        "recentAssignment": {
            "id": 8177,
            "assignedTicket": 3351,
            "agent": {
                "id": 28,
                "displayName": "Angel_Mike",
                "project": 13,
                "user": 13,
                "sendbirdId": "sendbird_desk_agent_id_319bf388-3e97-4245-870e-2653f2e9ecb0",
                "role": "AGENT",
                "createdAt": "2020-07-12T05:30:35.504014Z",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "mike.angel@sendbird.com",
                "photoThumbnailUrl": "https://file.sendbird.com/profile_images/mike_vacation.png",
                "connectionUpdatedAt": "2020-08-13T04:31:28.653651Z",
                "tier": "EXPERT"
            },
            "assignedAt": "2020-07-21T06:52:55.993589Z",
            "responsedAt": "2020-07-21T06:53:02.526407Z",   // This property will be deprecated soon. Use `respondedAt` instead.
            "respondedAt": "2020-07-21T06:53:02.526407Z",
            "endedAt": "2020-07-21T07:16:14.995469Z",
            "status": "IDLE",
            "responseTime": 5
        },
        "closeComment": null,
        "info": "{\"ticket\":{\"subject\":\"Issue #818\",\"requester\":{\"name\":\"Duskan\",\"email\":\"hi_duskan\"}}}",
        "messageCount": null,
        "lastMessage": null,
        "lastMessageSender": "PLATFORM",
        "lastMessageAt": null,
        "lastMessageMembers": "[]",
        "updatedAt": "2020-07-21T07:32:38.669388Z",
        "lastMessagePayload": null,
        "firstAssignmentToCloseTime":null,
        "channelType": "SENDBIRD",
        "data": "{}",
        "lastSeenAt": 0,
        "group": {
            "id": 51,
            "name": "Sales",
            "key": null,
            "project": 13,
            "createdAt": "2019-06-20T04:57:58.743091Z",
            "createdBy": 27,
            "description": "Sales related tickets are assigned to this time."
        },
        "customFields": [],
        "customerSatisfactionScore": null,
        "customerSatisfactionComment": null,
        "priority": "URGENT",
        "priorityValue": 40,
        "status2": "INITIALIZED",
        "relatedChannels": null
    }
}

TICKET.STATUS.UPDATED

Copy link

The following shows a webhook payload of a TICKET.STATUS.UPDATED event.

{
    "id": 97627,
    "eventType": "TICKET.STATUS.UPDATED",
    "dataType": "TICKET",
    "createdAt": "2020-07-21T07:34:39.054563Z",
    "createdBy": "system",
    "project":{
        "id": 13,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data":{
        "id": 3351,
        "project": 13,
        "channelName": "Issue #818",
        "createdAt": "2020-07-21T07:32:38.669346Z",
        "channelUrl": "sendbird_group_channel_730883_973004c40cc0c881e603b61ba5dab3ce17a2a",
        "closedAt": null,
        "issuedAt": "2020-07-21T06:52:55.701744Z",
        "durationTime": 36898079,
        "pendingTime": 0,
        "conversationTime": 36838815,
        "customer": {
            "id": 680,
            "sendbirdId": "hi_duskan",
            "channelType": "SENDBIRD",
            "project": 13,
            "createdAt": "2020-03-12T05:25:35.055635Z",
            "memo": null,
            "displayName": "Duskan",
            "photoThumbnailUrl": "https://sendbird.com/main/img/profiles/profile_duskan.png",
            "customFields": []
        },
        "closeStatus": "NOT_CLOSED",
        "recentAssignment": {
            "id": 8177,
            "assignedTicket": 3351,
            "agent": {
                "id": 28,
                "displayName": "Angel_Mike",
                "project": 13,
                "user": 13,
                "sendbirdId": "sendbird_desk_agent_id_319bf388-3e97-4245-870e-2653f2e9ecb0",
                "role": "AGENT",
                "createdAt": "2020-03-12T05:30:35.504014Z",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "mike.angel@sendbird.com",
                "photoThumbnailUrl": "https://file.sendbird.com/profile_images/mike_vacation.png",
                "connectionUpdatedAt": "2020-08-13T04:31:28.653651Z",
                "tier": "EXPERT"
            },
            "assignedAt": "2020-07-21T06:52:55.993589Z",
            "responsedAt": "2020-07-21T06:53:02.526407Z",   // This property will be deprecated soon. Use `respondedAt` instead.
            "respondedAt":  "2020-07-21T06:53:02.526407Z",
            "endedAt": "2020-07-21T07:16:14.995469Z",
            "status": "IDLE",
            "responseTime": 5
        },
        "closeComment": null,
        "info": "{\"ticket\":{\"subject\":\"Issue #818\",\"requester\":{\"name\":\"Duskan\",\"email\":\"hi_duskan\"}}}",
        "messageCount": 1,
        "lastMessage": "Hi, what can I do for you?",
        "lastMessageSender": "AGENT",
        "lastMessageAt": "2020-07-21T07:32:40.278000Z",
        "lastMessageMembers": "[]",
        "updatedAt": "2020-07-21T07:32:40.447894Z",
        "lastMessagePayload": null,
        "firstAssignmentToCloseTime": null,
        "channelType": "SENDBIRD",
        "data": "{}",
        "lastSeenAt": 0,
        "group": {
            "id": 51,
            "name": "Sales",
            "key": null,
            "project": 13,
            "createdAt": "2019-06-20T04:57:58.743091Z",
            "createdBy": 27,
            "description": "Sales related tickets are assigned to this time."
        },
        "customFields": [],
        "customerSatisfactionScore": null,
        "customerSatisfactionComment": null,
        "priority": "URGENT",
        "priorityValue": 40,
        "status2": "ACTIVE",
        "relatedChannels": null
    }
}

TICKET.CLOSED

Copy link

The following shows a webhook payload of a TICKET.CLOSED event.

{
    "id": 97627,
    "eventType": "TICKET.CLOSED",
    "dataType": "TICKET",
    "createdAt": "2020-07-21T07:38:00.350778Z",
    "createdBy": "agent_1",
    "project":{
        "id": 13,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data":{
        "id": 3351,
        "project": 13,
        "channelName": "Issue #818",
        "createdAt": "2020-07-21T07:32:38.669346Z",
        "channelUrl": "sendbird_group_channel_730883_973004c40cc0c881e603b61ba5dab3ce17a2a",
        "closedAt": "2020-07-21T07:37:59.940971Z",
        "issuedAt": "2020-07-21T06:52:55.701744Z",
        "durationTime": 36898079,
        "pendingTime": 0,
        "conversationTime": 36838815,
        "customer": {
            "id": 680,
            "sendbirdId": "hi_duskan",
            "channelType": "SENDBIRD",
            "project": 13,
            "createdAt": "2020-03-12T05:25:35.055635Z",
            "memo": null,
            "displayName": "Duskan",
            "photoThumbnailUrl": "https://sendbird.com/main/img/profiles/profile_duskan.png",
            "customFields": []
        },
        "closeStatus": "CLOSED_BY_AGENT",
        "recentAssignment": {
            "id": 8177,
            "assignedTicket": 3351,
            "agent": {
                "id": 28,
                "displayName": "Angel_Mike",
                "project": 13,
                "user": 13,
                "sendbirdId": "sendbird_desk_agent_id_319bf388-3e97-4245-870e-2653f2e9ecb0",
                "role": "AGENT",
                "createdAt": "2020-03-12T05:30:35.504014Z",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "mike.angel@sendbird.com",
                "photoThumbnailUrl": "https://file.sendbird.com/profile_images/mike_vacation.png",
                "connectionUpdatedAt": "2020-08-13T04:31:28.653651Z",
                "tier": "EXPERT"
            },
            "assignedAt": "2020-07-21T06:52:55.993589Z",
            "responsedAt": "2020-07-21T06:53:02.526407Z",   // This property will be deprecated soon. Use `respondedAt` instead.
            "respondedAt": "2020-07-21T06:53:02.526407Z",
            "endedAt": "2020-07-21T07:16:14.995469Z",
            "status": "IDLE",
            "responseTime": 5
        },
        "closeComment": "",
        "info": "{\"ticket\":{\"subject\":\"Issue #818\",\"requester\":{\"name\":\"Duskan\",\"email\":\"hi_duskan\"}}}",
        "messageCount": 6,
        "lastMessage": "This ticket is assigned to Summer by the system.",
        "lastMessageSender": "PLATFORM",
        "lastMessageAt": "2020-07-21T07:34:39.261000Z",
        "lastMessageMembers": "[]",
        "updatedAt": "2020-07-21T07:34:39.381004Z",
        "lastMessagePayload": null,
        "firstAssignmentToCloseTime": 201,
        "channelType": "SENDBIRD",
        "data": "{}",
        "lastSeenAt": 0,
        "group": {
            "id": 51,
            "name": "Sales",
            "key": null,
            "project": 13,
            "createdAt": "2019-06-20T04:57:58.743091Z",
            "createdBy": 27,
            "description": "Sales related tickets are assigned to this time."
        },
        "customFields": [],
        "customerSatisfactionScore": null,
        "customerSatisfactionComment": null,
        "priority": "URGENT",
        "priorityValue": 40,
        "status2": "CLOSED",
        "relatedChannels": null
    }
}

TICKET.UPDATED

Copy link

The following shows a webhook payload of a TICKET.UPDATED event. This event is sent only when the customer satisfaction rating of the ticket is updated.

{
    "id":97651,
    "eventType": "TICKET.UPDATED",
    "dataType": "TICKET",
    "createdAt": "2020-07-21T07:32:38.669346Z",
    "createdBy": "customer_1352",
    "project": {
        "id": 23,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data":{
        "id": 9216,
        "project": 23,
        "channelName": "Issue #965",
        "createdAt": "2020-07-21T07:32:38.669346Z",
        "channelUrl": "sendbird_group_channel_7444658_3ac1def0229e9a0806ce68a4ccc48f2b589dec89",
        "closedAt": "2020-07-21T07:41:41.977985Z",
        "issuedAt": "2020-07-21T07:32:40.456084Z",
        "durationTime": 541,
        "customer": {
            "id": 1352,
            "sendbirdId": "tester",
            "project": 23,
            "createdAt": "2019-12-30T01:36:40.711650Z",
            "memo": null,
            "displayName": "tester",
            "channelType": "SENDBIRD",
            "photoThumbnailUrl": "https://static.sendbird.com/sample/profiles/profile_15_512px.png",
            "customFields": [
                {
                    "id": 240,
                    "key": "customer-string",
                    "value": ""
                }
            ]
    },
    "closeStatus": "CLOSED_BY_CUSTOMER",
    "recentAssignment": {
        "id": 8990,
        "assignedTicket": 9216,
        "agent": {
            "id":107,
            "displayName": "e2e-desk-agent-b2",
            "project": 23,
            "user": 28,
            "sendbirdId": "sendbird_desk_agent_id_5b34cb6f-8990-4556-987a-128c9eb70f9d",
            "role": "AGENT",
            "createdAt": "2020-01-27T14:18:14.922071Z",
            "status": "ACTIVE",
            "connection": "ONLINE",
            "email": "e2e-desk-agent-b2@sendbird.com",
            "photoThumbnailUrl": "",
            "connectionUpdatedAt": "2020-07-21T07:34:35.719899Z",
            "connectionUpdatedTs": 1595316875.719899,
            "groups": [
                {
                    "name": "Default team",
                    "key": null,
                    "id": 61
                },
                {
                    "name": "Team B",
                    "key": "teamb",
                    "id": 71
                }
            ],
            "tier":"INTERMEDIATE"
        },
        "assignedAt": "2020-07-21T07:41:13.653862Z",
        "responsedAt": null,    // This property will be deprecated soon. Use `respondedAt` instead.
        "respondedAt": null,
        "endedAt": "2020-07-21T07:41:41.977985Z",
        "status": "NOT_RESPONDED",
        "responseTime": null
        },
    "closeComment": "Automatically closed after `End of chat confirmed`.",
    "info": "{\"ticket\":{\"subject\":\"Issue #965\",\"requester\":{\"name\":\"tester\",\"email\":\"tester\"}}}",
    "messageCount": 10,
    "lastMessage": "How was your experience with us?",
    "lastMessageSender": "AGENT",
    "lastMessageAt": "2020-07-21T07:41:42.513000Z",
    "lastMessageMembers": "[]",
    "updatedAt": "2020-07-21T07:41:42.764046Z",
    "lastMessagePayload": null,
    "firstAssignmentToCloseTime": 423,
    "channelType": "SENDBIRD",
    "ticketType": "CUSTOMER_CHAT",
    "facebookPage": null,
    "twitterUser": null,
    "data": "{}",
    "lastSeenAt": 0,
    "group": {
        "id": 61,
        "name": "Default team",
        "key": null,
        "project": {...},
        "createdAt": "2019-12-30T04:57:58.855591Z",
        "createdBy": {
            "id": 92,
            "displayName": "e2e",
            "project": 23,
            "user": 12,
            "sendbirdId": "sendbird_desk_agent_id_087b4bef-123d-41aa-bb09-e78436d7dcb6",
            "role": "ADMIN",
            "createdAt": "2019-12-30T01:35:07.009898Z",
            "status": "ACTIVE",
            "connection": "OFFLINE",
            "email": "e2e@sendbird.com",
            "photoThumbnailUrl": "",
            "connectionUpdatedAt": null,
            "connectionUpdatedTs": null,
            "groups": [],
            "tier": "INTERMEDIATE"
        },
        "description": "Agents are added to this team as default. You can assign agents to other teams.",
        "memberCount": 6
    },
    "customFields": [],
    "customerSatisfactionScore": 5,
    "customerSatisfactionComment": "Great!",
    "priority": "MEDIUM",
    "priorityValue": 20,
    "instagramUser": null,
    "firstResponseTime": null,
    "status2": "CLOSED",
    "relatedChannels": null,
    "tags": []
}

TICKET.MESSAGE.CLOSE_CONFIRMATION

Copy link

The following shows a webhook payload of a TICKET.MESSAGE.CLOSE_CONFIRMATION event.

{
    "id": 142585,
    "eventType": "TICKET.MESSAGE.CLOSE_CONFIRMATION",
    "dataType": "TICKET",
    "createdAt": "2021-01-18T06:26:21.845275Z",
    "createdBy": "Cindy Kim",
    "project": {
        "id": 23,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data": {
        "id": 154413,
        "project": 23,
        "channelName": "Issue #807",
        "createdAt": "2021-01-18T06:26:03.913877Z",
        "channelUrl": "sendbird_group_channel_7444658_91c9b336b993ef6b4b4e82db9880e6aa45b03112",
        "closedAt": null,
        "issuedAt": "2021-01-18T06:26:06.235698Z",
        "durationTime": null,
        "pendingTime": 0,
        "conversationTime": null,
        "customer": {
            "id": 1352,
            "sendbirdId": "Solee",
            "project": 23,
            "createdAt": "2019-12-30T01:36:40.711650Z",
            "memo": null,
            "displayName": "Soleeee",
            "channelType": "Shoes",
            "photoThumbnailUrl": "https://static.sendbird.com/sample/profiles/profile_15_512px.png",
            "customFields": [
                {
                    "id": 240,
                    "key": "gender",
                    "value": "male"
                },
                ... # More custom fields
            ]
        },
        "status": "ASSIGNED",
        "closeStatus": "NOT_CLOSED",
        "recentAssignment": {
            "id": 56243,
            "assignedTicket": 154413,
            "agent": {
                "id": 238,
                "displayName": "Cindy Kim",
                "role": "ADMIN",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "cindy.kim@sendbird.com",
                "photoThumbnailUrl": "",
                "tier": "INTERMEDIATE",
                "phoneNumber": null
            },
            "assignedAt": "2021-01-18T06:26:06.662092Z",
            "responsedAt": null,    // This property will be deprecated soon. Use `respondedAt` instead.
            "respondedAt": null,
            "endedAt": null,
            "status": "NOT_RESPONDED",
            "unreadCount": 1,
            "responseTime": null
        },
        "closeComment": null,
        "info": "{\"ticket\":{\"subject\":\"Issue #457\",\"requester\":{\"name\":\"tester\",\"email\":\"tester\"}}}",
        "messageCount": 1,
        "lastMessage": "The ticket is automatically assigned to Cindy Kim.",
        "lastMessageSender": "PLATFORM",
        "lastMessageAt": "2021-01-18T06:26:06.921000Z",
        "lastUserMessageSender": "CUSTOMER",
        "lastUserMessageAt": "2021-01-18T06:26:05.969000Z",
        "lastMessageMembers": "[]",
        "updatedAt": "2021-01-18T06:26:06.997663Z",
        "lastMessagePayload": null,
        "firstAssignmentToCloseTime": null,
        "isWip": false,
        "wipUpdatedAt": null,
        "channelType": "SENDBIRD",
        "ticketType": "CUSTOMER_CHAT",
        "facebookPage": null,
        "twitterUser": null,
        "data": "{}",
        "lastSeenAt": 0,
        "group": {
            "id": 61,
            "name": "CS team",
            "key": null,
            "project": 23,
            "createdAt": "2019-12-30T04:57:58.855591Z",
            "createdBy": 92,
            "description": "Customer service team.",
            "memberCount": 9
        },
        "customFields": [
            ... # More custom fields
        ],
        "customerSatisfactionScore": null,
        "customerSatisfactionComment": null,
        "priority": "MEDIUM",
        "priorityValue": 20,
        "instagramUser": null,
        "nexmoAccount": null,
        "firstResponseTime": null,
        "status2": "ACTIVE",
        "relatedChannels": null,
        "tags": [
            ... # More tags
        ],
        "lastAssignedAgentId": 238
    }
}

TICKET.MESSAGE.CLOSE_CONFIRMATION.CONFIRMED

Copy link

The following shows a webhook payload of a TICKET.MESSAGE.CLOSE_CONFIRMATION.CONFIRMED event.

{
    "id": 142622,
    "eventType": "TICKET.MESSAGE.CLOSE_CONFIRMATION.CONFIRMED",
    "dataType": "TICKET",
    "createdAt": "2021-01-18T06:31:28.362807Z",
    "createdBy": "customer_1352",
    "project": {
        "id": 23,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data": {
        "id": 154413,
        "project": 23,
        "channelName": "Issue #620",
        "createdAt": "2021-01-18T06:26:03.913877Z",
        "channelUrl": "sendbird_group_channel_7444658_91c9b336b993ef6b4b4e82db9880e6aa45b03112",
        "closedAt": "2021-01-18T06:31:28.269506Z",
        "issuedAt": "2021-01-18T06:26:06.235698Z",
        "durationTime": 322,
        "pendingTime": 0,
        "conversationTime": 319,
        "customer": {
            "id": 1352,
            "sendbirdId": "julia",
            "project": 23,
            "createdAt": "2019-12-30T01:36:40.711650Z",
            "memo": null,
            "displayName":"Julia Song",
            "channelType": "Clothes",
            "photoThumbnailUrl": "https://static.sendbird.com/sample/profiles/profile_15_512px.png",
            "customFields": [
                {
                    "id": 240,
                    "key": "gender",
                    "value": "female"
                },
                ... # More custom fields
            ]
        },
        "status": "CLOSED",
        "closeStatus": "CLOSED_BY_CUSTOMER",
        "recentAssignment": {
            "id": 56246,
            "assignedTicket": 154413,
            "agent": {
                "id": 238,
                "displayName": "Cindy Kim",
                "role": "ADMIN",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "cindyyyy@sendbird.com",
                "photoThumbnailUrl": "",
                "tier": "INTERMEDIATE",
                "phoneNumber": null
            },
            "assignedAt": "2021-01-18T06:30:35.767467Z",
            "responsedAt": null,    // This property will be deprecated soon. Use `respondedAt` instead.
            "respondedAt": null,
            "endedAt": "2021-01-18T06:31:28.269506Z",
            "status": "NOT_RESPONDED",
            "unreadCount": 0,
            "responseTime": null
        },
        "closeComment": "The customer agreed to close this ticket.",
        "info": "{\"ticket\":{\"subject\":\"Issue #457\",\"requester\":{\"name\":\"tester\",\"email\":\"tester\"}}}",
        "messageCount": 9,
        "lastMessage": "Has your issue been resolved?",
        "lastMessageSender": "AGENT",
        "lastMessageAt": "2021-01-18T06:31:25.846000Z",
        "lastUserMessageSender": "AGENT",
        "lastUserMessageAt": "2021-01-18T06:31:25.846000Z",
        "lastMessageMembers": "[]",
        "updatedAt": "2021-01-18T06:31:28.289720Z",
        "lastMessagePayload": null,
        "firstAssignmentToCloseTime": 321,
        "isWip": false,
        "wipUpdatedAt": null,
        "channelType": "Clothes",
        "ticketType": "CUSTOMER_CHAT",
        "facebookPage": null,
        "twitterUser": null,
        "data": "{}",
        "lastSeenAt": 0,
        "group": {
            "id": 61,
            "name": "Default team",
            "key": null,
            "project": 23,
            "createdAt": "2019-12-30T04:57:58.855591Z",
            "createdBy": 92,
            "description": "Agents are added to this team as default. You can assign agents to other teams.",
            "memberCount": 9
        },
        "customFields": [
            ... # More custom fields
        ],
        "customerSatisfactionScore": 5,
        "customerSatisfactionComment": "",
        "priority": "MEDIUM",
        "priorityValue": 20,
        "instagramUser": null,
        "nexmoAccount": null,
        "firstResponseTime": null,
        "status2": "CLOSED",
        "relatedChannels": null,
        "tags": [
            ... # More tags
        ],
        "lastAssignedAgentId": 238
    }
}

TICKET.MESSAGE.CLOSE_CONFIRMATION.DECLINED

Copy link

The following shows a webhook payload of a TICKET.MESSAGE.CLOSE_CONFIRMATION.DECLINED event.

{
    "id": 142618,
    "eventType": "TICKET.MESSAGE.CLOSE_CONFIRMATION.DECLINED",
    "dataType": "TICKET",
    "createdAt": "2021-01-18T06:30:43.075704Z",
    "createdBy": "Jeff",
    "project": {
        "id": 23,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data": {
        "id": 154413,
        "project": 23,
        "channelName": "Issue #555",
        "createdAt": "2021-01-18T06:26:03.913877Z",
        "channelUrl": "sendbird_group_channel_7444658_91c9b336b993ef6b4b4e82db9880e6aa45b03112",
        "closedAt": null,
        "issuedAt": "2021-01-18T06:26:06.235698Z",
        "durationTime": null,
        "pendingTime": 0,
        "conversationTime": 206,
        "customer": {
            "id": 1352,
            "sendbirdId": "Jeff",
            "project": 23,
            "createdAt": "2019-12-30T01:36:40.711650Z",
            "memo": null,
            "displayName": "Jeff Lim",
            "channelType": "Software",
            "photoThumbnailUrl": "https://static.sendbird.com/sample/profiles/profile_15_512px.png",
            "customFields": [
                {
                    "id": 240,
                    "key": "gender",
                    "value": "male"
                },
                ... # More custom fields
            ]
        },
        "status": "ASSIGNED",
        "closeStatus": "NOT_CLOSED",
        "recentAssignment": {
            "id": 56246,
            "assignedTicket": 154413,
            "agent": {
                "id": 238,
                "displayName": "Cindy",
                "role": "ADMIN",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "cindyyyy@sendbird.com",
                "photoThumbnailUrl": "",
                "tier": "INTERMEDIATE",
                "phoneNumber": null
            },
            "assignedAt": "2021-01-18T06:30:35.767467Z",
            "responsedAt": null,    // This property will be deprecated soon. Use `respondedAt` instead.
            "respondedAt": null,
            "endedAt": null,
            "status": "NOT_RESPONDED",
            "unreadCount": 0,
            "responseTime": null
        },
        "closeComment": "",
        "info": "{\"ticket\":{\"subject\":\"Issue #457\",\"requester\":{\"name\":\"tester\",\"email\":\"tester\"}}}",
        "messageCount": 8,
        "lastMessage": "Has your issue been resolved?",
        "lastMessageSender": "AGENT",
        "lastMessageAt": "2021-01-18T06:30:40.354000Z",
        "lastUserMessageSender": "AGENT",
        "lastUserMessageAt": "2021-01-18T06:30:40.354000Z",
        "lastMessageMembers": "[]",
        "updatedAt": "2021-01-18T06:30:40.740281Z",
        "lastMessagePayload": null,
        "firstAssignmentToCloseTime": 212,
        "isWip": false,
        "wipUpdatedAt": null,
        "channelType": "Software",
        "ticketType": "CUSTOMER_CHAT",
        "facebookPage": null,
        "twitterUser": null,
        "data": "{}",
        "lastSeenAt": 0,
        "group": {
            "id": 61,
            "name": "Default team",
            "key": null,
            "project": 23,
            "createdAt": "2019-12-30T04:57:58.855591Z",
            "createdBy": 92,
            "description": "Agents are added to this team as default. You can assign agents to other teams.",
            "memberCount": 9
        },
        "customFields": [
            ... # More custom fields
        ],
        "customerSatisfactionScore": 3,
        "customerSatisfactionComment": "",
        "priority": "MEDIUM",
        "priorityValue": 20,
        "instagramUser": null,
        "nexmoAccount": null,
        "firstResponseTime": null,
        "status2": "ACTIVE",
        "relatedChannels": null,
        "tags": [
            ... # More tags
        ],
        "lastAssignedAgentId": 238
    }
}

TRANSFER.CREATED

Copy link

The following shows a webhook payload of a TRANSFER.CREATED event.

{
    "id": 4723251,
    "eventType": "TRANSFER.CREATED",
    "dataType": "TRANSFER",
    "createdAt": "2022-01-06T08:37:15.539432Z",
    "createdBy": "Cindy",
    "project": {
        "id": 7,
        "pid": "6e747a9e-119e-4e0d-9b4c-22e43140052b"
    },
    "data": {
        "id": 1722,
        "fromAssignment": {
            "id": 405439,
            "assignedTicket": 1576693,
            "agent": {
                "id": 41,
                "displayName": "Cindy",
                "role": "AGENT",
                "status": "ACTIVE",
                "connection": "ONLINE",
                "email": "cindy.kim@sendbird.com",
                "photoThumbnailUrl": "",
                "tier": "EXPERT",
                "phoneNumber": null
            },
            "assignedAt": "2022-01-06T02:49:40.598090Z",
            "responsedAt": null,
            "respondedAt": null,
            "endedAt": "2022-01-06T08:37:15.505342Z",
            "status": "NOT_RESPONSED",
            "unreadCount": 1,
            "responseTime": null
        },
        "toAssignment": {
            "id": 405458,
            "assignedTicket": 1576693,
            "agent": {
                "id": 168,
                "displayName": "Duskan",
                "role": "AGENT",
                "status": "ACTIVE",
                "connection": "OFFLINE",
                "email": "duskannnn@sendbird.com",
                "photoThumbnailUrl": "",
                "tier": "EXPERT",
                "phoneNumber": null
            },
            "assignedAt": "2022-01-06T08:37:15.510552Z",
            "responsedAt": null,
            "respondedAt": null,
            "endedAt": null,
            "status": "NOT_RESPONSED",
            "unreadCount": 1,
            "responseTime": null
        },
        "memo": "escalation: password reset issue.",
        "createdAt": "2022-01-06T08:37:15.513406Z"
    }
}

AGENT_CONNECTION_LOG.CREATED

Copy link

The following shows a webhook payload of a AGENT_CONNECTION_LOG.CREATED event.

{
    "id": 97652,
    "eventType": "AGENT_CONNECTION_LOG.CREATED",
    "dataType": "AGENT_CONNECTION_LOG",
    "createdAt": "2020-07-21T07:44:01.288198Z",
    "createdBy": "token_ab123***********",
    "project": {
        "id": 13,
        "pid": "47895be2-5a6b-4dc4-bc63-c26c4b3330db"
    },
    "data": {
        "id": 1641,
        "agent": 107,
        "fromConnection": "ONLINE",
        "toConnection": "OFFLINE",
        "durationTime": null,
        "createdAt": "2020-07-21T07:44:01.243390Z",
        "createdBy": 107
    }
}