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

# Registrar Webhook

> Registra uma URL para receber notificacoes de eventos

## Descricao

Registra um endpoint HTTPS para receber notificacoes automaticas quando transacoes, saques ou disputas mudam de status.

## Request

<ParamField body="url" type="string" required>
  URL do seu endpoint (deve ser HTTPS). Exemplo: `https://seusite.com/webhooks/thalpay`
</ParamField>

<ParamField body="eventType" type="string" required>
  Tipo de evento para receber. Valores: `TRANSACTION`, `WITHDRAWAL`, `DISPUTE`, `ALL`
</ParamField>

<ParamField body="description" type="string">
  Descricao do webhook. Exemplo: `Producao - ERP`
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.thalbank.com/webhooks \
    -H "x-api-key: sua_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://seusite.com/webhooks/thalpay",
      "eventType": "ALL",
      "description": "Producao - Sistema principal"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "status": true,
    "data": {
      "id": "d4e5f6a7-b8c9-0123-def0-123456789abc",
      "url": "https://seusite.com/webhooks/thalpay",
      "eventType": "ALL",
      "description": "Producao - Sistema principal",
      "createdAt": "2026-03-10T00:00:00.000Z"
    }
  }
  ```
</ResponseExample>
