> ## 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.

# Blocklist

> Lista contatos bloqueados

Retorna a lista de contatos atualmente bloqueados pela sessão.

## Query Parameters

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

## Resposta

<ResponseField name="success" type="boolean">
  Se a operação foi bem-sucedida.
</ResponseField>

<ResponseField name="blocklist" type="string[]">
  Lista de JIDs bloqueados.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET "https://api.oxenty.api.br/api/contacts/blocklist?sessionId=550e8400-e29b-41d4-a716-446655440000" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```typescript TypeScript theme={"system"}
  const blocklist = await client.contacts.getBlocklist(sessionId);
  console.log('Contatos bloqueados:', blocklist.blocklist);
  ```

  ```python Python theme={"system"}
  blocklist = client.contacts.get_blocklist(session_id)
  print(f"Contatos bloqueados: {blocklist['blocklist']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  {
    "success": true,
    "blocklist": [
      "5511777777777@s.whatsapp.net",
      "5511666666666@s.whatsapp.net"
    ]
  }
  ```
</ResponseExample>

***

## Bloquear Contato

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

Bloqueia um contato.

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

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

```bash 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": "5511777777777@s.whatsapp.net"
  }'
```

***

## Desbloquear Contato

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

Desbloqueia um contato.

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

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

```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": "5511777777777@s.whatsapp.net"
  }'
```
