Contacts

Bulk-delete all matching contacts (async)

DELETE
/api/contacts/query-bulk-delete

Starts a background job that cascade-deletes every contact matching the supplied filter - for each contact it also deletes the org's conversations and messages for that contact, fires assignee notifications, emits contact_removed socket events, and writes manual-event audit entries (CONTACT_DELETE). The handler responds 202 immediately with a jobId; the caller should poll GET /api/contacts/bulk-job/{jobId} for progress. The job is registered synchronously before the response is sent so the first poll never gets a 404.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Shared filter shape used by query-count, query-bulk-move, query-bulk-delete, and query-bulk-export. Either supply stageIds[] OR set orgWide: true. pipelineType selects whether the operation runs against the Contact or Application collection.

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/contacts/query-bulk-delete" \  -H "Content-Type: application/json" \  -d '{    "stageIds": [      "64b2c3d4e5f60012345678aa"    ],    "pipelineType": "Contact",    "ownerFilter": "unowned",    "advancedParams": {      "createdAfter": "2026-01-01T00:00:00.000Z"    }  }'
{  "jobId": "b09c2c61-2f8f-4f02-9c1b-2f23a3a2f9c1",  "message": "Bulk delete started"}