Skip to navigation

Create a webhook endpoint

Registers an HTTPS endpoint and creates its signing secret. The secret appears only in this first successful response. A replay of the same Idempotency-Key and body returns the original status (201) and the same endpoint with secret null and the header Idempotent-Replayed true; the plaintext is not kept. The replayed url has any query masked as ?… (scheme, host and path kept), because the stored replay record keeps no credential; reads return the whole url. The destination guard runs before any write: a URL that is not https, or a host that does not resolve only to public addresses, is refused with 422 outbound_destination_refused and nothing is stored. A workspace has at most 10 endpoints that are not deleted. A new endpoint receives only events created after its own created_at. In a suspended workspace the answer is workspace_unavailable. Idempotency fingerprint: method, path and the canonical body.

Authentication

AuthorizationBearer

Create and manage workspace-owned keys through the existing app session routes, outside this public API. Creator and manager identities are audit actors only. Key validity follows workspace policy, expiry and explicit revocation, independently of creator membership. Do not include a workspace-selection header.

Headers

Idempotency-KeystringRequired1-255 characters

Stable key per logical intent, 1–255 printable characters. Persist it before sending. Retry the same key/body after an uncertain result for 24 hours. A changed body conflicts. Beyond retention, reconcile the resource before retrying; this is not permanent deduplication. Current authorization is rechecked on replay. Evaluation order: authenticate and check current authorization; look up intent; replay its stored receipt before checking the current revision; only a new intent evaluates If-Match and executes. Fingerprint includes method, path, body and original If-Match. A changed request returns idempotency_key_reused. The server stores only a keyed (HMAC) fingerprint, and no error or response ever returns a fingerprint or hash of a request. In-flight intent returns 409 idempotency_in_progress with Retry-After; retry the same intent after reconciliation. Receipts describe that attempt, not current resource state. A replay returns the original status code and body, with the response header Idempotent-Replayed: true.

Request

This endpoint expects an object.
urlstringRequiredformat: "uri"9-2048 characters

An absolute https URL with a host, at most 2,048 characters. User information (user:password@) and a fragment are refused with 400 invalid_request, details.field url. A query string is allowed and sent exactly as written, so a receiver that signs its URL in the query (for example a Power Automate or Logic Apps HTTP trigger) works; every workspace member who can read the endpoint sees the whole URL. The answer of an idempotent replay is the exception: its url shows any query masked as ?… (scheme, host and path kept). A scheme other than https, or a host that does not resolve only to public addresses (private, loopback, link-local, reserved, multicast, unspecified and metadata addresses are refused, also in a mixed answer, and also a name that does not resolve), is refused with 422 outbound_destination_refused, which names no host. The same guard runs again before each attempt; redirects are never followed.

eventslist of enumsRequired

At least one event type. A repeated value is refused (400 invalid_request, details.field events).

Allowed values:
descriptionstringOptional1-256 characters

Optional label, trimmed. Blank becomes null. Control characters are refused with 400 invalid_request, details.field description.

Response headers

X-Request-IdstringOptional
Safe server request correlation ID.
ETagstringOptional

Strong endpoint revision, equal to the revision field. Send it as If-Match to replace, delete or rotate. It changes with url, description, events, state and the signing secret, not with delivery results.

Idempotent-ReplayedstringOptional

true when this response replays a stored Idempotency-Key result. The status and body equal the original, except that a secret is null and any query of a webhook endpoint url is masked as ?… (the stored record keeps no credential).

RateLimit-LimitintegerOptional
Requests allowed in the current window for the tightest applicable limit.
RateLimit-RemainingintegerOptional
Requests left in the current window.
RateLimit-ResetintegerOptional
Seconds until the current window resets.

Response

The endpoint, with its signing secret once (null on a replay).

idstring<=128 characters

Opaque endpoint identifier (prefix wep_). Do not parse it.

urlstring<=2048 characters
descriptionstring or null<=256 characters
eventslist of strings
Subscribed event types. Open response vocabulary.
statestring

enabled: receives deliveries. disabled: a person disabled it. disabled_failing: Rasen disabled it after at least 72 hours and at least 10 failed call-event attempts with no success. Both disabled states hold pending deliveries. Open response vocabulary; treat an unknown value as not enabled.

disabled_atdatetime or null
When the endpoint entered its current disabled state. Null while enabled.
secret_hintstring=4 characters
The last 4 characters of the current signing secret. Never the secret.
previous_secret_expires_atdatetime or null

End of the rotation grace period while the previous secret is still valid; null otherwise.

last_success_atdatetime or null
Time of the last 2xx attempt.
last_failure_atdatetime or null
Time of the last failed attempt.
failing_sincedatetime or null

First failed call-event attempt after the last success, creation or enable; null when the last attempt succeeded.

created_atdatetime
updated_atdatetime
deleted_atdatetime or null
Set only in the answer of deleteWebhookEndpoint and its replay. A deleted endpoint is otherwise not found.
revisionstring
The same strong value as the ETag header. Lists carry it so a client can edit without a second read.
secretstring or nullformat: "^whsec_[A-Za-z0-9+/]{43}=$"

The new signing secret, “whsec_” plus base64 of 32 random bytes. Present only in the first successful response; null on an idempotent replay. Rasen does not keep the plaintext in any receipt, log or event, so it cannot show it again.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error