On this page
createWebhookSubscription
mutation · in the family System and integration setup
What it does
Register a webhook — your endpoint gets signed POSTs when the events you pick happen.
Register an outbound webhook: OWNER-gated ENGINE-side (the caller's Account must hold group ownership LIVE); the target URL passes the egress law; every event name must be in the DERIVED deliverable universe; at most 10 ACTIVE subscriptions per group (the bounded fan-out law). Returns the subscription + the signing secret ONCE. Template class (integration config — hand-derived v71).
What happens
The signing secret shows ONCE at creation and never again; verify every delivery with it.
Careful
OWNER-gated. https endpoints only; at most 10 active subscriptions per group; repeated delivery failures auto-suspend the subscription.
Who may call it
Capability area: System and integration setup — Registers, connections and the settings your systems run on.
- Owner
- System Administrator
- An API key whose scope allows
api:createWebhookSubscription
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | CreateWebhookSubscriptionInput CreateWebhookSubscriptionInput! | yes | No further notes. |
Returns
WebhookSubscriptionMint WebhookSubscriptionMint! — The createWebhookSubscription result — the subscription + its signing secret, returned ONCE (plaintext in the non-streamed credential store; verify every delivery with it).
Example request
mutation ExampleCreateWebhookSubscription($input: CreateWebhookSubscriptionInput!) {
createWebhookSubscription(input: $input) {
secret
}
}
Variables:
{
"input": {
"caption": "Blue jeans",
"targetUrl": "https://example.com/hook",
"eventTypes": [
"<event types>"
]
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createWebhookSubscription": {
"secret": "<your key secret>"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. (VALIDATION)