Home
/
Desk
/
Platform API

Ticket

With the Ticket API, you can manage inquiries from your customers. When a new ticket is submitted, your agents and customers can start a conversation within it.


Resource representation

The following table shows the list of properties in a ticket resource.

Property nameTypeDescription

id

int

The unique ID of the ticket.

project

int

The unique ID of a Desk project where the agent belongs. Desk projects have their own corresponding Sendbird application on a one-to-one basis.

channelName

string

The name of the ticket.

channelUrl

string

The channel URL of the ticket from Sendbird Chat platform. The value of tickets from social networks will be generated arbitrarily by Desk.

createdAt

string

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

closedAt

string

The date and time when the ticket was closed, in ISO 8601 format.

issuedAt

string

The date and time when the customer sent the first message, in ISO 8601 format.

durationTime

int

The time in seconds taken from a customer's first message to ticket closing.

pendingTime

int

The time in seconds taken from a customer's first message to ticket assignment.

conversationTime

int

The time in seconds taken from a customer's first message to the last message of the conversation.

customer

nested object

An object that contains the information of the customer.

status2

string

The status of the ticket. This property has been updated from the previous version status to be consistent with the ticket status on the Sendbird Dashboard. Valid values are limited to the following:
- INITIALIZED: tickets whose conversation has been started with welcome messages, but when there is no reply from the corresponding customer.
- PROACTIVE: tickets whose conversation has been started with proactive messages, but when there is no reply from the corresponding customer.
- PENDING: tickets that haven't been assigned to any agent yet.
- ACTIVE: tickets that are assigned to agents and under the interactions.
- CLOSED: closed tickets whose interaction between the agent and customer is ended.
- WORK_IN_PROGRESS: tickets that are yet to be closed for any number of reasons but which can be ACTIVE once the conversation between the agent and customer is started.
- IDLE: tickets whose customer hasn't replied for a set amount of time after the agent's last response.

closeStatus

string

The reason why the ticket has been closed. Valid values are limited to the following:
- NOT_CLOSED: indicates the ticket is not closed yet.
- CLOSED_BY_SYSTEM: indicates the ticket was closed by the API.
- CLOSED_BY_CUSTOMER: indicates the ticket was closed by the customer.
- CLOSED_BY_ADMIN: indicates the ticket was closed by an admin.
- CLOSED_BY_AGENT: indicates the ticket was closed by an agent.
- CLOSED_BUT_NOT_DEFINED (deprecated): indicates the closed ticket but the subject who closed it is unknown.

recentAssignment

nested object

The detailed information about the last assignment.

closeComment

string

The comment left for ticket closing.

closeMessage

string

The message for ticket closing, which is sent instead of the default closing message set in Settings > Triggers of your dashboard.

info

string

The information of a ticket such as subject and the requester given upon its creation.

messageCount

int

The total count of the messages in the ticket.

lastMessage

string

The last message of the ticket.

lastMessageSender

string

The sender of the last message. Valid values are CUSTOMER, AGENT, and PLATFORM.

lastMessageAt

string

The date and time when the last message was sent, in ISO 8601 format.

lastUserMessageSender

string

The sender of the last text message except for the admin messages from Desk Platform. Valid values are CUSTOMER and AGENT.

lastUserMessageAt

string

The date and time when the customer sent the last message, in ISO 8601 format.

updatedAt

string

The date and time when the ticket information was last updated, in ISO 8601 format.

firstAssignmentToCloseTime

int

The time in seconds taken from the first assignment of a ticket to ticket closing.

firstResponseTime

int

The time in seconds taken from a customer’s first message to an agent’s first response.

channelType

string

A channel type that indicates which channel the ticket belongs to. Valid values are SENDBIRD, SENDBIRD_IOS, SENDBIRD_ANDROID, SENDBIRD_JAVASCRIPT, FACEBOOK_CONVERSATION, FACEBOOK_FEED, TWITTER_STATUS, TWITTER_DIRECT_MESSAGE_EVENT, INSTAGRAM_COMMENT, and WHATSAPP_MESSAGE.

data

string

The information related to tickets from social networks.

lastSeenAt

int

The timestamp when the customer first read the last message in the ticket, in Unix millisecond. The value of 0 indicates the customer hasn't read the last message yet. This property is applicable for tickets from Facebook only.

