# Registrar un endpoint de webhook

`POST /api/v1/partner/webhooks/` · Webhooks · Fuente: https://api.sharkpos.cl/docs/api/create-partner-webhook/

## Cuerpo de la solicitud (WebhookEndpointInput)

| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| `url` | string (uri) |  | https://, IP pública, sin credenciales embebidas. |
| `description` | string (hasta 255 caracteres) |  |  |
| `event_types` | array de EventType o string |  | ["*"] (por defecto) recibe todos. |

## Ejemplo en el sandbox

```bash
curl -X POST https://sandbox.sharkpos.cl/api/v1/partner/webhooks/ \
  -H "Authorization: Bearer $SHARKPOS_API_KEY"
```

## Respuestas

| HTTP | Qué significa | Esquema |
|---|---|---|
| 201 | Endpoint creado. `secret` se muestra solo en esta respuesta. |  |
| 400 | Solicitud inválida (`INVALID_REQUEST`, `INVALID_RECEPTOR_RUT`, `CONSUMIDOR_FINAL_NOT_ALLOWED`, `IDEMPOTENCY_KEY_REQUIRED`, `CAF_NOT_FOUND`...). | Error |
| 401 | Credencial ausente o inválida (`AUTHENTICATION_REQUIRED`, `INVALID_API_KEY`). | Error |

Contrato completo: https://api.sharkpos.cl/docs/openapi.yaml
