---
title: "Registra un webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Registra un webhook

`POST /webhooks`

## Request

- Base URL: `https://contadeo.com/api`
- URL: `https://contadeo.com/api/webhooks`
- Auth: `bearerAuth` (a scheme the document does not define)

Alternativa al polling de `GET /comprobantes/{id}`. El `secret` se devuelve solo aquí. Máximo 5 por cuenta. Gestionable por owner/admin (sesión de usuario) o por una API key con el rol `webhooks` (opt-in al crear la key; el rol default `emisor` no basta).

## Request body

- object
  - `url` string, uri, required
  - `eventos` string[]: Por defecto, todos.
  - `descripcion` string

## Response `201`

Creado (incluye el secreto)

- WebhookConSecreto
  - `id` string, uuid
  - `url` string, uri: HTTPS obligatorio; se revalida contra SSRF en cada entrega.
  - `eventos` string[]
  - `activo` boolean
  - `descripcion` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `secret` string: Secreto HMAC (`whsec_…`). Se devuelve UNA sola vez: no se puede volver a consultar.

## Other responses

- `400`: URL inválida o tope de 5 alcanzado
- `409`: Ya existe un webhook con esa URL

## Changes

- **2026-10-19** `461bbb9a74ce`: 1 warning
  - added the new `comprobante.anulado` enum value to the `allOf[#/components/schemas/Webhook]/eventos/items/` response property for the response status `201`

[Operation history](https://skmtc.dev/contadeo/apis/api-de-contadeo/changes/webhooks/post.md)

---

[API](https://skmtc.dev/contadeo/apis/api-de-contadeo.md) · [All operations](https://skmtc.dev/contadeo/apis/api-de-contadeo/llms.txt) · [OpenAPI document](https://skmtc.dev/contadeo/apis/api-de-contadeo/revisions/461bbb9a74ce?raw)
