[Go to site: main page, start]

Skip to content

REST API ​

Trigger flows, list runs, fetch results, and download artifacts programmatically.

Authentication ​

Routes under /api/v1 require an API key passed in the Authorization header:

Authorization: Bearer pk_your_api_key_here

Click your name or avatar at the bottom-left of the sidebar, then open Profile > API Keys. The full key is shown only once when it is created, so copy it before closing the dialog.

Base URL ​

https://your-instance.com/api/v1

Path parameters ​

Most endpoints use the same path parameters:

ParameterDescription
{id}Flow ID (flow_...).
{run}Run ID (integer).
{workspace}Workspace ID (work_...). Workspace detail and update endpoints also accept a lookup key.
{user}User ID (user_...).
{team}Team ID (team_...).

Endpoints ​

Flows & Folders ​

List or search flows, inspect a flow, trigger a run, and browse folders.

GET /flows, GET /flows/search, GET /flows/{id}, POST /flows/{id}/trigger, GET /folders

Workspaces ​

List, inspect, create, and update workspaces. Deletion is intentionally not exposed through the REST API.

GET /workspaces, POST /workspaces, GET /workspaces/{workspace}, PATCH /workspaces/{workspace}, PUT /workspaces/{workspace}

List workspaces ​

http
GET /workspaces

Returns the workspaces visible to the API key owner.

ParamTypeDescription
searchstringSearch by workspace name, slug, lookup key, or ID.
limitintegerMaximum results, from 1 to 100. Default: 50.

Create or upsert a workspace ​

http
POST /workspaces

lookup_key is an optional globally unique, stable identifier. When it does not exist, the endpoint creates a workspace and returns 201. When it already exists, the endpoint updates that workspace and returns 200 instead of creating a duplicate.

Creating a new workspace requires an instance admin or a user with workspace creation enabled. Updating an existing workspace by lookup key requires an instance admin or workspace admin/manager.

json
{
  "name": "Production",
  "lookup_key": "production_eu",
  "preferences": {
    "viewport_width": 1440,
    "viewport_height": 900
  },
  "appearance": {
    "icon_type": "emoji",
    "icon_value": ":rocket:"
  }
}

name is required when a new workspace is created. It may be omitted when lookup_key resolves to an existing workspace.

Get a workspace ​

http
GET /workspaces/{workspace}

Returns the workspace name, lookup key, preferences, appearance, and resource counts. {workspace} may be its ID or lookup key.

Update a workspace ​

http
PATCH /workspaces/{workspace}

PUT /workspaces/{workspace} is also accepted and behaves like PATCH: omitted fields are left unchanged. {workspace} may be the ID or lookup key. The API key owner must be an instance admin or workspace admin/manager.

The API can update:

You may send these fields at the top level or grouped under preferences and appearance.

FieldTypeDescription
namestringWorkspace display name.
lookup_keystring | nullGlobally unique API identifier. Must start with a lowercase letter and contain only lowercase letters, numbers, underscores, or hyphens.
runs_retention_defaultintegerDefault run retention for flows without an override.
runs_retention_maxintegerMaximum retention a flow can request.
default_flow_timeout_secondsintegerDefault flow timeout.
max_flow_timeout_secondsintegerMaximum flow timeout.
max_retries_defaultintegerDefault retry count.
max_retries_maxintegerMaximum retry count.
expires_atdatetime | nullOptional workspace expiration date.
viewport_widthintegerDefault browser viewport width.
viewport_heightintegerDefault browser viewport height.
keyboard_speedintegerDefault keyboard delay, from 0 to 10000 milliseconds.
default_user_agentstring | nullDefault printable ASCII browser user agent.
default_languagestringDefault browser language.
allow_trigger_advertisingbooleanLegacy stored preference. Trigger and action access is controlled by their Visibility.
require_two_factorbooleanRequire 2FA for workspace members when the instance entitlement is enabled.
default_flow_codestring | nullDefault JavaScript template for new code flows.
icon_typeemoji | colorAPI-managed workspace icon type. Uploaded icons are not managed by this endpoint.
icon_valuestring | nullEmoji token or display value.
icon_colorstring | nullHex color for color icons.

Workspace settings remain capped by instance-level license limits. For example, retention, timeout, and retry values may be reduced to the maximum allowed by the instance.

Users ​

Create, inspect, and update users for tenant provisioning. These endpoints require an instance admin API key.

GET /users, POST /users, GET /users/{user}, PATCH /users/{user}, PUT /users/{user}

Create or update a user ​

http
POST /users
PATCH /users/{user}

PUT /users/{user} is also accepted and behaves like PATCH: omitted fields are left unchanged.

