Delete Customer Contact API
Purpose
This API deletes customer information stored in Sidetalk Customer Contacts.
Specify the target with memberId, sessionId, or userInfoId.
URL
JavaScript
💡https://api.sidetalk.ai/v1/users/deleteHTTP method
POST
Headers
| Headers | Value | Description |
|---|---|---|
| Content-Type | application/json | Indicates that the request body is JSON. |
| Authorization | Bearer <api_key> | Use the API key provided in Install in the Sidetalk dashboard. |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| memberId | String | Conditionally required | The external service’s unique member ID. |
| sessionId | String | Conditionally required | The conversation session ID. |
| userInfoId | String | Conditionally required | The Sidetalk customer information ID. |
At least one of memberId, sessionId, or userInfoId is required.
Example request
Delete by member_id
JavaScript
curl -X POST https://api.sidetalk.ai/v1/users/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_KEY}" \
-d '{
"memberId": "user_123"
}'Delete multiple member_id values
JavaScript
curl -X POST https://api.sidetalk.ai/v1/users/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_KEY}" \
-d '{
"memberIds": ["user_123", "user_456"]
}'Delete by user_info_id
JavaScript
curl -X POST https://api.sidetalk.ai/v1/users/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_KEY}" \
-d '{
"userInfoId": "123"
}'Response body
JavaScript
{
"success": true,
"deletedCount": 1,
"matchType": "member_id"
}Response fields
| Field | Type | Description |
|---|---|---|
| success | Boolean | Whether deletion succeeded. |
| deletedCount | Number | The number of deleted customer records. |
| matchType | String | The deletion criterion: member_id, session_id, or user_info_id. |
When there is no matching target
JavaScript
{
"success": false,
"deletedCount": 0,
"matchType": "member_id"
}Error response
JavaScript
{
"success": false,
"error": "member_id, session_id, or user_info_id is required."
}| Field | Type | Description |
|---|---|---|
| success | Boolean | Whether the request failed. |
| error | String | The error message. |
Notes
- Deletion applies only to customers of the site associated with the API key.
- The public API does not support deleting all customer information.
- Use memberIds, sessionIds, or userInfoIds arrays to delete multiple records.
- The following aliases are also supported for backward compatibility and easier external integration.
| Primary field | Supported aliases |
|---|---|
| userInfoId | user_info_id, user_info_ids, id |
| userInfoIds | user_info_ids |
| memberId | member_id |
| memberIds | member_ids |
| sessionId | session_id |
| sessionIds | session_ids |
