Skip to content

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.

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.

Terminal window
curl -X POST https://api.requence.cloud/api/webhook/WEBHOOK_ID/wait

Success response: the task result as JSON.

Error response (400):

{ "error": "reason" }

This is the recommended approach for most integrations.

If you omit /wait, Requence starts the task and returns a resultUrl immediately without waiting for the task to finish.

Terminal window
curl -X POST https://api.requence.cloud/api/webhook/WEBHOOK_ID

Response:

{
"resultUrl": "https://api.requence.cloud/api/webhook/WEBHOOK_ID/TASK_ID"
}

You can check the task status with a GET request on the resultUrl:

Terminal window
curl https://api.requence.cloud/api/webhook/WEBHOOK_ID/TASK_ID

While the task is running:

{ "status": "RUNNING" }

Once complete:

{ "status": "SUCCESSFUL", "result": { ... } }

Pass input data as a JSON body:

Terminal window
curl -X POST https://api.requence.cloud/api/webhook/WEBHOOK_ID/wait \
-H "Content-Type: application/json" \
-d '{"input": {"name": "World"}, "name": "My Task"}'
FieldTypeDescription
inputanyInput data for the task template (validated against the input schema)
namestring | nullOptional human-readable task name

You can also send multipart/form-data — Requence will automatically coerce field types to match the input schema.

To execute a webhook against a specific branch, add the branch query parameter:

Terminal window
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.