Using the Workflows API
Workflows are a first-class/v1 resource. Everything you can do in the builder — create, update, run, inspect, and cancel — is available over the API, using KnoxCall’s standard response envelope, pagination, idempotency, and scopes.
Authentication & Scopes
Authenticate with a short-lived OAuth 2.1 access token (recommended — see Authentication; legacytk_… API keys also work as Bearer tokens). The credential’s mode (Live/Test) scopes every response. The curl examples below assume a minted token:
Read-only credentials can list and read; invoke credentials can additionally execute; editor/member credentials can manage. A credential without the required scope gets
403.
Response Envelope
Every response is wrapped:page and per_page query parameters and return pagination in meta:
Endpoints
Create a workflow
Thedefinition is a graph with a nodes array containing exactly one trigger node and an edges array. It’s validated (structure + reachable trigger) on write.
201 with the created workflow (version: 1). An invalid graph returns 422.
Execute a workflow (idempotent)
201 immediately:
X-Idempotency-Key again and you get the same execution back, with an X-Idempotent-Replay: true response header — a safe retry never starts a second run.
Inspect executions
List a workflow’s runs (the polling source for automation platforms):status is one of queued, running, waiting, paused, completed, failed, cancelled, or timed_out. Step inputs/outputs are redacted — secret values appear as [REDACTED].
Cancel a run
Webhook Events
Rather than polling, subscribe an outbound webhook to run-completion events:
These give automation platforms (Zapier, Make, n8n) an instant trigger on run completion. Configure them like any other webhook; payloads are signed and delivered through the same hardened egress.
SDKs, Postman & OpenAPI
The workflows resource is available in the KnoxCall SDKs (workflows.list / get / create / update / delete / execute / listExecutions / getExecution / cancelExecution), in the Postman collection (Workflows folder), and in the OpenAPI spec. The list methods (list / listExecutions) return the { data, meta } envelope; single-object methods (get / create / execute / …) return the unwrapped resource. The idempotency key is supported on create / execute.
Next Steps
Triggers
Webhook and app-event triggers
Webhooks
Get notified when runs finish