SynapDocs
Hub REST API

FocusSessions

The FocusSessions operations of the Hub REST API (17 operations).

For BuildersOpen-source podSynap Cloud

Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.

GET
/focus-sessions

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
projectId?string
status?string
Value in"active""paused""forming""scheduled""closed""failed""cancelled""stale""all"
lens?string
Value in"default""triage""all"
kind?string
Value in"work""run""receipt""all"
playbookId?string
Formatuuid
automationId?string
Formatuuid
subjectEntityId?string
Formatuuid
subjectProfileSlug?string
Length1 <= length
limit?integer
Range1 <= value <= 50
offset?|
Range0 <= value

Response Body

Sessions

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://pod.example.com/api/hub/focus-sessions'
Example Response
[  {    "id": "string",    "workspaceId": "string",    "projectId": "string",    "userId": "string",    "correlationId": "string",    "title": "string",    "goal": "string",    "status": "string",    "templateId": "string",    "expectedOutputs": null,    "channelId": "string",    "progress": 0,    "currentStage": "string",    "agentIds": [      "string"    ],    "closedAt": "string",    "verificationReport": null,    "metadata": null,    "startedAt": "string",    "createdAt": "string",    "updatedAt": "string",    "kind": "work"  }]

Create a focus session

POST
/focus-sessions

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
workspaceId?string
Match^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
Formatuuid
projectId?string
Length1 <= length
trackId?string
Formatuuid
trackStage?string
Length1 <= length <= 120
userId*string
Length1 <= length
title?string
Lengthlength <= 200
goal*string
Length1 <= length <= 2000
correlationId?string
templateId?string|null
params?
outcomes?array<>
Itemsitems <= 40
expectedOutputs?array<>
criteria?array<unknown>
channelId?string
Formatuuid
agentIds?array<string>
subjectEntityId?string
Formatuuid
parentSessionId?string
Formatuuid
suspendedIntent?string
Length1 <= length <= 2000
blockedBySessionIds?array<>
Itemsitems <= 20
forceCreate?boolean

Response Body

Created or existing session

application/json
  1. response
id*string
workspaceId*string|null
projectId*string|null
userId*string
correlationId*string|null
title*string|null
goal*string
status*string
templateId*string|null
expectedOutputs?unknown
channelId*string|null
progress*number|null
currentStage*string|null
agentIds*array<string>
closedAt*string|null
verificationReport?unknown
metadata?unknown
startedAt*string
createdAt*string
updatedAt*string
kind?string
Value in"work""run""receipt"
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions' \  -H 'Content-Type: application/json' \  -d '{  "userId": "string",  "goal": "string"}'
Example Response
{  "id": "string",  "workspaceId": "string",  "projectId": "string",  "userId": "string",  "correlationId": "string",  "title": "string",  "goal": "string",  "status": "string",  "templateId": "string",  "expectedOutputs": null,  "channelId": "string",  "progress": 0,  "currentStage": "string",  "agentIds": [    "string"  ],  "closedAt": "string",  "verificationReport": null,  "metadata": null,  "startedAt": "string",  "createdAt": "string",  "updatedAt": "string",  "kind": "work"}
GET
/focus-sessions/graph

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
projectId?string
windowHours?integer
Range1 <= value <= 720
kind?string
Value in"work""run""receipt""all"
lens?string
Value in"default""triage""all"
trackId?string
rootSessionId?string

Response Body

Work graph

application/json
  1. response
