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

# Crear webhook

> Crea un nuevo webhook.

**Autenticación:** Bearer JWT

<Tip>
  Guarda el `secret` retornado para verificar las firmas `X-Folyo-Signature` de cada entrega.
</Tip>

<CodeGroup>
  ```json Request theme={null}
  {
    "url": "https://miapp.cl/webhooks/folyo",
    "eventos": ["dte.emitido", "dte.rechazado"]
  }
  ```

  ```json Response 200 theme={null}
  {
    "id": "wh_xyz789",
    "url": "https://miapp.cl/webhooks/folyo",
    "secret": "whsec_aB3cD4eF5gH6...",
    "message": "Webhook creado. Usa el secret para verificar las firmas."
  }
  ```
</CodeGroup>

| Código | Descripción                           |
| ------ | ------------------------------------- |
| `400`  | URL inválida o eventos no reconocidos |
