Using Webhooks
Once a webhook is created, you can start tasks by sending a POST request to the webhook URL. No SDK or access token is required.
Default: Wait for Result
Section titled “Default: Wait for Result”Send a POST to the webhook URL with /wait appended. This is the URL you get when clicking Copy Webhook URL in the UI. The request blocks until the task completes and returns the result directly.
curl -X POST https://api.requence.cloud/api/webhook/WEBHOOK_ID/waitSuccess response: the task result as JSON.
Error response (400):
{ "error": "reason" }This is the recommended approach for most integrations.
Advanced: Async Execution
Section titled “Advanced: Async Execution”If you omit /wait, Requence starts the task and returns a resultUrl immediately without waiting for the task to finish.
curl -X POST https://api.requence.cloud/api/webhook/WEBHOOK_IDResponse:
{ "resultUrl": "https://api.requence.cloud/api/webhook/WEBHOOK_ID/TASK_ID"}You can check the task status with a GET request on the resultUrl:
curl https://api.requence.cloud/api/webhook/WEBHOOK_ID/TASK_IDWhile the task is running:
{ "status": "RUNNING" }Once complete:
{ "status": "SUCCESSFUL", "result": { ... } }Sending Input
Section titled “Sending Input”Pass input data as a JSON body:
curl -X POST https://api.requence.cloud/api/webhook/WEBHOOK_ID/wait \ -H "Content-Type: application/json" \ -d '{"input": {"name": "World"}, "name": "My Task"}'| Field | Type | Description |
|---|---|---|
input | any | Input data for the task template (validated against the input schema) |
name | string | null | Optional human-readable task name |
You can also send multipart/form-data — Requence will automatically coerce field types to match the input schema.
Branch Targeting
Section titled “Branch Targeting”To execute a webhook against a specific branch, add the branch query parameter:
curl -X POST "https://api.requence.cloud/api/webhook/WEBHOOK_ID/wait?branch=BRANCH_ID"If omitted, the webhook always runs against the live (published) version.