nodes*array<>
edges*array<>
pullRequests*array<>
holds*array<>
goals*array<>
sections*
window*
Example Request
curl -X GET 'https://pod.example.com/api/hub/focus-sessions/graph'
Example Response
{  "nodes": [    {      "id": "string",      "workspaceId": "string",      "projectId": "string",      "userId": "string",      "correlationId": "string",      "title": "string",      "goal": "string",      "status": "string",      "templateId": "string",      "expectedOutputs": null,      "channelId": "string",      "progress": 0,      "currentStage": "string",      "agentIds": [        "string"      ],      "closedAt": "string",      "verificationReport": null,      "metadata": null,      "startedAt": "string",      "createdAt": "string",      "updatedAt": "string",      "kind": "work",      "parentSessionId": "string",      "triage": null,      "nextMove": null,      "unitFacts": null,      "live": null,      "viewerRole": "owner",      "inWindow": true    }  ],  "edges": [    {      "kind": "blocked_by",      "from": "string",      "to": "string",      "entityId": "string",      "count": 0,      "lastAt": "string"    }  ],  "pullRequests": [    {      "id": "string",      "url": "string",      "label": "string",      "sessions": [        {          "sessionId": "string",          "key": "string",          "state": "met"        }      ],      "prState": null    }  ],  "holds": [    {      "sessionId": "string",      "status": "string",      "hold": null,      "resumeDue": true,      "reviewDue": true    }  ],  "goals": [    {      "id": "string",      "name": "string",      "status": "string",      "projectId": "string"    }  ],  "sections": {    "blockedBy": {      "status": "ok",      "reason": "string"    },    "waitsOnOutputs": {      "status": "ok",      "reason": "string"    },    "interactions": {      "status": "ok",      "reason": "string"    },    "farEnds": {      "status": "ok",      "reason": "string"    },    "pullRequests": {      "status": "ok",      "reason": "string"    },    "holds": {      "status": "ok",      "reason": "string"    },    "goals": {      "status": "ok",      "reason": "string"    }  },  "window": {    "since": "string",    "hours": 0,    "ceiling": 0,    "truncated": true,    "omitted": 0  }}
GET
/focus-sessions/owed

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
projectId?string
subjectEntityId?string
Formatuuid
subjectProfileSlug?string
Length1 <= length
limit?integer
Range1 <= value <= 200

Response Body

Owed slots

application/json
  1. response
slots*array<>
truncated*boolean
Example Request
curl -X GET 'https://pod.example.com/api/hub/focus-sessions/owed'
Example Response
{  "slots": [    {      "property1": null,      "property2": null    }  ],  "truncated": true}
GET
/focus-sessions/{id}

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

Query Parameters

workspaceId?string

Response Body

Session

application/json
  1. response
id*string
workspaceId*string|null
projectId*string|null
userId*string
correlationId*string|null
title*string|null
goal*string
status*string
templateId*string|null
expectedOutputs?unknown
channelId*string|null
progress*number|null
currentStage*string|null
agentIds*array<string>
closedAt*string|null
verificationReport?unknown
metadata?unknown
startedAt*string
createdAt*string
updatedAt*string
kind?string
Value in"work""run""receipt"
Example Request
curl -X GET 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "string",  "workspaceId": "string",  "projectId": "string",  "userId": "string",  "correlationId": "string",  "title": "string",  "goal": "string",  "status": "string",  "templateId": "string",  "expectedOutputs": null,  "channelId": "string",  "progress": 0,  "currentStage": "string",  "agentIds": [    "string"  ],  "closedAt": "string",  "verificationReport": null,  "metadata": null,  "startedAt": "string",  "createdAt": "string",  "updatedAt": "string",  "kind": "work"}

Update a focus session

PATCH
/focus-sessions/{id}

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
Match^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
Formatuuid
status?string
Value in"active""paused""forming""scheduled""closed""failed""cancelled"
expectedStatus?string
Value in"active""paused""forming""scheduled""closed""failed""cancelled""stale"
hold?
occurredAt?string
progress?integer
Range0 <= value <= 100
channelId?string
Formatuuid
correlationId?string
title?|
Lengthlength <= 200
goal?string
Length1 <= length <= 2000
agentIds?array<string>
addAgentId?string
Length1 <= length
outcomes?array<>
Itemsitems <= 40
expectedOutputs?array<>
verificationReport?unknown
currentStage?string
Length1 <= length
subjectEntityId?|
Formatuuid
metadata?
criteria?array<>
Itemsitems <= 12
followPlaybookId?|
Formatuuid
followStageKey?|
Length1 <= length
params?
trackId?|
Formatuuid
trackStage?|
Length1 <= length <= 120
agentUserId?string
Formatuuid
reasoning?string

Response Body

Updated session

application/json
  1. response
