Block Customer
POST/customer/:id/block
Block the customer on WhatsApp so they can no longer message your number. The chat shows "Blocked by agent_email".
WhatsApp only allows a block within 24 hours of the customer's last message. Outside that window the block is recorded in Zoko and the response status is blocked_pending; it is applied on WhatsApp the next time the customer messages.
Available for Zoko Cloud numbers only.
Request
Responses
- 200
- 400
- 401
- 409
- 422
- 429
- 502
status is blocked, blocked_pending or already_blocked
Invalid request, e.g. agent_id or agent_email missing
Invalid API key
BLOCK_WINDOW_EXPIRED: WhatsApp refused the block outside the customer's 24-hour window
Cannot block this customer. code is one of NOT_ZOKO_CLOUD (only Zoko Cloud numbers support blocking), NO_PHONE_NUMBER, INVALID_RECIPIENT, CANNOT_BLOCK_SELF, BLOCKLIST_FULL
META_RATE_LIMITED: WhatsApp rate limit, retry later
META_ERROR: WhatsApp returned an error