SynapSynapDocs
Hub REST API

Playbooks

The Playbooks operations of the Hub REST API (5 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)

List playbooks

GET
/playbooks

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Query Parameters

workspaceId?string

Narrows to this workspace (pod-wide playbooks still included).

Formatuuid
status?string
Value in"draft""active""paused""archived"
limit?integer
Range1 <= value <= 100
cursor?string
Length1 <= length

Response Body

{ playbooks, nextCursor }

application/json
  1. response
playbooks*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://pod.example.com/api/hub/playbooks'
Example Response
{  "playbooks": [    {      "property1": null,      "property2": null    }  ],  "nextCursor": "string"}

Create a playbook

POST
/playbooks

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
name*string
Length1 <= length <= 500
goalTemplate*string

May reference a declared param as {name}; an undeclared name, or {{name}}, is refused.

Length1 <= length <= 5000
description?string
stages?array<>
status?string

Defaults to active.

Value in"draft""active""paused""archived"
subjectProfile?

The kind this playbook runs ON, e.g. { profileSlug: 'crm-lead' }. A profileSlug that resolves to no profile is refused.

scope?string

session (default) = a template for one focus session; project = a METHOD a project runs as a track.

Value in"session""project"
params?array<>

Declared params [{ name, label?, type: text|number|entity|choice|boolean, options?, default?, required? }]. Makes a method self-onboarding: a required param left unanswered when a track starts becomes a question owed to the person.

criteria?array<>

Binary acceptance criteria [{ key, statement, required?, check: { kind, ... }, stageKey? }] every instantiated session is graded against.

Itemsitems <= 12
workspaceId*string

The playbook's home workspace.

Formatuuid
forceCreate?boolean

Only after a CONFLICT naming an overlapping playbook. Creates anyway.

agentUserId?string

Response Body

Created (or existing by name)

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/playbooks' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "goalTemplate": "string",  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"}'
Example Response
{  "property1": null,  "property2": null}

Run a playbook

POST
/playbooks/{id}/run

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
workspaceId?string

Write home for the run. Omit to use the playbook's own workspace (then the subject's).

Formatuuid
subjectId?string
Formatuuid
params?
agentIds?array<string>
reasoning?string
agentUserId?string
projectId?string

File the run into this project (must be visible to you).

Formatuuid
trackId?string

File the run inside this track (a method running in a project). Implies its project.

Formatuuid
trackStage?string

The stage of that track the run is filed at. Omit for its current stage. Needs trackId.

Length1 <= length <= 120

Response Body

Running, or blocked

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/playbooks/497f6eca-6276-4993-bfeb-53cbbbba6f08/run' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "property1": null,  "property2": null}
POST
/runs/{runId}/cancel

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

runId*string

Response Body

Cancelled

application/json
  1. response
id*string
status*string
externalCancelled?boolean|null
note?string
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/runs/string/cancel'
Example Response
{  "id": "string",  "status": "string",  "externalCancelled": true,  "note": "string",  "property1": null,  "property2": null}
POST
/runs/{runId}/capture

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

runId*string

Request Body

application/json
  1. body
summary?string
Lengthlength <= 10000
status?string
Value in"running""completed""failed""proposed"
error?string
Lengthlength <= 10000
producedEntityIds?array<string>
usedCapabilities?array<>
agentUserId?string

Response Body

Capture recorded

application/json
  1. response
id*string
status*string
proposalId*string|null
Example Request
curl -X POST 'https://pod.example.com/api/hub/runs/string/capture' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "status": "string",  "proposalId": "string"}