SidetalkGuides
Sidetalk website ↗Open dashboard

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/delete

HTTP method

POST

Headers

HeadersValueDescription
Content-Typeapplication/jsonIndicates that the request body is JSON.
AuthorizationBearer <api_key>Use the API key provided in Install in the Sidetalk dashboard.

Body

ParameterTypeRequiredDescription
memberIdStringConditionally requiredThe external service’s unique member ID.
sessionIdStringConditionally requiredThe conversation session ID.
userInfoIdStringConditionally requiredThe 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

FieldTypeDescription
successBooleanWhether deletion succeeded.
deletedCountNumberThe number of deleted customer records.
matchTypeStringThe 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."
}
FieldTypeDescription
successBooleanWhether the request failed.
errorStringThe 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 fieldSupported aliases
userInfoId user_info_id, user_info_ids, id
userInfoIdsuser_info_ids
memberIdmember_id
memberIdsmember_ids
sessionIdsession_id
sessionIdssession_ids