Block Contact
POST/accounts/:account_id/contacts/:contact_id/block
Blocks the contact for a number of days.
While a contact is blocked, their incoming messages are not delivered to agents, and the contact is removed from all contact lists. If you pass conversation_id, an activity message about the block is added to that conversation. The block is recorded with block_source: "api" when it is made with an access token. To lift the block early, use Unblock Contact.
| Setting | Value |
|---|---|
| Method | POST |
| Path | /api/v1/accounts/{account_id}/contacts/{contact_id}/block |
| Authorization | User token. Legacy: administrator. New rules: Contacts → update only (the legacy administrator role does not pass). When conversation_id is sent, the caller must also be able to see that conversation. Agent-bot tokens: not allowed. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | Account ID. |
contact_id | integer | Yes | Contact ID. |
Body parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
period | integer | No | Block duration in days. Default 1, maximum 36500. |
conversation_id | integer | No | Display ID of one of the contact's conversations, where the "blocked" activity message is posted. |
Example request
curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/block' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "period": 7, "conversation_id": 1501 }'
Example response (200 OK). The contact_inboxes list is truncated.
{
"payload": {
"additional_attributes": {
"company_name": "Example Ltd",
"city": "Tel Aviv",
"blocked": "2026-11-19 08:00:00 UTC",
"blocked_at": "2026-11-12T08:00:00Z",
"block_source": "api"
},
"availability_status": "offline",
"email": "dana.cohen@example.com",
"id": 801,
"name": "Dana Cohen",
"phone_number": "+972501234567",
"identifier": "crm-801",
"thumbnail": "",
"custom_attributes": {
"customer_tier": "gold"
},
"blocked": true,
"is_whatsapp_contact": false,
"created_at": 1794470500,
"email_or_phone_optional": false,
"contact_inboxes": []
}
}
additional_attributes.blocked is the time the block ends, blocked_at the time it started, and block_source is api when the block is made with an access token.
Request
Responses
- 200
- 401
- 403
- 404
The blocked contact.
The access token is missing or wrong, or its user does not belong to this account.
The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See Authorization.
The resource does not exist in this account.