Skip to main content

Delete Contacts

Remove contacts from your organization. Supports deleting a single contact or bulk deleting up to 1,000 contacts at once.

Delete Single Contact

Soft-delete a contact by ID.

Endpoint

DELETE /contacts/:id

Returns: 200 OK

Path Parameters

ParameterTypeDescription
idstringThe contact ID to delete

Response

{
"message": "Contact deleted"
}

Examples

curl -X DELETE "https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer be_your_api_key"

Bulk Delete Contacts

Delete multiple contacts in a single request. Maximum 1,000 contacts per request.

Endpoint

POST /contacts/bulk-delete

Returns: 200 OK

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Body Parameters

ParameterTypeRequiredDescription
contact_idsstring[]YesArray of contact IDs to delete. Min: 1, Max: 1,000.

Response

{
"message": "Contacts deleted",
"deleted": 25
}
FieldTypeDescription
deletednumberNumber of contacts that were deleted

Examples

curl -X POST "https://api.arsel.sa/v1/contacts/bulk-delete" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b",
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c"
]
}'

Error Responses

{
"status_code": 404,
"name": "not_found",
"message": "Contact not found"
}