API referenceContacts
Block a contact
Blocks a contact for this session on WhatsApp.
Requires send and a connected session.
Errors: not_found if session/contact is inaccessible, not_implemented if disconnected.
AuthorizationBearer <token>
Send Authorization: Bearer <token>. The token can be a login JWT from the frontend or an api-key for a script. JWT access comes from the person's organization role. Api-key access comes from the permissions saved on the key.
In: header
Path Parameters
session*string
WhatsApp session id used for live actions. Must be connected.
Example
"sess_01HZX"jid*string
WhatsApp JID of target user/group/channel.
Example
"14155550123@s.whatsapp.net"Response Body
application/json
curl -X POST "https://example.com/api/v1/sessions/sess_01HZX/contacts/14155550123@s.whatsapp.net/block"Empty
{ "error": { "code": "not_found", "details": { "property1": null, "property2": null }, "message": "session not found" }}