Skip to main content
DELETE
/
v2
/
contacts
curl -X DELETE "https://app.tracklysms.com/api/v2/contacts" \
  -H "X-Api-Key: trk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14155559876",
    "list_number": "+18005551234"
  }'
{
  "success": true,
  "unsubscribed": true
}
Unsubscribes a contact from the specified sending list. This sets the ListContact’s active status to false with an unsubscribe reason of api. The contact record itself is not deleted — only their subscription to the list is deactivated. This ensures historical data (send counts, click counts, revenue) is preserved for reporting. The endpoint returns a success response even if the contact or list is not found. Check the unsubscribed field to determine whether an actual unsubscribe took place.

Body Parameters

phone_number
string
required
Contact phone number in E.164 format (e.g., +14155559876).
list_number
string
required
Sending list phone number in E.164 format (e.g., +18005551234). Must be a list owned by your account.

Response Fields

success
boolean
Always true when the request is processed without error.
unsubscribed
boolean
true if the contact was found on the list and their status was changed to inactive. false if the contact was not found on the list, the list does not exist, or the contact was already unsubscribed.

Examples

curl -X DELETE "https://app.tracklysms.com/api/v2/contacts" \
  -H "X-Api-Key: trk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14155559876",
    "list_number": "+18005551234"
  }'
{
  "success": true,
  "unsubscribed": true
}

Error Codes

HTTP StatusError CodeDescription
400missing_phone_numberThe phone_number field was not provided in the request body.
400missing_list_numberThe list_number field was not provided in the request body.
401unauthorizedMissing or invalid X-Api-Key header.
400invalid_phoneThe phone_number is not a valid E.164 phone number.
400invalid_list_numberThe list_number is not a valid E.164 phone number.
500internal_errorAn unexpected server error occurred.
This endpoint does not delete the contact record or their historical data. It only deactivates their subscription to the specified list. To fully remove a contact’s data, use the account dashboard or contact support.

Next Steps

Importing Contacts

Manage your contact data

Create Audience

Segment your contacts