id*string
workspaceId*string|null
projectId*string|null
userId*string
correlationId*string|null
title*string|null
goal*string
status*string
templateId*string|null
expectedOutputs?unknown
channelId*string|null
progress*number|null
currentStage*string|null
agentIds*array<string>
closedAt*string|null
verificationReport?unknown
metadata?unknown
startedAt*string
createdAt*string
updatedAt*string
kind?string
Value in"work""run""receipt"
Example Request
curl -X PATCH 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "workspaceId": "string",  "projectId": "string",  "userId": "string",  "correlationId": "string",  "title": "string",  "goal": "string",  "status": "string",  "templateId": "string",  "expectedOutputs": null,  "channelId": "string",  "progress": 0,  "currentStage": "string",  "agentIds": [    "string"  ],  "closedAt": "string",  "verificationReport": null,  "metadata": null,  "startedAt": "string",  "createdAt": "string",  "updatedAt": "string",  "kind": "work"}
POST
/focus-sessions/{id}/complete

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
summary?string
verificationReport?
terminalStatus?string
Value in"closed""cancelled""failed"
questionDispositions?array<>
Itemsitems <= 100
reason?string
Length1 <= length <= 1000

Response Body

Closed session + proposal pack

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

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
kind*string
Value in"view""cell""document""entity""url""automation""playbook"
refId*string
Length1 <= length
label?string
Length1 <= length <= 500
expectedLabel?string
Length1 <= length <= 500
workspaceId?string
Formatuuid

Response Body

Recorded

application/json
  1. response
ok*boolean
outputId*string
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/outputs' \  -H 'Content-Type: application/json' \  -d '{  "kind": "view",  "refId": "string"}'
Example Response
{  "ok": true,  "outputId": "string"}
POST
/focus-sessions/{id}/outputs/delegate

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
expectedLabel*string
Length1 <= length <= 500
agentType?string
Length1 <= length <= 100

Response Body

Delegated

application/json
  1. response
ok*boolean
expectedLabel*string
kind*string
agentType*string
channelId*string
messageId*string
triggered*boolean
agentAttached*boolean
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/outputs/delegate' \  -H 'Content-Type: application/json' \  -d '{  "expectedLabel": "string"}'
Example Response
{  "ok": true,  "expectedLabel": "string",  "kind": "string",  "agentType": "string",  "channelId": "string",  "messageId": "string",  "triggered": true,  "agentAttached": true}
POST
/focus-sessions/{id}/outputs/block

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
expectedLabel*string
Length1 <= length <= 500
blockedReason*string
Value in"credential""permission""capability""policy""decision""physical"
why?string
Lengthlength <= 500
unblocks?string
Length1 <= length <= 200
ref?||null
ask?|||||null

Response Body

Blocked on the human

application/json
  1. response
ok*boolean
expectedLabel*string
kind*string
blockGuidelines?unknown
hint?string
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/outputs/block' \  -H 'Content-Type: application/json' \  -d '{  "expectedLabel": "string",  "blockedReason": "credential"}'
Example Response
{  "ok": true,  "expectedLabel": "string",  "kind": "string",  "blockGuidelines": null,  "hint": "string"}
POST
/focus-sessions/{id}/outputs/unblock

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
expectedLabel*string
Length1 <= length <= 500

Response Body

Reclaimed

application/json
  1. response
ok*boolean
expectedLabel*string
kind*string
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/outputs/unblock' \  -H 'Content-Type: application/json' \  -d '{  "expectedLabel": "string"}'
Example Response
{  "ok": true,  "expectedLabel": "string",  "kind": "string"}
POST
/focus-sessions/{id}/outputs/answer

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
expectedLabel?string
Length1 <= length <= 500
text?string
Lengthlength <= 4000
value?||||
askFingerprint?string
Length1 <= length <= 64
expectedGranteeId?string
Length1 <= length <= 200
confirmRelayed?true
Value intrue
rejectRelayed?true
Value intrue
questionId?string
Formatuuid

Response Body

Answered, or (rejectRelayed) corrected

application/json
  1. response
