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
An organisation-owned key whose secret starts ra_org_. The Owner or an Admin of an organisation that Rasen has invited makes it in the app; no API operation makes, changes, rotates or revokes a key. On a workspace operation send the workspace ID in the Rasen-Workspace header; without it the answer is 400 invalid_request with details.field Rasen-Workspace. A workspace outside the organisation or outside the key’s workspace list is 404 not_found. An organisation that is not invited gets 403 organisation_api_not_enabled.
Headers
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.
The ID of the workspace that this operation acts in. It must be a workspace of the key’s organisation and in the key’s workspace list. A missing, empty or malformed value is 400 invalid_request with details.field Rasen-Workspace; a workspace outside the organisation or the key’s workspace list is the hidden 404 not_found.
Request
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.
At least one event type. A repeated value is refused (400 invalid_request, details.field events).
Optional label, trimmed. Blank becomes null. Control characters are refused with 400 invalid_request, details.field description.
Response headers
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.
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).
Response
The endpoint, with its signing secret once (null on a replay).
Opaque endpoint identifier (prefix wep_). Do not parse it.
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.
End of the rotation grace period while the previous secret is still valid; null otherwise.
First failed call-event attempt after the last success, creation or enable; null when the last attempt succeeded.
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.