POST /v1/contacts/block
POST
/v1/contacts/block
const url = 'https://seu-endereco-da-api/v1/contacts/block';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contactIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"reason":"spam","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://seu-endereco-da-api/v1/contacts/block \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contactIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "reason": "spam", "note": "example" }'Permissão que a Chave de acesso precisa: Bloquear contato (contacts:block).
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
contactIds
required
Array<string>
reason
required
string
note
string
Responses
Seção intitulada “Responses”Media typeapplication/json
object
blocked
required
Contacts blocked by this call
number
skipped
required
Contacts left untouched: unknown, already blocked or anonymized
number
Example generated
{ "blocked": 1, "skipped": 1}