Contacts

Block contact

PATCH
/api/contacts/{id}/block

Marks the contact isBlocked: true, records blockedBy/blockedAt, force-disconnects any active webchat devices, and invalidates the blocked-device cache. Returns the synced/removed webchat device ids. Org-scoped unless caller is SUPERADMIN.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X PATCH "https://example.com/api/contacts/string/block"
{  "message": "Contact blocked successfully",  "data": {    "contact": {      "_id": "64f0a1b2c3d4e5f6a7b8c9d0",      "firstName": "Jane",      "lastName": "Doe"    },    "syncedDeviceIds": [      "device-abc123"    ],    "removedDeviceIds": []  }}