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

Proactive Chat

Copy link

With Proactive chats, agents can send a message to your customer first. You can utilize proactive chats to send marketing or announcement messages to a specific customer. When a customer replies to an agent’s message, the proactive chat automatically changes to a general ticket and is assigned to an available agent within a ticket’s team based on auto ticket routing.


Resource Representation

Copy link

Here's what a Proactive Chat resource looks like:

Property nameTypeDescription

id

int

The unique ID of the proactive chat.

project

int

The unique ID of a Desk project where the chat belongs.

message

string

The content of the message.

messageCount

int

The count of messages within the chat.

createdBy

object

Information about the agent who created the chat.

assignedGroup

object

Information about the group where the chat is assigned.

sentCount

int

The number of chats sent out.

respondedCount

int

The number of chats that received responses.

closedCount

int

The number of chats that have been closed/resolved.

customersList

string

A string representation of customer IDs included in the chat.

createdAt

string

The date time when the proactive chat was created, in ISO 8601 format.

updatedAt

string

The last time the proactive chat was updated, in ISO 8601 format.

priority

string

The priority of the proactive chat. Valid values are LOW, MEDIUM, HIGH, URGENT.


Actions

Copy link
  • Endpoints are relative to the base URL allocated to your application. In this document, the /proactive_chats endpoint is prefixed by https://desk-api-{application_id}.sendbird.com/platform/v1.

  • It is recommended to urlencode parameter values in API URLs, such as {proactive_id}.

List of Actions

Copy link
ActionHTTP request

Create Proactive Chat

POST /proactive_chats
Initiates a new Proactive Chat.

Get Proactive Chat

GET /proactive_chats/{proactive_id}
Retrieves information about a specific Proactive Chat.

List Tickets of Proactive Chat

GET /proactive_chats/{proactive_id}/tickets
Retrieves a list of tickets of the Proactive Chat.

Send a follow-up message

POST /proactive_chats/{proactive_id}/tickets/{ticket_id}/follow_up_message
Send a follow-up message for a ticket of a specific Proactive Chat.


Create Proactive Chat

Copy link

Initiates a new Proactive Chat with customers.

HTTP Request

Copy link
POST https://desk-api-{application_id}.sendbird.com/platform/v1/proactive_chats

Request Body

Copy link

Include the following properties in your request body:

Properties
RequiredTypeDescription

message

string

The content of the message you want to send in the Proactive Chat.

groupKey

string

The key of the group where the chat should be assigned.

customerIds

list[int]

A list of customer IDs to start the chat with.

agentId

int

The ID of the agent who will be handling the chat.

OptionalTypeDescription

priority

string

The priority level of the chat: LOW, MEDIUM, HIGH, URGENT. (Default: MEDIUM)

Successful Response

Copy link

If successful, this action returns a JSON representation of the created Proactive Chat in the response body.


Get Proactive Chat

Copy link

Retrieves information about a specific Proactive Chat.

HTTP Request

Copy link
GET https://desk-api-{application_id}.sendbird.com/platform/v1/proactive_chats/{proactive_id}

Parameters

Copy link

Include the {proactive_id} parameter in the URL path.

Required
Parameter nameTypeDescription

proactive_id

int

The ID of the specific Proactive Chat.

Request Body

Copy link

No request body needed.

Successful Response

Copy link

If successful, the server returns the Proactive Chat resource as a JSON object in the response body.


List tickets of Proactive Chat

Copy link

Retrieves a list of tickets of the Proactive Chat.

HTTP Request

Copy link
GET https://desk-api-{application_id}.sendbird.com/platform/v1/proactive_chats/{proactive_id}/tickets

Parameters

Copy link

Include the following parameters in the request:

Parameters
RequiredTypeDescription

proactive_id

int

The ID of the specific Proactive Chat.

OptionalTypeDescription

limit

int

Number of results to return per page.

offset

int

The initial index from which to return the results.

Successful Response

Copy link

If successful, this action returns a list of ticket resources that were initiated by a Proactive Chat as a JSON object in the response body.


Send a follow-up message

Copy link

Send a follow-up message to a specific Proactive Chat ticket.

HTTP Request

Copy link
POST https://desk-api-{application_id}.sendbird.com/platform/v1/proactive_chats/{proactive_id}/tickets/{ticket_id}/follow_up_message

Parameters

Copy link

Include the following parameters in the request:

Required
Parameter nameTypeDescription

proactive_id

int

The ID of the specific Proactive Chat.

ticket_id

int

The ID of the specific ticket of the Proactive Chat.

Request Body

Copy link

Include the following properties in your request body:

Required
Property nameTypeDescription

message

string

The content of the follow-up message.

Successful Response

Copy link

If successful, this action returns a JSON representation of the follow-up message in the response body.