Skip to main content
These examples use the public BFF at https://api.agentruntime.io. Replace tenant slug, project ID, workflow UUIDs, and tokens with your values. All authenticated examples require:
See API authentication for PAT scopes and session cookies.

Create a workflow

POST /v1/workflowsproject_contributor Request:
Response (201):

Publish a version

POST /v1/workflows/{id}/versionsproject_contributor Request:
Response (201):
Runs always execute a published snapshot, not draft edits.

Start a run

POST /v1/workflows/{id}/commandproject_contributor Request:
Response (200):
params become workflow input ({{input.customer_email}}, etc.).

Pause, resume, stop


Complete a human task

POST /v1/workflows/{id}/runs/{runID}/tasks/{task_id}/completeproject_contributor Approve only (Console default):
Approve with custom result fields:
Response (200):
See Human tasks.

Create inbound webhook subscription

POST /v1/inbound-webhooksproject_contributor Request (Vault-backed PAT id):
Request (paste bearer once):
Response (201):
signing_secret is returned once. List endpoints never include secrets.

Public ingress (external sender)

POST /v1/inbound-webhooks/{subscription_id}HMAC + Bearer PAT (no session cookie)

Create a custom connection

POST /v1/connectionsproject_contributor Request:
Response (201):
Secrets are stored in Vault; list/get responses do not return plaintext values.

Register a custom MCP server

POST /v1/mcp/serversproject_contributor Request:
Response (201):
Follow with discover → publish version → validate → POST /v1/mcp/instances. See Custom MCP servers.

Create a PAT

POST /v1/patsproject_contributor Request:
Response (201):
token is shown once. Create keys in the Console under Settings → API keys.

Billing usage snapshot

GET /v1/billing/usageproject_contributor Response (200):
Values are microcredits (1 credit = 1,000,000 microcredits). See Billing and credits.

Plan catalog (product-scoped)

GET /v1/billing/plansproject_contributor The BFF filters to its deployment product_code (agentruntime on api.agentruntime.io). Response omits product_code — it is implicit for this host. Response (200, excerpt):
Use stripe_price_id when starting trials or subscriptions via POST /v1/billing/subscription. See Multi-product billing.

Error responses

Most endpoints return JSON errors: