Authentication
Create API keys, configure scopes, and authenticate requests to the Wireflow API.
The Wireflow API uses API keys for authentication. Authenticated API-key routes must include a valid key in the Authorization header.
The node and model catalogs are public. Some diagnostic reads accept browser sessions only; their pages label that restriction.
Creating API Keys
- Go to Settings > API Keys in the Wireflow dashboard
- Click Create API Key
- Give it a name and select the scopes you need. A new key starts read-only (
workflows:readandexecutions:read); pick Full access or tick more scopes if your integration needs to edit or run workflows - Copy the key; it starts with
sk-and is only shown once
Making Authenticated Requests
Include your API key as a Bearer token:
curl https://www.wireflow.ai/api/v1/workflows \
-H "Authorization: Bearer sk-your-api-key"
If the key is missing or invalid, the API returns 401 Unauthorized:
{
"error": { "type": "authentication_error", "message": "Invalid API key", "code": "invalid_api_key" }
}
Scopes
When creating an API key, assign only the scopes your integration needs.
| Scope | Description | Can spend credits |
|---|---|---|
workflows:read |
Read your workflows, folders, templates and uploaded media, including the full contents of each workflow. | No |
workflows:write |
Create, edit, duplicate, publish, share and delete workflows and folders, and change your profile. Also allows viewing your workflows and uploaded files, and joining the live session of boards you collaborate on (your own, or shared with you by invite, folder or edit link), with the same edit rights you have there. | No |
workflows:execute |
Start runs of your workflows, and resume paused ones. Every run spends credits. Also allows viewing your workflows and uploaded files. Add "View run results" too, or the key can start a run but cannot read what it produced. | Yes |
templates:execute |
Run a template from the catalog. Every run spends credits. Also allows viewing your workflows and uploaded files, and reading run results. | Yes |
apps:execute |
Run apps published from your workflows. Every run spends credits. | Yes |
renders:execute |
Submit video renders and read their progress. Renders spend no credits today, and limits apply per account. | No |
executions:read |
Read the status, logs and output of runs that have already happened. | No |
content:write |
Create and edit public documentation, and lock or unlock docs pages. Requires an admin account and this explicit scope; full access ("*") does not include it. | No |
usage:read |
Read your credit balance, usage history and billing totals. | No |
social:read |
List your connected social accounts (the id a Social Publish node posts to, plus platform, handle, display name, whether it can post right now, and its analytics state), read your personal and active team content calendars, and read the performance (views, reach, likes, comments, shares, saves) of their posts. Cannot post on its own. | No |
social:publish |
Create, edit, move and delete content calendar plans (deleting has no undo), change social post publishing settings, and create and list the lead lists Instagram email capture adds to (names and lead counts, never the emails). Also allows viewing connected social accounts, calendars and post analytics. Planning spends no credits. | No |
teams:invite |
Invite people to a team you own or administer, and share workflows and folders you own by email. This SENDS A REAL EMAIL INVITATION from Wireflow to the address given. The person joins the team only after they accept it. A key must name this scope EXPLICITLY. A full-access ("*") key does not include it. | No |
A new key without an explicit scope list gets workflows:read and executions:read. Full access (*) excludes teams:invite, content:write; name those permissions explicitly.
Holding workflows:execute or workflows:write or templates:execute also grants workflows:read.
Holding templates:execute also grants executions:read.
Holding social:publish also grants social:read.
A key with workflows:execute still needs executions:read to poll its results. MCP OAuth permissions use a separate catalog.
Verify which account a key acts as
API keys and the MCP connector resolve identities independently. If you run more than one key or agent, confirm the identity before writing:
curl https://www.wireflow.ai/api/v1/me \
-H "Authorization: Bearer sk-your-api-key"
{
"data": {
"userId": 42,
"email": "you@example.com",
"name": "You",
"plan": "PRO",
"credits": 1200,
"authMethod": "api_key"
}
}
Works with any valid key, no extra scope needed. The MCP server exposes the same check as the whoami tool.
With an API key, data also carries an optional agent object for the agent reading it: guidelinesUrl (the operating guidelines), mcpUrl and mcp (what connecting the MCP server adds), whatsNew (up to three newest launches with a model slug or a link) and beyondModels (one line on what exists beyond model calls, with the guidelines pointer). A browser session never gets it. Treat every field as optional.
Key Expiration
API keys can have an optional expiration date. Expired keys return 401 with the message "API key has expired". You can set expiration when creating the key, or leave it blank for a non-expiring key.
Best Practices
- Never commit API keys to version control. Use environment variables or a secrets manager.
- Use the minimum scopes required. A key that only needs to execute workflows should not have
workflows:write. - Rotate keys regularly. Create a new key, update your integration, then delete the old one.
- Set expiration dates on keys used for temporary integrations or CI/CD.
- Use separate keys for different environments (development, staging, production).
Environment Variable Example
# .env (never commit this file)
WIREFLOW_API_KEY=sk-your-api-key
const response = await fetch('https://www.wireflow.ai/api/v1/workflows', {
headers: {
Authorization: `Bearer ${process.env.WIREFLOW_API_KEY}`,
},
});
Related
- Quickstart
The Wireflow REST API runs your AI workflows from code: authenticate with an sk- key, start a run, then poll or get a webhook with the result.
- Errors
Error response format, error types, and HTTP status codes for the Wireflow API.
- MCP connector
Connect Claude (and any MCP client) to Wireflow over the Model Context Protocol to build, inspect, and run AI workflows and generate and edit media through one canvas, API, and MCP.
- Rate limits
Enforced request limits and how to retry throttled requests.