Ir al contenido
Octuvia

Rotar secreto

Genera un signing_secret nuevo. Durante expire_previous_in_seconds (default 24 h) cada entrega lleva dos firmas en X-Octuvia-Signature (v1=nuevo,v1=anterior) para migrar sin perder eventos.

POSThttps://api.octuvia.com/v1/webhook-endpoints/{webhook_endpoint_id}/rotate-secret

Parámetros del body

Campo
Descripción
webhook_endpoint_id
stringrequerido
Id we_….Ej: we_01J8Z3K4M5N6P7Q8R9S0T1U2V3
expire_previous_in_seconds
integeropcional
Ventana de doble firma. 0–604800. Default 86400.Ej: 86400
  1. 1

    Rotar

    Llama a este endpoint y guarda el nuevo signing_secret.

  2. 2

    Actualizar tu receptor

    Acepta ambas firmas (o solo la nueva si ya desplegaste).

  3. 3

    Esperar la ventana

    Tras expire_previous_in_seconds solo vale el secreto nuevo.

Language

Credentials

Header

Authorization

Token de la empresa · HTTP directo

Fetch Request
$ # Node 18+ fetch
const response = await fetch("https://api.octuvia.com/v1/webhook-endpoints/we_01J8Z3K4M5N6P7Q8R9S0T1U2V3/rotate-secret", {
  method: "POST",
  headers: {
    "Authorization": "Bearer octuvia_live_…",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "expire_previous_in_seconds": 86400
  })
});

const data = await response.json();
console.log(data);
HTTP directo · funciona con cualquier cliente HTTP
Response

Elige un ejemplo de respuesta:

application/json
200OK
{
  "object": "webhook_endpoint",
  "id": "we_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
  "url": "https://api.tuapp.com/octuvia/webhooks",
  "events": [
    "message.*",
    "account.*"
  ],
  "status": "enabled",
  "livemode": true,
  "signing_secret": "whsec_nuevoSecretSoloAquí…",
  "created_at": "2026-12-01T10:00:00Z"
}