Skip to content

Starting agents with an API key

Let your own software, a form backend or an automation tool start agents.

Admins create keys in Settings, API keys. A key can start every published agent or only the ones you choose. It's shown once, so copy it then. The page shows each key's last use.

Start a run

Send a POST with the key in the Authorization header. Settings, API keys shows your workspace's exact address and each agent's id.

POST https://<your workspace's API address>/api/runs
Authorization: Bearer <your key>
Content-Type: application/json

{ "agent": "<agent id>", "values": { "email": "ann@example.com" } }
  • The answer is 202 with the run's id when the run starts.
  • values are the agent's start-form fields. The run is refused with a reason if the agent is paused, not published, not ready, or the values don't fit its form.
  • A wrong or revoked key gets 401.
  • Safe retries: add an Idempotency-Key header with an id of your own (for example the order number). The same id from the same key within 24 hours starts nothing new; the answer is 200 with the first run's id.
  • Each key (and each webhook) can start up to 60 runs a minute; past that the answer is 429 with Retry-After.
  • Runs show how they started (the key's name), and creating or revoking a key is recorded in the activity log.

Use keys from a server or an automation tool, never in a web page: anyone who sees a key can use it. Make one key per place that uses it, so you can revoke one without touching the others.

All help topics