staqlydocs
REST APIAPI referenceWebhooks

Create a webhook

Create a webhook. A signing secret is generated.

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/webhooks

The response is the only one that shows the signing secret in full (besides rotate_secret); store it now.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Header Parameters

Idempotency-Key?string

Replays the stored response when the same key is repeated with the same method, path, query string and body within 24 hours (422 idempotency_mismatch with a different request, 409 idempotency_in_progress while the first one runs). Not applied to multipart uploads or to responses that carry a secret.

Lengthlength <= 200

Request Body

application/json
  1. body
url*string
description?string
events?array<>

"", a glob inside a known event family ("post.", "channel.", "schedule.") or a known event type (post.created, post.scheduled, post.publish_requested, post.target_published, post.published, post.failed, channel.needs_reconnect, schedule.ran...). Unknown patterns are a 422.

Items1 <= items <= 50
collection_ids?array<string>
active?boolean
timeout_ms?integer
Range1000 <= value <= 60000
max_attempts?integer
Range1 <= value <= 20
rotate_secret?boolean

Response Body

Created

application/json
  1. response
id*string
url*string
description*string
secret*string

HMAC key; X-Staqly-Signature = sha256=hex(HMAC_SHA256(secret, timestamp + '.' + body)). Shown in full only in the create response and after rotate_secret; elsewhere masked as whsec_****<last 4>.

events*array<string>

Exact names or globs: "", "post."

collection_ids*array<string>

Empty means all collections

active*boolean
timeout_ms*integer
max_attempts*integer
created_at*string
updated_at*string
curl -X POST 'https://staqly.example.com/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "string",  "url": "string",  "description": "string",  "secret": "string",  "events": [    "string"  ],  "collection_ids": [    "string"  ],  "active": true,  "timeout_ms": 0,  "max_attempts": 0,  "created_at": "string",  "updated_at": "string"}