API reference

Webhooks

Endpoints and input schemas from the console's API registry.

GET /api/webhooks

List webhooks

Needs the webhooks.manage permission on the API key's role.

No request-body schema is supplied for this operation in the registry.

Documented responses

  • 200 — OK
  • 400 — The body is not valid; `error` says why
  • 401 — No valid API key
  • 403 — The key's role lacks the permission, or the module is off

POST /api/webhooks

Add a webhook

Needs the webhooks.manage permission on the API key's role.

JSON request schema
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2000,
      "format": "uri"
    },
    "secret": {
      "type": "string",
      "minLength": 16,
      "maxLength": 512
    },
    "events": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    }
  },
  "required": [
    "url",
    "secret",
    "events"
  ]
}

Documented responses

  • 200 — OK
  • 201 — Created
  • 400 — The body is not valid; `error` says why
  • 401 — No valid API key
  • 403 — The key's role lacks the permission, or the module is off

PATCH /api/webhooks/{id}

Switch a webhook on or off

Needs the webhooks.manage permission on the API key's role.

Path parameters

  • id — required path parameter
JSON request schema
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    }
  },
  "required": [
    "enabled"
  ]
}

Documented responses

  • 200 — OK
  • 400 — The body is not valid; `error` says why
  • 401 — No valid API key
  • 403 — The key's role lacks the permission, or the module is off
  • 404 — Not found in this company

DELETE /api/webhooks/{id}

Delete a webhook

Needs the webhooks.manage permission on the API key's role.

Path parameters

  • id — required path parameter

No request-body schema is supplied for this operation in the registry.

Documented responses

  • 200 — OK
  • 400 — The body is not valid; `error` says why
  • 401 — No valid API key
  • 403 — The key's role lacks the permission, or the module is off
  • 404 — Not found in this company

Other policy and state errors may also apply. See API key permissions and limits and the complete OpenAPI document.