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

# Criar webhook

> Registra um novo endpoint webhook para receber notificações de eventos.

<ParamField header="x-api-key" type="string" required>
  API key do BOH com escopo `admin:webhooks`.
</ParamField>

<ParamField body="url" type="string" required>URL HTTPS de destino.</ParamField>
<ParamField body="events" type="string[]" required>Array de tipos de evento a subscrever. Use `["*"]` para todos.</ParamField>
<ParamField body="secret" type="string">Segredo para assinar os payloads (recomendado).</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "url": "https://meu-sistema.com/webhooks/boh",
    "events": ["inventory_transaction.completed"],
    "secret": "meu_segredo_webhook"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "wep_01j5k...",
    "url": "https://meu-sistema.com/webhooks/boh",
    "events": ["inventory_transaction.completed"],
    "status": "ACTIVE"
  }
  ```
</ResponseExample>
