Customer archive
The Customer archive API allows you to archive a customer with their related information and chat messages. Once archived, the existing customer data is subsequently deleted from both Sendbird server and the Desk server and is irreversible after the deletion. Then, you can only retrieve customer archives or request a download link to a specific archive.
Note: Customers from social media can't be archived.
Resource representation
The following table shows the list of properties in a customer archive resource.
Property name | Type | Description |
---|---|---|
id | int | The unique ID of the customer archive. |
project | int | The unique ID of the project. |
customerId | int | The unique ID of the archived customer. The value is null if a customer only has a Sendbird ID. |
sendbirdId | string | The unique Sendbird ID of the customer, which is identical to a user ID in Sendbird Chat. |
createdAt | string | The date and time when the customer archive is created, in ISO 8601 format. |
archiveStatus | string | The status that indicates whether the customer is archived. Valid values are the following: PENDING, IN_PROGRESS, DONE, and FAILED. Once the value changes to DONE, the archived customer data is downloadable through the provided URL. |
deletionStatus | string | The status that indicates whether the customer information is deleted from the Desk server. Valid values are the following: PENDING, IN_PROGRESS, DONE, and FAILED. The deletion process begins once the value of |
Actions
- API endpoints are relative to the base URL allocated to your application. On 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_archive_id}
.
List of actions
Action | HTTP request |
---|---|
| |
| |
| |
|
List customer archives
Retrieves a list of customer archives.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Optional
Parameter name | Type | Description |
---|---|---|
customer_id | int | Searches for customer archives of a user with the specified ID. |
sendbird_id | string | Searches for customer archives of a user with the specified Sendbird ID. |
start_date | string | Specifies a starting date of the search scope to retrieve archives created between start_date and end_date, in YYYY-MM-DD format. |
end_date | string | Specifies an ending date of the search scope to retrieve archives created between start_date and end_date, in YYYY-MM-DD format. |
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 |
Response
If successful, this action returns a list of customer archive 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 archive
Retrieves a specific customer archive.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
archive_id | int | Specifies a unique ID of a customer archive. |
Response
If successful, this action returns a customer archive resource in the response body.
Archive a customer
Archives a customer and its related information, including chat messages.
HTTP request
Request body
The following table lists the parameters that this action supports.
Required
Property name | Type | Description |
---|---|---|
sendbirdId | string | Specifies a unique Sendbird ID of a customer to archive, which is identical to a user ID in Sendbird Chat. |
Response
If successful, this action returns a customer archive resource in the response body.
Request a download link
Requests a download link to a specific customer archive.
Note: The URL expires after 30 minutes.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
archive_id | int | Specifies a unique ID of a customer archive. |
Response
If successful, this action returns a customer archive with a link to a requested customer archive.