json
{
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "jane@example.com",
  "password": "secret-password",
  "role": "member",
  "can_create_workspace": true,
  "workspaces": [
    { "id": "work_k8Zt3xQ9mA2f", "role": "manager" }
  ],
  "team_ids": ["team_k8Zt3xQ9mA2f"]
}

name is the stored profile name. If omitted, first_name and last_name are combined.

team_ids requires the Teams feature:

  • When workspaces is present, every team must belong to one of those workspaces.
  • When workspaces is omitted, Puppetflow creates the required workspace memberships.

Teams ​

Create, inspect, and update workspace teams, then assign users to teams. Team deletion is not exposed through the REST API.

GET /workspaces/{workspace}/teams, POST /workspaces/{workspace}/teams, GET /teams/{team}, PATCH /teams/{team}, PUT /teams/{team}

Team members ​

http
POST /teams/{team}/members
PUT /teams/{team}/members
PUT /workspaces/{workspace}/members/{member}/teams

Use POST /teams/{team}/members to add one or more existing workspace members and PUT /teams/{team}/members to replace a team's complete member list:

json
{
  "member_ids": ["user_k8Zt3xQ9mA2f"]
}

Use PUT /workspaces/{workspace}/members/{member}/teams with {"team_ids": ["team_k8Zt3xQ9mA2f"]} to replace one member's team assignments. Users must already belong to the workspace.

Runs ​

List, search, and inspect flow runs.

GET /runs/search, GET /flows/{id}/runs, GET /flows/{id}/runs/search, GET /flows/{id}/runs/{run}, GET /flows/{id}/runs/{run}/result, POST /flows/{id}/runs/{run}/continue

Artifacts ​

List, download screenshots/files, fetch recordings, and read captured response bodies.

GET /flows/{id}/runs/{run}/artifacts/{type}, GET /flows/{id}/runs/{run}/artifacts/{type}/{filename}, GET /flows/{id}/runs/{run}/recording, GET /flows/{id}/runs/{run}/recording/lastshot, GET /flows/{id}/runs/{run}/sniff-bodies/{captureId}

Webhook triggers ​

Webhook triggers have their own public endpoint that does not require API key authentication:

http
POST /api/trigger/{token}

The token is unique per trigger. The configured trigger input is always used. The request body is added to $input when Merge POST data into input is enabled.

Successful requests return status, run_id, and flow_id.

The endpoint accepts payloads up to 10 MB, 5,000 fields, and 32 levels of nesting. It is throttled per IP using TRIGGER_RATE_LIMIT_PER_MINUTE, which defaults to 120 requests per minute.

Repository webhooks ​

http
POST /api/webhooks/github/{webhookId}
POST /api/webhooks/gitlab/{webhookId}
POST /api/webhooks/gitea/{webhookId}
POST /api/webhooks/bitbucket/{webhookId}

Handles repository push events for configured branches. Payloads are limited to 10 MB and requests are throttled per IP using REPOSITORY_WEBHOOK_RATE_LIMIT_PER_MINUTE, which defaults to 300 requests per minute.

MCP server ​

Puppetflow includes an MCP-compatible JSON-RPC server for exposing workspace flows as tools.

Universal endpoint ​

The recommended entry point for Claude, ChatGPT, and other OAuth-capable clients is the central Puppetflow broker:

http
POST https://mcp.puppetflow.com/mcp
Authorization: Bearer broker_access_token_here

The broker asks for the Puppetflow instance, then delegates sign-in and workspace selection to it. MCP requests are proxied to the selected workspace.

OAuth discovery uses /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server on mcp.puppetflow.com. Artifacts use opaque https://mcp.puppetflow.com/artifacts/{id} URLs tied to the connection.

Token endpoint ​

Workspace MCP tokens call the global MCP endpoint:

http
POST /api/mcp-server/http
Authorization: Bearer mcp_your_token_here

Artifact URLs returned by MCP tools use:

http
GET /api/mcp-server/flows/{id}/runs/{run}/artifacts/{type}/{filename}

OAuth endpoints ​

OAuth MCP clients call either the instance-level endpoint, where the user picks the workspace during authorization:

http
POST /mcp
Authorization: Bearer oauth_access_token_here

or the workspace-scoped endpoint, which locks the client to one workspace:

http
POST /api/workspaces/{workspace}/mcp-server/http
Authorization: Bearer oauth_access_token_here

Artifact URLs returned by OAuth-authenticated MCP tools use the same prefix as the endpoint that served the call:

http
GET /mcp/flows/{id}/runs/{run}/artifacts/{type}/{filename}
GET /api/workspaces/{workspace}/mcp-server/flows/{id}/runs/{run}/artifacts/{type}/{filename}

