Documentation
Workflow API: run workflows from your own code
Every workflow is also an API. Publish it, create an API key, and your backend can send it input and read its output in one request. Each workflow has a Playground, a chat that runs it the same way the API does, with ready-to-copy cURL and Python beside it.
Create an API key
Open API keys in the sidebar and choose Create key. A key can run all of your workflows or only the ones you pick. It is shown once: Novalink keeps only a hash and its first few characters, so copy it straight into an environment variable.
Call a workflow
Send the key as a bearer token and the workflow's ID in the path. Only the published version runs, so edits in the editor never reach callers until you publish. The playground shows your exact URL and ID.
curl $NOVALINK_API_URL/v1/workflows/WORKFLOW_ID/runs \
-H "Authorization: Bearer $NOVALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": "Summarise this ticket" }'import os
import requests
response = requests.post(
f"{os.environ['NOVALINK_API_URL']}/v1/workflows/WORKFLOW_ID/runs",
headers={"Authorization": f"Bearer {os.environ['NOVALINK_API_KEY']}"},
json={"input": {"ticket_id": 4812, "priority": "high"}},
timeout=70,
)
run = response.json()
print(run["status"], run["output"])Input and output
input becomes the run's trigger payload. An object is used as it is, so { "ticket_id": 4812 } is read as {{ trigger.ticket_id }}. Text becomes { "message": ... }, read as {{ trigger.message }}, which suits chat-style workflows.
The reply's output is the value of the workflow's Output node. With several Output nodes it is an object keyed by node ID.
{
"run_id": "495f5053-...",
"workflow_id": "c43324cb-...",
"status": "succeeded",
"output": { "summary": "Customer cannot sign in since the update" },
"error": null,
"total_tokens": 812,
"duration_ms": 2140,
"status_url": null
}Waiting, polling and streaming
- Wait (the default): the request holds until the run ends, up to
timeoutseconds (30 by default, at most 60). A run that is still going answers 202 with astatus_url. - Poll: send
"wait": falseto get a 202 straight away, thenGET /v1/runs/RUN_IDwith the same key untilstatusissucceeded,failedorcancelled. - Stream: send
"stream": truefor Server-Sent Events. Agent replies arrive astokenevents while they are written, steps asnode.startedandnode.succeeded, and the last event isrun.completedwith the full result.
Errors and limits
Errors come back as { "detail": "..." } with one readable sentence. A run that starts but fails is not an error: it answers 200 with "status": "failed" and the reason in error.
- 401: the key is missing, wrong or revoked.
- 403: the key is limited to other workflows.
- 404: no workflow with that ID belongs to the key's account.
- 409: the workflow has not been published.
- 429: more than 60 runs a minute on one key. Wait for the seconds in
Retry-After.
Test it in the playground
Open a workflow and choose Playground. Each message runs the workflow once, as Text or as JSON, against the published version or your current draft. Replies show the output, the time and tokens it took, and a link to the run. The panel beside the chat holds the endpoint, the workflow ID and cURL and Python samples built from your last message. Playground runs appear in run history like any other.
Keep reading
- Credentials and securityHow Novalink stores API keys, app connections, API and MCP secrets and protects workflows: encryption at rest, redaction in run history, SSRF protection, and sandboxed templates.
- Execution controls: retries, timeouts and error handlingControl how Novalink runs AI workflows: per-node retries with backoff, timeouts and error modes, and run-wide parallelism, timeouts and token caps.
- Output node: mark the workflow resultThe Output node marks the result of a Novalink workflow run, from a template or from its input, so the run panel and run history show what the workflow produced.
Build it on the canvas
Create a free account, describe the workflow or wire it yourself, and run it in the browser.