group

nested object

The group which this ticket belongs to.

customFields[]

array

An array of key-value custom fields that indicates additional information about the ticket. This property can have up to 20 custom fields.

customerSatisfactionScore

int

The customer satisfaction score. Valid values are 1 to 5, inclusive.

customerSatisfactionComment

string

The feedback from a customer about the support within the ticket.

priority

string

The priority of the ticket. Valid values are URGENT, HIGH, MEDIUM, and LOW.

priorityValue

int

The priority value of the ticket. Higher values stand for higher priority. Valid values are 10, 20, 30, and 40, which can be set in increments of 10.

relatedChannel

nested object

The information of channels in Sendbird Chat platform that are related to this ticket.


Actions

  • API endpoints are relative to the base URL allocated to your application. In this page, the /tickets endpoint refers to https://desk-api-{application_id}.sendbird.com/platform/v1/tickets.

Note: If you want to know your application ID, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID.

  • It's recommended that the parameter values in API URLs be urlencoded, such as {ticket_id}.

List of actions

ActionHTTP request

List tickets

GET /tickets
Retrieves a list of tickets all tickets in the application.

View a ticket

GET /tickets/{ticket_id}
Retrieves information on a specific ticket.

Create a ticket

POST /tickets
Creates a ticket.

Update a ticket

PATCH /tickets/{ticket_id}
Updates a ticket's priority and URLs of the related channels.

Update custom fields of a ticket

PATCH /tickets/{ticket_id}/custom_fields
Updates custom fields of a specific ticket.

Close a ticket

PATCH /tickets/{ticket_id}/close
Closes a ticket.

Transfer tickets to a group

POST /tickets/transfer_to_group
Transfers tickets with a specific status to a specific team.

Cancel assignment of a ticket

PATCH /tickets/{ticket_id}/cancel
Cancels assignment of a specific ticket from an agent.


List tickets

Retrieves a list of all tickets in the application.

HTTP request

Light Color Skin
Copy
GET https://desk-api-{application_id}.sendbird.com/platform/v1/tickets

Parameters

The following table lists the parameters that this action supports.

Optional
Parameter nameTypeDescription

limit

int

Specifies the number of results to return per page. Acceptable values are 1 to 500, inclusive. (Default: 50)

offset

int

Specifies the number of results to skip before retrieving the next page in the result set. This is used to adjust the starting index of the next page. (Default: 0)

status2

string

Restricts the search scope to only retrieve tickets whose status matches the specified value. Acceptable values are limited to the following:
- INITIALIZED: tickets whose conversation has been started with welcome messages, but when there is no reply from the corresponding customer.
- PROACTIVE: tickets whose conversation has been started with proactive messages, but when there is no reply from the corresponding customer.
- PENDING: tickets that haven't been assigned to any agent yet.
- ACTIVE: tickets that are assigned to agents and under the interactions.
- CLOSED: closed tickets whose interaction between the agent and customer is ended.
- WORK_IN_PROGRESS: tickets that are yet to be closed for any number of reasons but which can be ACTIVE once the conversation between the agent and customer is started.
- IDLE: tickets whose customer hasn't replied for a set amount of time after the agent's last response.

agent

string

Specifies the unique ID of an agent to restrict the search scope to only retrieve tickets assigned to a specific agent.

sendbird_id

string

Restricts the search scope to only retrieve tickets submitted by a customer with a specified Sendbird ID.

q

string

Restricts the search scope to retrieve up to 100 tickets that match a specified keyword. The specified keyword is applied to the following: channel names, and customers' display names and Sendbird IDs. For example, q=cindy retrieves tickets whose channel name, or a customer's display name or Sendbird ID includes cindy.

assignment_status

string

Restricts the search scope to only retrieve tickets whose assignment status matches the specified value. Acceptable values are limited to the following:
- NOT_RESPONDED: tickets whose assignee hasn’t responded yet.
- RESPONDED: tickets whose assignee responded.
- IDLE: tickets whose assignee responded, but when there is no reply from the corresponding customer for a set amount of time. Once the customer replies, its assignment status will be changed to NOT_RESPONDED.

channel_url

string

Restricts the search scope to only retrieve tickets related to a specified channel URL.

start_date

date

