- Create an API token in the dashboard.
POSTto the runs endpoint with your workflow ID and aninputpayload.- Poll the run, or subscribe to a webhook, to get the result.
Create an API token
- Go to Tokens in the dashboard.
- Click Create Token, choose the API scope, and click Create.
- Copy the token immediately — it’s shown once and cannot be retrieved again. API tokens look like
api_xxxxxxxx….
Tokens are tied to the organization, not to a single workflow — one API token can trigger any published workflow in your org.
Find your workflow ID
Open the workflow in the dashboard. The numeric ID is shown on the workflow view page and is the last segment of its URL (https://dash.champ.ai/app/workflows/<WORKFLOW_ID>). You’ll use it in the request path below.
Trigger a run
Send aPOST request to the runs endpoint:
Path parameter. The numeric ID of a published workflow.
Request header.
Bearer <YOUR_API_TOKEN> — an API-scoped token from the Tokens page.Request body. A JSON object passed to the workflow’s Start node. Provide the fields your workflow expects; omit it (or pass
{}) for workflows that take no input.| Field | Description |
|---|---|
id | Unique run ID. Use it to poll for status. |
status | Run status — see run statuses. Newly created runs are pending. |
input | The input payload the run was started with. |
output | The workflow’s final output. null until the run reaches a terminal state. |
url | Absolute URL to poll this run’s status. |
Only published workflows can be triggered via the API. Ticketing workflows cannot be started this way — they run off ticket events instead.
Check run status
Because runs execute asynchronously, thePOST response will usually show status: "pending" with output: null. Poll the run — using the url from the response, or by constructing it yourself — until it reaches a terminal state:
workflow_run shape as above. Once status is completed, the output field holds the workflow’s result.
Run statuses
| Status | Meaning |
|---|---|
pending | Run created, not yet started. |
in_progress | Run is executing. |
completed | Run finished successfully — output is populated. |
failed | Run terminated with an error. |
suspended | Run is paused, waiting on an external signal. |
skipped | Run did not execute. |
Errors
| Status | When |
|---|---|
401 | Missing or invalid Authorization header. |
404 | Workflow or run not found — or the workflow isn’t published. |
422 | The workflow can’t be run via the external API (e.g. ticketing workflows). |
error message.