OAuth clients use the authorization code flow with PKCE S256 and the mcp scope. MCP clients discover the authorization endpoints from the protected-resource challenge:

http
GET /oauth/authorize
POST /oauth/token
POST /oauth/register
POST /oauth/register/{workspace}
GET /.well-known/oauth-protected-resource/mcp
GET /.well-known/oauth-authorization-server
GET /.well-known/oauth-protected-resource/api/workspaces/{workspace}/mcp-server/http
GET /.well-known/oauth-authorization-server/workspaces/{workspace}

Dynamic Client Registration lets compatible clients create a public OAuth client automatically. Administrators can also create and revoke fixed workspace OAuth clients under Workspace > Settings > MCP.

JSON-RPC methods ​

The server supports:

MethodDescription
initializeReturns protocol version, tool capabilities, and server info.
tools/listLists enabled tools for the workspace MCP settings.
tools/callCalls one enabled tool with JSON arguments.

Tool call responses include both text content and structuredContent.

Requests must use Content-Type: application/json. The Accept header may be application/json or */*. Supported MCP-Protocol-Version values are 2025-03-26, 2025-06-18, and 2025-11-25. JSON-RPC notifications return 204 No Content.

Tools ​

ToolDescription
search_flowsSearch flows visible to the connected user.
get_flow_detailsGet the details and configuration of an exposed flow.
get_flow_sourceGet editable code or the complete nodal graph for an accessible flow.
list_foldersList visible flow folders.
get_flow_creation_optionsGet allowed folders, teams, and visibility scopes for a new flow.
get_nodal_catalogRead the runtime helper and visual-node catalog.
list_flow_resourcesList resources that may be referenced while authoring a flow or snippet.
write_code_flowCreate or update a JavaScript flow.
write_nodal_flowCreate or update a visual flow.
publish_flowPublish the editable flow draft as a new version.
unpublish_flowUnpublish a flow without deleting its history or draft.
list_flow_triggersList cron and webhook triggers for an exposed flow.
create_flow_triggerCreate a cron or webhook trigger.
update_flow_triggerUpdate a flow trigger.
delete_flow_triggerPermanently delete a flow trigger.
list_flow_actionsList post-run webhook actions for an exposed flow.
create_flow_actionCreate a post-run webhook action.
update_flow_actionUpdate a flow action.
delete_flow_actionPermanently delete a flow action.
search_snippetsSearch visible snippets.
get_snippet_sourceGet editable source for an accessible snippet.
get_snippet_creation_optionsGet allowed teams and visibility scopes for a new snippet.
write_code_snippetCreate or update a JavaScript snippet.
write_nodal_snippetCreate or update a visual snippet.
publish_snippetPublish the editable snippet draft as a new version.
unpublish_snippetUnpublish a snippet without deleting its history or draft.
search_runsSearch runs visible to the connected user.
list_flow_runsList recent runs for an exposed flow.
run_flowExecute an exposed flow with optional JSON input.
get_runInspect an MCP-visible run.
get_run_resultFetch the run output.
continue_human_validationContinue a run waiting for human validation.
list_artifactsList screenshots or downloads for a run.
get_latest_screenshotReturn the latest screenshot URL for a run or flow.
download_artifactReturn a secure download URL for a specific artifact.
get_recordingReturn a secure recording URL for a run.
get_recording_lastshotReturn the final recording frame URL.
get_current_workspaceRead the connected workspace configuration.
update_current_workspaceUpdate the connected workspace configuration.
list_workspace_membersList visible workspace members.
list_teamsList workspace teams.
get_teamGet a team and its members.
create_teamCreate a workspace team.
update_teamRename a workspace team.
add_team_membersAdd workspace members to a team.
replace_team_membersReplace a team's complete member list.
set_member_teamsReplace one member's team assignments.

Every tool declares a human-readable title and read-only or destructive annotations. MCP runs are opt-in per workspace and per flow. A flow must be visible to the connected user and have Available in MCP enabled before it can be executed.

Error responses ​

Most resource and permission errors use:

json
{
  "error": "Flow not found."
}
CodeMeaning
401Missing or invalid API key.
403API key lacks permission for this resource.
404Flow, run, workspace, or artifact not found.
422Validation error (invalid type, bad input).
429Run quota reached.

Validation and quota errors use a message field, and validation responses can also include an errors object.

Rate limits ​

Authenticated /api/v1 routes are not rate limited, but flow runs depend on available queue workers.

Public endpoints are throttled per IP:

  • Flow trigger webhooks: 120 requests per minute by default
  • Repository webhooks: 300 requests per minute by default

Schedule triggers are evaluated once per minute.