APIWebhooks

Get a webhook

Get a webhook by ID. The endpoint URL, secrets, and header values are omitted, as in list.

GET
/webhooks/{webhook_id}

Get a webhook by ID. The endpoint URL, secrets, and header values are omitted, as in list.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

view_webhooks

Path Parameters

webhook_id*string
Formatuuid

Response Body

The request has succeeded.

application/json
  1. response

A configured webhook. The signing secret, the endpoint URL, custom header values, and variable values are never returned.

id*uuid
Formatuuid
name*string
Length1 <= length <= 255
url_hint*string

The endpoint as its origin and last four characters, such as https://hooks.slack.com/…7cJa. Many receivers put their credential in the URL, so the URL itself is never returned.

events*array<string>

Audit actions this webhook subscribes to, or ["*"] for all of them.

status*WebhookStatus

Whether a webhook is currently delivering events.

Value in"active""paused""disabled"
disabled_reason?WebhookDisabledReason

Why a webhook was turned off automatically.

Value in"circuit_breaker""gone""template_error"
failing_since?string

When deliveries started failing continuously; cleared once a delivery succeeds.

Formatdate-time
last_delivery_status?WebhookDeliveryStatus

Delivery outcome for a single message.

Value in"pending""retrying""succeeded""failed"
last_delivery_at?string

When the most recent delivery was attempted; absent until the first delivery.

Formatdate-time
format*WebhookFormat

How events are encoded in the request body.

Value in"single""array""ndjson"
max_events*integer
Formatint32
has_custom_headers*boolean

Whether custom request headers are configured. The values themselves are never returned.

header_keys*array<string>

Names of the configured custom headers. Values are never returned. Empty for webhooks saved before header names were recorded, even when has_custom_headers is true.

template?string

Go text/template rendering each event into the delivered body; empty means the default Standard Webhooks envelope.

Lengthlength <= 8192
condition?string

CEL expression an event must satisfy to be delivered; empty means every subscribed event is delivered.

Lengthlength <= 1024
destination?string

The destination this webhook was set up for, such as slack. A label for display; it does not change how events are delivered.

Lengthlength <= 64
var_keys*array<string>

Names of the configured template variables. Values are never returned.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X GET "https://example.com/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "url_hint": "string",  "events": [    "string"  ],  "status": "active",  "disabled_reason": "circuit_breaker",  "failing_since": "2019-08-24T14:15:22Z",  "last_delivery_status": "pending",  "last_delivery_at": "2019-08-24T14:15:22Z",  "format": "single",  "max_events": 0,  "has_custom_headers": true,  "header_keys": [    "string"  ],  "template": "string",  "condition": "string",  "destination": "string",  "var_keys": [    "string"  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}