Specifies a starting date that restricts the search scope to retrieve tickets created between start_date and end_date, in YYYY-MM-DD format.

end_date

date

Specifies an ending date that restricts the search scope to retrieve tickets created between start_date and end_date, in YYYY-MM-DD format.

order

string

Specifies the method to sort a list of results. Acceptable values are limited to the following:
- id (default): sorts by ticket ID in ascending order.
- -id: sorts by ticket ID in descending order.
- created_at: sorts by the time of ticket creation in ascending order.
- -created_at: sorts by the time of ticket creation in descending order.

Query string example
Light Color Skin
Copy
?limit=20&offset=40

Response

If successful, this action returns a list of ticket resources in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "count": 523,
    "previous": "https://desk-api-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx.sendbird.com/platform/v1/tickets?limit=20&offset=20",
    "next": "https://desk-api-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx.sendbird.com/platform/v1/tickets?limit=20&offset=60",
    "results":[
        {
            "id": 3351,
            "project": 13,
            "channelName": "Issue #818",
            "createdAt": "2020-03-21T06:52:51.374823Z",
            "channelUrl": "sendbird_group_channel_730883_973004c40cc0c881e603b61ba5dab3ce17a2a",
            "closedAt": "2020-03-21T07:16:14.995451Z",
            "issuedAt": "2020-03-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_ADMIN",
            "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-03-21T06:52:55.993589Z",
                "responsedAt": "2020-03-21T06:53:02.526407Z",   // This property will be deprecated soon. Use `respondedAt` instead.
                "respondedAt": "2020-03-21T06:53:02.526407Z",
                "endedAt": "2020-03-21T07:16:14.995469Z",
                "status": "IDLE",
                "responseTime": 5
            },
            "closeComment": "This idle ticket has been closed automatically by Sendbird Desk",
            "info": "{\"ticket\":{\"subject\":\"Issue #818\",\"requester\":{\"name\":\"Duskan\",\"email\":\"hi_duskan\"}}}",
            "messageCount": 6,
            "lastMessage": "This ticket is closed by sbdesk.",
            "lastMessageSender": "PLATFORM",
            "lastMessageAt": "2020-03-21T07:16:15.385722Z",
            "lastUserMessageSender": "AGENT",
            "lastUserMessageAt": "2020-03-21T07:14:11.284000Z",
            "lastMessageMembers": "[]",
            "updatedAt": "2020-02-14T02:16:57.646078Z",
            "lastMessagePayload": null,
            "firstAssignmentToCloseTime": 1399,
            "firstResponseTime": 590484,
            "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 assinged to this time."
            },
            "customFields": [],
            "customerSatisfactionScore": null,
            "customerSatisfactionComment": null,
            "priority": "URGENT",
            "priorityValue": 40,
            "status2": "CLOSED",
            "relatedChannels": null
        },
        ... # More tickets
    ]
}

List of response properties

Property nameTypeDescription

count

int

The total count of tickets registered in the application.

previous

string

The URL to retrieve the previous page in the result set.

next

string

The URL to retrieve the next page in the result set.

results[]

list

A list of tickets.


View a ticket

Retrieves information on a specific ticket.

HTTP request

Light Color Skin
Copy
GET https://desk-api-{application_id}.sendbird.com/platform/v1/tickets/{ticket_id}

Parameters

The following table lists the parameters that this action supports.

Required
Parameter nameTypeDescription

ticket_id

int

Specifies the unique ID of the target ticket.

Response

If successful, this action returns a ticket resource in the response body.


Create a ticket

Creates a new ticket.

HTTP request

Light Color Skin
Copy
POST https://desk-api-{application_id}.sendbird.com/platform/v1/tickets

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

channelName

string

Specifies the title of a ticket to create, which will be the group channel name in Sendbird Chat platform as well.

customerId

int

Specifies the unique ID of a customer which is different from sendbird_id in Sendbird Chat platform. This customerId can be retrieved by the Customer API's list customers action.

OptionalTypeDescription

groupKey

string

Specifies the unique key of a group for ticket assignment. The key can be a mix of lowercase letters, hyphens, underscores, or numbers. If not specified, the created ticket is assigned to the Default team.

customFields

JSON string

Specifies a JSON string of one or more key-value custom fields to add or update. The key must not have a comma (,) and its length is limited to 20 characters. The value must be a string and its length is limited to 190 characters. This property can have up to 20 custom fields.

