Delete Contact
Deletes a specific contact by ID.
Endpoint
DELETE https://api.smsleopard.com/v1/contacts/:idAuthentication
This endpoint requires Basic Authentication using your API credentials. Click to Generate Credentials (API Keys and Secrets)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The unique identifier of the contact to delete |
Code Examples
cURL
# Replace {contact_id} with the actual contact ID
curl -X DELETE "https://api.smsleopard.com/v1/contacts/123" \
-u "your_api_key:your_api_secret" \
-H "Content-Type: application/json"Response
Success Response (204 No Content)
The response has no body.
Error Responses
401 Unauthorized
{
"success": false,
"message": "Unauthorized. Invalid API credentials.",
"recipients": []
}See Error Messages for every authentication error.
400 Bad Request
request_failed when no contact has that ID; invalid_argument when the API key’s user does not own the organization.
{
"error_code": "request_failed",
"error_message": "Failed to perform request. Please try again",
"status_code": 400
}403 Forbidden
Sandbox API keys cannot delete contacts.
{
"error_code": "invalid_api_key_environment",
"error_message": "This operation is not permitted with a sandbox API key. Please use a production API key to access this endpoint.",
"status_code": 403
}Usage Notes
- Once a contact is deleted, it cannot be recovered
- Make sure you have the correct contact ID before making the deletion
- The contact will be removed from all associated groups
- Any custom metadata associated with the contact will also be deleted