Customer
The Customer API allows you to manage various attributes of each customer.
Resource representation
The following table shows the list of properties in a customer resource.
Property name | Type | Description |
---|---|---|
id | int | The unique ID of the customer. |
sendbirdId | string | The user ID of the customer which is either identical with the |
channelType | string | A channel type that indicates which channel the customer comes from. Valid values are SENDBIRD, FACEBOOK_PAGE, TWITTER_USER, INSTAGRAM_USER, and WHATSAPP_USER. |
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. |
createdAt | string | The date and time when the customer was created, in ISO 8601 format. |
displayName | string | The name of the customer displayed in the Sendbird Dashboard. It is identical with the |
photoThumbnailUrl | string | The URL of the customer's profile image. |
customFields[] | array | An array of key-value custom fields that indicates additional information about the customer. This property can have up to 20 custom fields. |
Actions
- API endpoints are relative to the base URL allocated to your application. In this page, the
/customers
endpoint refers tohttps://desk-api-{application_id}.sendbird.com/platform/v1/customers
.
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
{customer_id}
.
List of actions
Action | HTTP request |
---|---|
| |
| |
| |
|
List customers
Retrieves a list of customers registered in the application.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Optional
Parameter name | Type | Description |
---|---|---|
limit | int | Specifies the number of results to return per page. Acceptable values are 1 to 500, inclusive. (Default: 50) |
int | Specifies the number of results to skip when receiving a response. The value of | |
sendbird_id | string | Specifies the user ID of the target customer including IDs in Sendbird Chat platform and social media. |
Response
If successful, this action returns a list of customer resources in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
count | int | The total count of customers 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 customers. |
View a customer
Retrieves information on a specific customer.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
customer_id | int | Specifies the unique ID of a customer. |
Response
If successful, this action returns a customer resource in the response body.
Create a customer
Creates a new customer in Desk who already has an ID in Sendbird Chat platform.
HTTP request
Request body
The following table lists the properties of an HTTP request that this action supports.
Required
Property name | Type | Description |
---|---|---|
sendbirdId | string | Specifies the Sendbird ID of a customer. |
Response
If successful, this action returns a customer resource in the response body.
Update custom fields of a customer
Updates custom fields of a specific customer.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
customer_id | int | Specifies the unique ID of a customer. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Required
Property name | Type | Description |
---|---|---|
customFields | JSON string | Specifies a |
Response
If successful, this action returns a customer resource with the updated custom fields in the response body.