> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oxenty.api.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Bloquear Contato

> Bloqueia um contato específico

Bloqueia um contato no WhatsApp. Contatos bloqueados não podem enviar mensagens para você.

## Request Body

<ParamField body="sessionId" type="string" required>
  ID da sessão WhatsApp.
</ParamField>

<ParamField body="jid" type="string" required>
  JID do contato a ser bloqueado.
</ParamField>

## Resposta

<ResponseField name="success" type="boolean">
  Se o contato foi bloqueado.
</ResponseField>

<ResponseField name="jid" type="string">
  JID do contato bloqueado.
</ResponseField>

<ResponseField name="action" type="string">
  Ação realizada (`blocked`).
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST "https://api.oxenty.api.br/api/contacts/block" \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "jid": "5511999999999@s.whatsapp.net"
    }'
  ```

  ```typescript TypeScript theme={"system"}
  await client.contacts.block({
    sessionId: '550e8400-e29b-41d4-a716-446655440000',
    jid: '5511999999999@s.whatsapp.net',
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  {
    "success": true,
    "jid": "5511999999999@s.whatsapp.net",
    "action": "blocked"
  }
  ```
</ResponseExample>

***

## Desbloquear Contato

<api method="POST" path="/api/contacts/unblock" />

Desbloqueia um contato previamente bloqueado.

```bash theme={"system"}
curl -X POST "https://api.oxenty.api.br/api/contacts/unblock" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "jid": "5511999999999@s.whatsapp.net"
  }'
```

```json theme={"system"}
{
  "success": true,
  "jid": "5511999999999@s.whatsapp.net",
  "action": "unblocked"
}
```
