---
title: "Rota el secreto de firma"
method: POST
path: "/webhooks/{id}/rotar-secreto"
tags: ["Webhooks"]
---

# Rota el secreto de firma

`POST /webhooks/{id}/rotar-secreto`

## Request

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

El secreto anterior deja de firmar de inmediato. 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).

## Path parameters

- `id` string, uuid, required

## Response `200`

Nuevo 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

- `404`: No encontrado

## 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 `200`

[Operation history](https://skmtc.dev/contadeo/apis/api-de-contadeo/changes/webhooks/:id/rotar-secreto/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)