priority

string

Specifies a priority of the ticket. Acceptable values are URGENT, HIGH, MEDIUM, and LOW. (Default: MEDIUM)

relatedChannelUrls

string

Specifies a comma-separated string of one or more group channel URLs for reference, where the corresponding customer belongs. This property can have up to 3 group channel URLs.

Request body example
Light Color Skin
Copy
{
    "channelName": "Ticket for late delivery",
    "customerId": 156732,
    "groupKey": "cs-team",
    "customFields": "{\"string\":\"string\",\"integer\":100,\"dropdown\":\"option1\",\"link\":\"{\\\"url\\\": \\\"https://www.example.com\\\", \\\"text\\\": \\\"title\\\"}\"}",
    "priority": "HIGH",
    "relatedChannelUrls": "sendbird_desk_chat_25108471, sendbird_desk_chat_54852434, sendbird_desk_chat_48297842"
}

Response

If successful, this action returns a ticket resource in the response body.


Update a ticket

Updates a ticket's priority and URLs of the related channels.

HTTP request

Light Color Skin
Copy
PATCH https://desk-api-{application_id}.sendbird.com/platform/v1/tickets/{ticket_id}

Parameters

The following table lists the parameters that this action supports.

Required
Parameter nameTypeDescription

ticket_id

int

Specifies the unique ID of the target ticket.

Request body

The following table lists the properties of an HTTP request that this action supports.

Optional
Property nameTypeDescription

priority

string

Specifies the priority of a ticket. Valid values are URGENT, HIGH, MEDIUM, and LOW. (Default: MEDIUM)

relatedChannelUrls

string

Specifies the URLs of the group channels in Sendbird Chat platform that are related to this ticket and where the customer belongs. Invalid URLs including URLs where the customer doesn't belong are ignored. URLs should be separate with commas, and up to three group channel URLs can be added per ticket.

Request body example
Light Color Skin
Copy
{
    "priority": "LOW",
    "relatedChannelUrls": "sendbird_group_channel_1,sendbird_group_channel_2"
}

Response

If successful, this action returns a updated ticket resource in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "id": 3351,
    "project": 13,
    "channelName": "issue #123",
    "createdAt": "2020-08-13T05:09:46.005856Z",
    "channelUrl": "sendbird_group_channel_3",
    "closedAt": null,
    "issuedAt": null,
    "durationTime": null,
    "pendingTime": null,
    "conversationTime": null,
    "customer": {
        "id": 681,
        "sendbirdId": "roy",
        "channelType": "SENDBIRD",
        "project": 13,
        "createdAt": "2019-03-12T05:45:33.808794Z",
        "memo": null,
        "displayName": "rocket_roy",
        "photoThumbnailUrl": "https://sendbird.com/main/img/profiles/profile_smile_summer.png",
        "customFields": []
    },
    "closeStatus": "NOT_CLOSED",
    "recentAssignment": null,
    "closeComment": null,
    "info": null,
    "messageCount": null,
    "lastMessage": "I want to get a refund :(.",
    "lastMessageSender": "PLATFORM",
    "lastMessageAt": null,
    "lastUserMessageSender": null,
    "lastUserMessageAt": "2020-08-13T05:09:46.005898Z",
    "lastMessageMembers": "[]",
    "updatedAt": null,
    "lastMessagePayload": null,
    "firstAssignmentToCloseTime": null,
    "firstResponseTime": 590484,
    "channelType": "SENDBIRD",
    "data": "{}",
    "lastSeenAt": 0,
    "group": {
        "id": 72,
        "name": "FE_team",
        "key": "01010101010",
        "project": 13,
        "createdAt": "2020-01-28T07:10:34.844805Z",
        "createdBy": 27,
        "description": "Issues related to front engineering are assigned to this team."
    },
    "customFields": [
        {
            "id": 240,
            "key": "phone_number",
            "value": "0004-0005-0006"
        },
        {
            "id": 241,
            "key": "delivery_address",
            "value": "101, Samsung-dong, Gangnam-gu, Seoul"
        }
    ],
    "customerSatisfactionScore": null,
    "customerSatisfactionComment": null,
    "priority": "LOW",
    "priorityValue": 10,
    "status2": "INITIALIZED",
    "relatedChannels": "[{\"name\": \"Issue #001\", \"channel_url\": \"sendbird_group_channel1\"}, {\"name\": \"Issue #002\", \"channel_url\": \"sendbird_group_channel2\"}]"
}

