POST/v1/webhooks
Create a webhook
create_webhook
The URL must use https, and its host must resolve to public addresses. Private (RFC 1918), loopback, link-local, cloud metadata and other special-purpose networks are rejected both at registration and on every connection. The signing secret is shown once in the response (secret); after that it can only be rotated. An organization can have at most 20 webhooks.
The subscription lists event types and domain masks (card.*, *). Access is set the same way as for an API key: role, data_profile_id and collection_ids. An event about an object that the role, the data profile or the collections cannot see is not delivered. tags limit card events to cards with any of the tags. payload: thin sends events without data. Custom headers (headers) and outbound authorization (auth) are stored encrypted; responses contain only the header names and the value_set and auth_set flags.
Authentication
Send an API key in the Authorization header: Authorization: Bearer <key>.
Header parameters
Idempotency-KeystringKey for a safe retry of a write: 1 to 255 printable ASCII characters; a UUID v4 per logical operation is recommended. A retry with the same key within 24 hours does not run the operation again: it returns the saved response (status, headers and body) with the
Idempotency-Replayed: trueheader. The same key with a different method, path,Content-Typeor body returns409 api.idempotency_mismatch; while the first request is still running,409 api.idempotency_in_progresswithRetry-After: 1. After a 5xx or 429 response the key is released, and a retry runs the operation again. The key is scoped to the organization and the caller (API key, user, or custom source key).length ≥ 1, length ≤ 255
Request body
application/json
urlstringrequiredReceiver URL,
https://only, up to 2048 characters.length ≤ 2048
descriptionstringlength ≤ 200
items ≥ 1
roleWebhookRoledata_profile_idinteger | nullcollection_idsarray of integerCollections the webhook receives events about. No value or an empty list means all collections available to the role and the data profile. A key that is itself restricted to collections creates a webhook only with a non-empty list of its own collections. Without this field, with an empty list or with a collection outside its list, the request returns
403 webhooks.collections_outside_key.items ≤ 200
tagsarray of stringitems ≤ 50
payloadWebhookPayloadModeheadersarray of WebhookHeaderInputitems ≤ 10
authWebhookAuthInput
Responses
201Created. This is the only time `secret` is shown.
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
Idempotency-Replayedtruemeans the response was replayed from the saved one for thisIdempotency-Key: the operation did not run again.
application/json
idintegerrequiredurlstringrequireddescriptionstringrequiredactivebooleanrequiredpaused_atstring (date-time) | nullpaused_reasonstring | nullfailures: 10 failed attempts in a row;feature_disabled: the plan does not include webhooks.disabled_reasonstring | nullgone: the receiver answered 410;manual: disabled by an admin.Allowed values:
gonemanualnulldisabled_atstring (date-time) | nulldata_profile_idinteger | nullData profile of the webhook (
nullmeans no profile, as for an API key with the same role).collection_idsarray of integerrequiredCollections the webhook receives events about; empty means all collections available to the role and the data profile.
tagsarray of stringrequiredCard events only for cards with any of these tags; empty means no filter.
auth_typestring | nullType of the outbound authorization (
nullmeans none).Allowed values:
bearerbasicnullauth_setbooleanrequiredWhether outbound authorization is set (the values are never returned).
previous_secret_valid_untilstring (date-time) | nullUntil when deliveries are also signed with the previous secret (
nullmeans there is no overlap).healthWebhookHealthconsecutive_failuresintegerrequiredlast_delivery_atstring (date-time) | nulllast_success_atstring (date-time) | nulllast_errorstring | nullcreated_byinteger | nullcreated_by_namestring | nullcreated_atstring (date-time)requiredupdated_atstring (date-time)requiredsecretstringrequiredwhsec_followed by 32 bytes in base64 (new secrets use the standard alphabet with padding, older ones use base64url). Store it on the receiver side; it never appears in API responses again. The Standard Webhooks signing key is the base64 decoding of the part afterwhsec_.previous_valid_untilstring (date-time) | nullUntil when the previous secret is still accepted (after a rotation).
nullon creation.
400The request is invalid: a parameter value or the state of the object does not allow the action (`detail` is a message).
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
401No credentials were sent (neither a session cookie nor an API key), or the key was not found.
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
403The action is not allowed: the role is insufficient, there is no access to the collection or card, the request runs in “View as” mode, or the organization is suspended or deleted (`detail` is an object with `code: org_suspended | org_deleted`).
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
409The state of the object does not allow the action, for example a duplicate, indexing in progress, or a job that is already processed.
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
422Validation error: the body or parameters do not match the schema (`detail` is a list of validation errors), or a parameter value is out of range (`detail` is a message).
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
429Too many requests (`api.rate_limited`), the organization's quota for the minute, day or month is used up (`api.quota_exceeded`; `error.details` holds `quota`, `limit` and `reset_at`), the organization's limit is reached, or the answer service is busy (`answers.engine_busy`). Wait for the time in the `Retry-After` header.
Response headers
Retry-AfterNumber of seconds to wait before you retry the request.
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
Error codes
Codes this endpoint can return in error.code, besides the general codes of every request.
- 409api.idempotency_in_progress
- 400api.idempotency_key_invalid
- 409api.idempotency_mismatch
- 403webhooks.feature_disabled
- 401auth.not_authenticated
- 403authz.forbidden
- 400webhooks.invalid_url
- 400webhooks.private_address
- 400webhooks.unresolvable
- 400webhooks.unknown_event
- 400webhooks.events_required
- 400webhooks.description_too_long
- 409webhooks.too_many
- 400webhooks.headers_invalid
- 400webhooks.auth_invalid
- 400webhooks.access_invalid
- 403webhooks.collections_outside_key
Safe retries
Send an Idempotency-Key header (for example a UUID) with each POST and PATCH. A retry with the same key within 24 hours returns the saved response instead of running the request again.
Rate limits
Responses carry the RateLimit and RateLimit-Policy headers and the earlier X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A 429 response has Retry-After in seconds: wait and retry.