ok*boolean
expectedLabel*string
kind*string
answer?unknown
handedBack*boolean
messageId*string|null
questionId*string|null
wokeAgentType*string|null
triggered*boolean
decision?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/outputs/answer' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "ok": true,  "expectedLabel": "string",  "kind": "string",  "answer": null,  "handedBack": true,  "messageId": "string",  "questionId": "string",  "wokeAgentType": "string",  "triggered": true,  "decision": null}
POST
/focus-sessions/{id}/answers/relay

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
disposition*string
Value in"answered""withdrawn"
messageId?string
Formatuuid
slotLabel?string
Length1 <= length <= 500
quote?string
Lengthlength <= 2000
text?string
Lengthlength <= 2000
value?||||
relaySurface?string
Length1 <= length <= 64
note?string
Lengthlength <= 500

Response Body

Relayed, awaiting the person's tap, or withdrawn

application/json
  1. response
ok*boolean
status*string
Value in"relayed""awaiting_tap""withdrawn"
stakes?string
Value in"routine""commitment"
questionId*string|null
expectedLabel*string|null
answer?unknown
pendingRelay?unknown
handedBack?boolean
decision?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/answers/relay' \  -H 'Content-Type: application/json' \  -d '{  "disposition": "answered"}'
Example Response
{  "ok": true,  "status": "relayed",  "stakes": "routine",  "questionId": "string",  "expectedLabel": "string",  "answer": null,  "pendingRelay": null,  "handedBack": true,  "decision": null}
GET
/focus-sessions/{id}/answers/wait

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

Query Parameters

since?string
timeoutSeconds?integer
Range1 <= value <= 90
limit?integer
Range1 <= value <= 100
events?string
Lengthlength <= 200
knownStage?string
Lengthlength <= 200
stamp?string
Value in"true""false"

Response Body

Answered, or timed out

application/json
  1. response
status*string
Value in"answered""changed""timeout"
sessionId*string
since*string|null
answers?array<unknown>
events?array<unknown>
state?
nextSince*string|null
hasMore?boolean
waitedSeconds?number
Example Request
curl -X GET 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/answers/wait'
Example Response
{  "status": "answered",  "sessionId": "string",  "since": "string",  "answers": [    null  ],  "events": [    null  ],  "state": {    "currentStage": "string",    "status": "string"  },  "nextSince": "string",  "hasMore": true,  "waitedSeconds": 0}
GET
/focus-sessions/{id}/answers

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

Query Parameters

since?string
limit?integer
Range1 <= value <= 100

Response Body

A page of answers

application/json
  1. response
sessionId*string
since*string|null
answers*array<unknown>
nextSince*string|null
hasMore*boolean
Example Request
curl -X GET 'https://pod.example.com/api/hub/focus-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/answers'
Example Response
{  "sessionId": "string",  "since": "string",  "answers": [    null  ],  "nextSince": "string",  "hasMore": true}
GET
/work-release

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.

Response Body

Work release

application/json
  1. response
generatedAt*string
sources*
repos*array<>
prs*array<>
blockers*array<>
narrowed?
Example Request
curl -X GET 'https://pod.example.com/api/hub/work-release'
Example Response
{  "generatedAt": "string",  "sources": {    "snapshots": "ok",    "sessions": "ok",    "holders": "ok",    "pullRequests": "ok"  },  "repos": [    {      "property1": null,      "property2": null    }  ],  "prs": [    {      "property1": null,      "property2": null    }  ],  "blockers": [    {      "ref": {        "kind": "pr",        "repo": "string",        "number": 0      },      "waiting": 0,      "waitingPrs": 0,      "waitingMains": 0,      "reason": "string",      "property1": null,      "property2": null    }  ],  "narrowed": {    "snapshotSpaces": [      "string"    ],    "withheld": [      "snapshots"    ],    "reason": "string"  }}
GET
/timeline

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

goalId?string

A goal (track) id.

sessionId?string

A focus session id.

pr?string

A pull request: owner/name#n or its GitHub url.

Response Body

Timeline

application/json
  1. response
subject*
events*array<>
truncated*boolean
Example Request
curl -X GET 'https://pod.example.com/api/hub/timeline'
Example Response
{  "subject": {    "kind": "goal",    "property1": null,    "property2": null  },  "events": [    {      "property1": null,      "property2": null    }  ],  "truncated": true}

On this page