Update custom fields of a ticket

Updates custom fields of a specific ticket.

HTTP request

Light Color Skin
Copy
PATCH https://desk-api-{application_id}.sendbird.com/platform/v1/tickets/{ticket_id}/custom_fields

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

ticket_id

int

Specifies the unique ID of the target ticket.

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

customFields

JSON string

Specifies a JSON string of one or more key-value custom fields to add or update. The specified key must be registered as a custom field in Settings > Ticket fields of your dashboard beforehand. The length of key and value is limited to 20 and 190 characters, respectively. New values are automatically added for the keys without values, or they will be updated if the specified key already has its value. When entering URLs for the link data type, it's recommended to start the URL with http:// or https://.

Request body example
Light Color Skin
Copy
{
    "customFields": "{
        \"request-type\":\"refund\",    // Dropdown
        \"region\": 3,                  // Integer
        \"subject\":\"shoes\",          // Text
        \"order-list\":\"{\\\"url\\\":\\\"https://sendbird.com/orders\\\",\\\"text\\\":\\\"Track orders\\\"}\"  // Link
    }"
}

Response

If successful, this action returns a ticket resource with the updated custom fields in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "id": 3351,
    "project": 13,
    "channelName": "Pizza_delivery_delayed",
    "createdAt": "2020-08-13T05:09:46.005856Z",
    "channelUrl": "sendbird_group_channel_730883_973004c40cc0c881e603b61ba5dab3ce17a2a865",
    "closedAt": null,
    "issuedAt": null,
    "durationTime": null,
    "pendingTime": null,
    "conversationTime": null,
    "customer": {
        "id": 681,
        "sendbirdId": "tree_in_the_park",
        "channelType": "SENDBIRD",
        "project": 13,
        "createdAt": "2019-03-12T05:45:33.808794Z",
        "memo": null,
        "displayName": "tree",
        "photoThumbnailUrl": "https://sendbird.com/main/img/profiles/profile_cherry-blossom-tree.png",
        "customFields": []
    },
    "closeStatus": "NOT_CLOSED",
    "recentAssignment": null,
    "closeComment": null,
    "info": null,
    "messageCount": null,
    "lastMessage": null,
    "lastMessageSender": "PLATFORM",
    "lastMessageAt": null,
    "lastUserMessageSender": null,
    "lastUserMessageAt": "2020-08-13T05:09:46.005898Z",
    "lastMessageMembers": "[]",
    "updatedAt": null,
    "lastMessagePayload": null,
    "firstAssignmentToCloseTime": null,
    "firstResponseTime": 590484,
    "channelType": "SENDBIRD",
    "data": "{}",
    "lastSeenAt": 0,
    "group": {
        "id": 72,
        "name": "CS_team",
        "key": "01010101010",
        "project": 13,
        "createdAt": "2020-01-28T07:10:34.844805Z",
        "createdBy": 27,
        "description": "Customer support related tickets are assigned to this team."
    },
    "customFields": [
        {
            "id": 240,
            "key": "request-type",
            "value": "refund"
        },
        {
            "id": 241,
            "key": "region",
            "value": 3
        },
        {
            "id": 242,
            "key": "subject",
            "value": "pizza"
        },
        {
            "id": 243,
            "key": "order-list",
            "value": "{\"text\": \"Track orders\", \"url\": \"https://sendbird.com/orders\"}"
        }
    ],
    "customerSatisfactionScore": null,
    "customerSatisfactionComment": null,
    "priority": "MEDIUM",
    "priorityValue": 20,
    "status2": "INITIALIZED",
    "relatedChannels": null
}

Close a ticket

Closes a specific ticket.

HTTP request

Light Color Skin
Copy
PATCH https://desk-api-{application_id}.sendbird.com/platform/v1/tickets/{ticket_id}/close

Parameters

The following table lists the parameters that this action supports.

Required
Parameter nameTypeDescription

ticket_id

int

Specifies the unique ID of the target ticket.

Request body

The following table lists the properties of an HTTP request that this action supports.

