Delete contacts in bulk

Permanently delete up to 5,000 contacts with their conversations, messages and queued steps. Suppression rows are kept.

POSThttps://app.trygtm.com/api/v1/contacts/delete
Scope
write

Headers

Idempotency-Keystringoptional
A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.

Body

contact_idsstring[]required
Contact ids, up to 5,000 a call. Read them from list_contacts.

Request

curl -X POST https://app.trygtm.com/api/v1/contacts/delete \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_ids": [
      "8f2a91c4-6d1e-4c0a-9a57-2f3b1c7e9d10"
    ]
  }'

Response

{
  "data": {
    "deleted": 2,
    "contact_ids": [
      "8f2a91c4-6d1e-4c0a-9a57-2f3b1c7e9d10",
      "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
    ]
  }
}

Was this page helpful?