Skip to main content
POST
/
v1
/
contacts
/
bulk-delete
Bulk Delete Contacts
curl --request POST \
  --url https://api.example.com/v1/contacts/bulk-delete \
  --header 'Content-Type: application/json' \
  --data '
{
  "contact_ids": [
    {}
  ],
  "dry_run": true
}
'
{
  "data": {
    "deleted_count": 123,
    "not_found_count": 123,
    "errors": [
      {}
    ]
  }
}

Request

Deletion is permanent for the contact row and its direct properties. Associated activities, notes, and tasks are preserved in the timeline but lose their contact back-reference. To merge rather than delete, use POST /v1/contacts/merge.

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Idempotency-Key
string
Strongly recommended. The same key returns the original result within 24 hours.

Body Parameters

contact_ids
array
required
Array of contact UUIDs to delete. Maximum 500.
dry_run
boolean
default:"false"
When true, the API validates input and returns counts but makes no changes.

Response

data
object
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID. Each successful deletion emits a contact.deleted webhook event.
curl -X POST \
  https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/bulk-delete \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_ids": [
      "123e4567-e89b-12d3-a456-426614174000",
      "456e7890-a1b2-34c5-d678-901234567890"
    ]
  }'

Example Response

{
  "data": {
    "deleted_count": 2,
    "not_found_count": 0,
    "errors": []
  }
}

Errors

StatusCodeDescription
400validation_errorMore than 500 IDs or missing contact_ids
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing write:contacts permission
429rate_limitedRate limit exceeded