API

Webhooks

Referencia de la API para Webhooks: cada handler con sus campos y un ejemplo.

Última actualización:

webhook-subscriber: detail

Obtener webhook

Devuelve un webhook por su ID, con URL, selección de eventos y fallos de entrega. El secret de firma nunca se devuelve.

  • Scope necesario: webhooks:read
  • Endpoint: POST /api/query
Campo Tipo Obligatorio Descripción
id string (uuid) sí

Petición de ejemplo

curl -X POST https://status.example.com/api/query \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:query:webhook-subscriber:detail",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}'

webhook-subscriber: list

Listar webhooks

Devuelve una lista filtrada y paginada de webhooks, con URL, selección de eventos, estado activo y fallos de entrega. El secret de firma nunca se devuelve.

  • Scope necesario: webhooks:read
  • Endpoint: POST /api/query
Campo Tipo Obligatorio Descripción
cursor string no Posición de nextCursor de la página anterior.
limit integer no Filas por página, 50 por defecto, como máximo 200.
search string no Búsqueda de texto completo en los campos con búsqueda.
sort string no Campo por el que ordenar.
sortDirection “asc” | “desc” no asc o desc.
offset integer no Número de filas que se omiten. Para paginar es mejor cursor.
totalCount boolean no Con true recibes además total, el número de filas que coinciden.
includeDeleted boolean no Con true se incluyen las filas eliminadas. Solo para entidades con borrado lógico.
onlyDeleted boolean no Con true solo se devuelven las filas eliminadas. Solo para entidades con borrado lógico, no junto con includeDeleted.
filter object no Un filtro de campo con field, op y value. op es uno de eq, ne, lt, gt, lte, gte, in.
filter.field string sí
filter.op “eq” | “ne” | “lt” | “gt” | “lte” | “gte” | “in” sí
filter.value any sí
filters array of object no Varios filtros de campo, cada uno con field, op y value. op es uno de eq, ne, lt, gt, lte, gte, in.
namedFilter string no Nombre de un filtro predefinido de la entidad, por ejemplo una cola de trabajo.
aggregate object no Devuelve valores agregados en lugar de filas.
aggregate.groupBy string no
aggregate.measures array of object no

Petición de ejemplo

curl -X POST https://status.example.com/api/query \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:query:webhook-subscriber:list",
  "payload": {}
}'

Respuesta de ejemplo

Estado: 200

{
  "data": {
    "nextCursor": null,
    "rows": [
      {
        "id": "00000000-0000-4000-8000-000000000001",
        "tenantId": "00000000-0000-4000-8000-000000000002",
        "version": 1,
        "insertedAt": "2026-01-15T09:30:00.000Z",
        "modifiedAt": null,
        "insertedById": "00000000-0000-4000-8000-000000000003",
        "modifiedById": null,
        "url": "https://93.184.216.34/hook",
        "description": null,
        "events": [
          "incident.created"
        ],
        "active": true,
        "failureCount": 0,
        "lastDeliveryAt": null,
        "lastFailureAt": null,
        "lastFailureReason": null
      }
    ]
  }
}

webhook-subscriber: create

Crear webhook

Registra una dirección HTTPS que recibe eventos de webhook firmados y devuelve una vez su secret de firma.

  • Scope necesario: webhooks:write
  • Endpoint: POST /api/write
Campo Tipo Obligatorio Descripción
url string (uri) sí URL
description string no Nombre
events array of “incident.created” | “incident.updated” | “incident.resolved” | “component.updated” | “maintenance.scheduled” | “maintenance.started” | “maintenance.completed” | “maintenance.cancelled” no Eventos

Petición de ejemplo

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:webhook-subscriber:create",
  "payload": {
    "url": "https://93.184.216.34/hook",
    "events": [
      "incident.created"
    ]
  }
}'

Respuesta de ejemplo

Estado: 200

{
  "isSuccess": true,
  "data": {
    "id": "00000000-0000-4000-8000-000000000001",
    "secret": "REDACTED"
  }
}

webhook-subscriber: delete

Eliminar webhook

Elimina un webhook de forma permanente, de modo que su dirección deja de recibir eventos.

  • Scope necesario: webhooks:write
  • Endpoint: POST /api/write
Campo Tipo Obligatorio Descripción
id string (uuid) sí

Petición de ejemplo

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:webhook-subscriber:delete",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}'

webhook-subscriber: reactivate

Reactivar webhook

Vuelve a activar un webhook desactivado y restablece su contador de fallos.

  • Scope necesario: webhooks:write
  • Endpoint: POST /api/write
Campo Tipo Obligatorio Descripción
id string (uuid) sí

Petición de ejemplo

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:webhook-subscriber:reactivate",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}'

webhook-subscriber: rotate-secret

Renovar el secret de un webhook

Sustituye el secret de firma de un webhook y devuelve una vez el nuevo secret. El anterior deja de valer de inmediato.

  • Scope necesario: webhooks:write
  • Endpoint: POST /api/write
Campo Tipo Obligatorio Descripción
id string (uuid) sí
version number no

Petición de ejemplo

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:webhook-subscriber:rotate-secret",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001",
    "version": 1
  }
}'

webhook-subscriber: update

Modificar webhook

Modifica la URL, la descripción o la selección de eventos de un webhook.

  • Scope necesario: webhooks:write
  • Endpoint: POST /api/write
Campo Tipo Obligatorio Descripción
id string (uuid) sí
version number sí
changes object sí
changes.url string (uri) no URL
changes.description string | null no Nombre
changes.events array of “incident.created” | “incident.updated” | “incident.resolved” | “component.updated” | “maintenance.scheduled” | “maintenance.started” | “maintenance.completed” | “maintenance.cancelled” no Eventos

Petición de ejemplo

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:webhook-subscriber:update",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001",
    "version": 1,
    "changes": {
      "url": "https://example.com",
      "description": "text",
      "events": [
        "incident.created"
      ]
    }
  }
}'