API authentication
How to sign in to the Console, create a personal access token for scripts, and connect AI assistants such as Claude and ChatGPT.
En esta página
AgentRuntime has three ways to prove who you are. Which one you use depends on what you are doing.
| I want to… | Use | Section |
|---|---|---|
| Use the Console in my browser | Email and password, or Google | Sign in to the Console |
| Call the REST API from a script, CI job, or app | A personal access token (PAT) | Personal access tokens |
| Connect Claude, ChatGPT, or another AI assistant | Sign in with your AgentRuntime account, or a PAT | Connect an AI assistant |
Sign in to the Console
Go to console.agentruntime.io and choose one of:
- Email and password. New accounts must verify their email address before they can continue.
- Google. Sign in with your Google account.
If you forget your password, use the forgot-password link on the sign-in page. The Console keeps you signed in and refreshes your session automatically.
A workspace admin can set sign-in rules for members. If a sign-in option is missing, ask your workspace admin.
Personal access tokens (PATs)
A personal access token is a secret string, starting with pat_, that lets a script act as you with only the permissions you choose. It is the recommended way to call the REST API. The Console calls them API keys.
A token can never do more than you can. If your role is project_viewer, a token you create cannot start runs, even if you give it the workflow:run scope.
Create a token
- Open API keys
In the Console, open Settings, then the API keys tab. Click Create API key.
- Name it
Enter a Name that says what the key is for, for example
CI deploy. You can add an optional Description. - Choose scopes
A scope is one permission the token has. Click a template under Templates to fill in a set of scopes (see Scope templates), or tick scopes yourself under Scopes. Pick only what the script needs. Common choices:
Scope Lets the token… workflow:readList workflows, runs, events, and pending tasks workflow:runStart, pause, resume, and stop runs, and validate workflows workflow:editCreate, change, and archive workflows mcp:executeCall MCP tools directly, and run MCP steps from schedules and webhooks that use the token. Runs you start through the API don't need it mcp:read/mcp:writeRead, or change, connections, MCP servers, and instances task:complete:agent_reviewApprove or reject a task as a designated approver agent task:complete:on_behalfApprove or reject a task for a person who delegated it webhook:manageManage inbound webhooks agent:read/agent:writeRead, or change, agents analytics:readRead analytics billing:readRead usage and billing The dialog shows the full list under Scopes, grouped as Connections, Workflows, Agents, Chat, Memory, LLM, Work (boards & tasks), Inbound webhooks, Billing & usage, Platform and Administration. Each scope has a label, its code, and a short description. A count next to Scopes shows how many of the listed scopes your role can grant.
- Create and copy the token
Click Create key. The token is shown once. Copy it into a secrets manager. If you lose it, revoke the key and create a new one.
What you should see: the new key appears in the API keys list with its name and scopes. The secret itself is never shown in the list.
Scope templates
A template is a ready-made set of scopes for a common job. In the Create API key dialog, click a template under Templates. It selects its scopes and, for every template except All, fills in a suggested Name. You can still tick or untick scopes afterwards. Click an active template again to clear the selection.
| Template | What it grants | Scopes | Suggested name |
|---|---|---|---|
| All | Every scope your role can grant | All of them | None |
| Embedded Connect | Host connect popups, receive connection webhooks, and run workflows per end user | connect:write, connect:execute, workflow:run | Embedded Connect — production |
| Embedded Connect (connect only) | End users, connect links and partner webhooks only, with no workflow runs | connect:write | Embedded Connect — connect |
| Run workflows | Start runs through the API for workflows that already exist | workflow:read, workflow:run, mcp:execute | Workflow automation |
| Inbound webhooks | Trigger workflows from external HTTP webhooks | workflow:run, mcp:execute, webhook:manage | Inbound webhooks |
| Usage export | Read-only usage and billing reports. Add workflow scopes if the key also runs workflows. | billing:read | Usage export |
A template shows a lock if your role cannot grant all of its scopes. Hover over it to see which ones are missing. A single scope your role cannot grant is locked too. Ask a workspace admin if you need it.
Embedded Connect scopes
Three scopes are for Embedded Connect. They appear under Connections in the dialog.
| Scope | Label in the dialog | What it lets the key do |
|---|---|---|
connect:read | Read end users | Read end users and segments, for example GET /v1/principals, GET /v1/principal-segments and GET /v1/connect/sessions/{id} |
connect:write | Manage end users | Manage end users, segments, connect links and settings, for example POST /v1/connect/link, PUT /v1/principals/{id} and PUT /v1/embedded-connect/settings |
connect:execute | Run as end users | Run workflows as end users. Use it with workflow:run, and send external_user_id or segment_id on POST /v1/workflows/{id}/command |
The two scopes next to them, mcp:read (View connections) and mcp:write (Manage connections), cover connections in general. For end users and connect links, the hints in the dialog say to prefer connect:read and connect:write. The Embedded Connect template uses connect:write, connect:execute and workflow:run. Embedded Connect (connect only) uses connect:write, which includes everything connect:read does. Neither includes mcp:* scopes, so a partner's key can't change your MCP servers, tools or connections. If your backend also calls MCP tools directly, add mcp:execute yourself. Only workspace owners and admins can grant the connect:* scopes. Keys you made earlier keep their scopes.
The dialog notes that Embedded Connect partner webhooks use connect:write. The webhook:manage scope is only for inbound webhooks.
Use the token
Send the token in the Authorization header. The token already belongs to one workspace (and project, if you chose one), so you do not need to send a workspace header.
curl "https://api.agentruntime.io/v1/workflows" \
-H "Authorization: Bearer pat_YOUR_TOKEN"A 200 response with a list of workflows means the token works. A 401 means the token is wrong or revoked. A 403 means the token's scopes, or your role, do not allow that call.
Look after your tokens
- Give each script its own token so you can revoke one without breaking the others.
- Choose the narrowest scopes that work.
- Never put a token in git or in code that runs in a browser.
- To revoke a token, open Settings → API keys and click Revoke key. It stops working immediately.
If a token is exposed, revoke it straight away, create a new one, and check your recent runs for activity you do not recognize.
Connect an AI assistant
Platform MCP lets an AI assistant work with your workspace. You can connect in two ways:
Sign in with your AgentRuntime account (recommended for Claude and ChatGPT). Add AgentRuntime as a custom connector with the URL https://mcp.agentruntime.io/mcp. The assistant opens a sign-in page. Sign in as you normally do, and choose a workspace if you belong to more than one. You do not need to create or paste a token. Claude and ChatGPT both support this.
Use a PAT. Any MCP client that can send an HTTP header can connect with Authorization: Bearer pat_.... Use this for scripts, CI jobs, and tools that do not support sign-in. See Platform MCP for setup steps.
When you connect by signing in, the connection works in one workspace at a time. To change it, ask the assistant to switch workspace. See Platform MCP.
Inbound webhook signatures
Systems that start runs through an inbound webhook do not use a PAT. They sign each request with the subscription's signing secret.
Common problems
| Problem | What to check |
|---|---|
401 on every call | The token is mistyped, revoked, or missing the Bearer prefix |
403 on a call that should work | The token is missing a scope, or your role is too low. Compare against the API reference |
| A schedule or webhook run of a workflow with MCP steps fails to start | Add mcp:execute to the key it uses |
| Runs start but an MCP step fails | Check the tool's connection. See MCP instances |
| I cannot create a key | Only members who are allowed to create API keys can. Ask a workspace admin |
| The AI assistant shows the wrong workspace | Ask it to list your workspaces and switch, or reconnect |
Next steps
- API examples: your first request
- API reference: all endpoints and the role each needs
- Roles and permissions