Deliver to a webhook
POST/
A published workflow’s public address: any request to it starts a production run, and the answer can be the run’s result.
Needs no API token: the token in the address is the key. See Call a workflow’s webhook.
Parameters
Path
tokenRequired · stringThe workflow’s
webhookToken, from Publish a workflow.
Query
asyncOptional · stringtrueanswers202as soon as the run is queued. Anything else waits, up to 30 seconds.
Headers
Idempotency-KeyOptional · stringUp to 255 characters. A retry with the same key and the same method, query and body starts no second run: it gets the first run’s answer, with
Idempotency-Replayed: true. Kept 24 hours.
Body
Any body, any Content-Type, up to 5 MiB. It becomes {{trigger.body}}.
A Return Response step
A Return Response step decides the answer instead: its status, headers and body. The run headers come with it.
Responses
- 200OK
The run finished within 30 seconds. The body is the last step’s output, or
{}.X-Run-IdandX-Run-Statusare set. - 202Accepted
Still going after 30 seconds, paused, or waiting for a free slot; or
?async=true. The body hasrunId. A NUL in the address, or a body that couldn’t be read.
- 401
UNAUTHORIZEDThe trigger’s Authentication, or an app’s signature check, failed. Nothing runs.
- 404
NOT_FOUND“Webhook not found.” The address is wrong or was replaced, the workflow isn’t published, or its trigger isn’t one this address is for.
The trigger’s
methodsleaves this method out.Allowlists the ones it takes.- 409
CONFLICTThe run was cancelled, while it waited for a slot or while it ran. Or the
Idempotency-Key’s first delivery is still being recorded (Retry-After: 1), or its run has since been deleted. The body is over 5 MiB. Nothing runs.
This
Idempotency-Keywas already used with a different request.- 429
RATE_LIMITEDThis address sent more than
WEBHOOK_RATE_LIMITrequests this minute.Retry-Aftersays when to try again. The workflow is at its runs-at-once limit and is set to Refuse.
Too many runs are already waiting, for the organization or this workflow.
- 500
The run failed. Read the run for the reason.
The address couldn’t be looked up just now, or nothing can run the workflow. Retry after
Retry-After.The account is suspended.
Retry-After: 3600.- 503
PAUSEDA self-hosted installation has no license.
Retry-After: 3600. Nothing can run the workflow just now, and nothing was recorded.
Retry-After: 10. With?async=true, the run is queued instead.GoRunner couldn’t check which apps this workspace may use. Nothing changed. Try again.
The run finished, but its answer couldn’t be read back. Read it with the ID in
X-Run-Id.- 504
The run failed on a time limit.
Any call can also answer: 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 415 INVALID_CONTENT_TYPE · 503 BUSY. See Errors.
Request
GORUNNER="https://api.gorunner.io"
WEBHOOK_TOKEN="your-webhook-token"
curl -i -X POST "$GORUNNER/api/webhooks/$WEBHOOK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"orderId": "A-1001"}'const GORUNNER = "https://api.gorunner.io";
const WEBHOOK_TOKEN = process.env.WEBHOOK_TOKEN;
const res = await fetch(
`${GORUNNER}/api/webhooks/${WEBHOOK_TOKEN}`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ orderId: "A-1001" }),
},
);
const answer = await res.json();
console.log(res.status, res.headers.get("X-Run-Id"), answer);import os, requests
GORUNNER = "https://api.gorunner.io"
WEBHOOK_TOKEN = os.environ["WEBHOOK_TOKEN"]
res = requests.post(
f"{GORUNNER}/api/webhooks/{WEBHOOK_TOKEN}",
json={"orderId": "A-1001"},
)
print(res.status_code, res.headers.get("X-Run-Id"), res.json())Response · 200 OK, the last step’s output, with no data envelope
{
"orderId": "A-1001",
"accepted": true
}Every field
The delivery, any content type: it becomes the run’s trigger data ({{trigger.body}}).
200 OK: a body.
Response · 202 Accepted
dataobjectrunIdUUIDstatusstringrunning,paused,waitingorpending(pendingwhen not waited for: queued). Absent with?async=true.messagestringA sentence for a person: what to do next.
waitstringoverloaded: not waited for, because the server held as many waiting callers as it may.One of
overloaded.pollstringWith
wait: overloaded: where to read the run.