Optional
Property nameTypeDescription

closeComment

string

Specifies the notes for ticket closing.

closeMessage

string

Specifies the message for ticket closing, which is sent instead of the default closing message set in Settings > Triggers of your dashboard.

Request body example
Light Color Skin
Copy
{
    "closeComment": "This issue has been resolved.",
    "closeMessage": "This ticket is closed. If you have any other questions, please create a new ticket."
}

Response

If successful, this action returns a closed ticket resource in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "id": 19371,
    "project": 1,
    "channelName": "Issue #001",
    "createdAt": "2020-08-03T12:57:12.618753Z",
    "channelUrl": "sendbird_group_channel_1",
    "closedAt": "2020-08-07T03:57:32.720074Z",
    "issuedAt": "2020-08-03T12:57:14.346761Z",
    "durationTime": 313218,
    "pendingTime": 0,
    "conversationTime": null,
    "customer": {
        "customerObject"
    },
    "closeStatus": "CLOSED_BY_PLATFORM_API",
    "recentAssignment": {
        "AssignmentObject"
    },
    "closeComment": "This issue has been resolved.",
    "info": "",
    "messageCount": 1,
    "lastMessage": "This ticket is automatically assigned to Cindy.",
    "lastMessageSender": "PLATFORM",
    "lastMessageAt": "2020-08-07T03:57:07.382000Z",
    "lastUserMessageSender": "CUSTOMER",
    "lastUserMessageAt": "2020-08-03T12:57:14.116000Z",
    "lastMessageMembers": "[]",
    "updatedAt": "2020-08-07T03:57:07.610750Z",
    "lastMessagePayload": null,
    "firstAssignmentToCloseTime": 313217,
    "firstResponseTime": 590484,
    "channelType": "SENDBIRD",
    "data": "{}",
    "lastSeenAt": 0,
    "group": {
        "groupObject"
    },
    "customFields": [],
    "customerSatisfactionScore": null,
    "customerSatisfactionComment": null,
    "priority": "MEDIUM",
    "priorityValue": 20,
    "status2": "CLOSED",
    "relatedChannels": null
}

Transfer tickets to a group

Transfers tickets with a specific status to a specific team.

HTTP request

Light Color Skin
Copy
POST https://desk-api-{application_id}.sendbird.com/platform/v1/tickets/transfer_to_group

Request body

The following table lists the properties of an HTTP request that this action supports.

Required
Property nameTypeDescription

tickets

array of integers

Specifies one or more IDs of pending tickets for transfer. Up to 100 ticket IDs can be specified.

status

string

Specifies the status of tickets for transfer. An acceptable value is PENDING.

groupKey

string

Specifies the unique key of a group for ticket transfer. The key can be a mix of lowercase letters, hyphens, underscores, or numbers.

Request body example
Light Color Skin
Copy
{
    "tickets": [1, 2, 3, 4],
    "status": "PENDING",
    "groupKey": "cs-team"
}

Response

If successful, this action returns information on the transferred tickets in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "transferredTickets": [1, 2, 3],
    "status": "PENDING"
}
Property nameTypeDescription

transferredTickets

array of integers

The unique IDs of successfully transferred tickets.

status

string

The status of transferred tickets. A valid value is PENDING.


Cancel assignment of a ticket

Cancels assignment of a specific ticket from an agent. When a ticket is unassigned from an agent, its status changes to Pending. Then, it is assigned to another available agent within the specified team based on the auto ticket routing function.

Note: When a ticket is unassigned from a bot, the handover message is automatically sent to a customer. You can customize your handover message using the Bot API or in Settings > Bots of your dashboard.

HTTP request

Light Color Skin
Copy
PATCH https://desk-api-{application_id}.sendbird.com/platform/v1/tickets/{ticket_id}/cancel

Parameters

The following table lists the parameters that this action supports.

Required
Parameter nameTypeDescription

ticket_id

int

Specifies the unique ID of the target ticket.

Request body

The following table lists the properties of an HTTP request that this action supports.

Optional
Property nameTypeDescription

group

int

Specifies the unique key of a group. The ticket is reassigned to this group and then changes its status to Pending.

Request body example
Light Color Skin
Copy
{
    "group": 51
}

Response

If successful, this action returns a ticket resource with the updated custom fields in the response body.