Threads
The Threads operations of the Hub REST API (10 operations).
Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.
bearerAuthAuthorizationBearer <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.
userId*stringworkspaceId?stringlimit?stringThreads list
application/json- response
[index: integer]?curl -X GET 'https://pod.example.com/api/hub/threads?userId=string'[ { "id": "string", "title": "string", "assignedAgentId": "string", "parentChannelId": "string", "branchPurpose": "string", "contextSummary": "string", "createdAt": "string", "updatedAt": "string" }]bearerAuthAuthorizationBearer <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.
application/json- body
userId*stringworkspaceId*stringtitle?stringparentChannelId?stringagentId?stringbranchPurpose?stringcontextObjectType?stringcontextObjectId?stringexternalSource?stringexternalId?stringThread created or reused
application/json- response
id*stringtitle?string|nullreused?booleancurl -X POST 'https://pod.example.com/api/hub/threads' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string", "workspaceId": "string"}'{ "id": "string", "title": "string", "reused": true}bearerAuthAuthorizationBearer <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.
Success
curl -X GET 'https://pod.example.com/api/hub/threads/{threadId}/context'bearerAuthAuthorizationBearer <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.
Success
curl -X PATCH 'https://pod.example.com/api/hub/threads/{threadId}/context'bearerAuthAuthorizationBearer <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.
Success
curl -X POST 'https://pod.example.com/api/hub/threads/{threadId}/link-entity'bearerAuthAuthorizationBearer <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.
Success
curl -X POST 'https://pod.example.com/api/hub/threads/{threadId}/link-document'bearerAuthAuthorizationBearer <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.
threadId*stringBranches
application/json- response
branches*array<>curl -X GET 'https://pod.example.com/api/hub/threads/string/branches'{ "branches": [ { "channelId": "string", "branchPurpose": "string", "status": "string" } ]}bearerAuthAuthorizationBearer <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.
threadId*stringlimit?integerReturn the newest N messages (oldest first). Omit for every message.
1 <= value <= 200before?stringISO time: only messages strictly before it.
date-timebeforeId?stringThe id of the message a page ended on: pages exactly before it (breaks a tie of instants).
Messages
application/json- response
[index: integer]?curl -X GET 'https://pod.example.com/api/hub/threads/string/messages'[ { "id": "string", "role": "system", "content": "string", "userId": "string", "timestamp": "string", "sessionId": "string", "authorType": "string", "metadata": { "property1": null, "property2": null }, "direction": "inbound", "deliveryStatus": "sent", "externalSource": "string", "externalMessageId": "string" }]bearerAuthAuthorizationBearer <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.
threadId*stringapplication/json- body
role*string"system""assistant""user"content*stringuserId*stringmetadata?autoRespond?booleanIf true and role=user, schedules an A2AI agent reply via pg-boss.
kind?stringAn AGENT's post only: 'question' when the person is needed (in a session room it pushes them, once per session window); 'update' (default) for progress/results — in-app only, never a push.
"question""update"slotLabel?stringWith kind 'question' (agent posts only): the label of the session output the question is about. The question is filed ON that output (the owner's, with the question as its why), and the owner's answer is recorded as its answer and hands it back to the agent.
length <= 500ask?||||With kind 'question' + slotLabel (agent posts only): HOW the person answers — the output's typed ask (confirm | choose | form | act | provide). Omit for a free-text answer.
intent?stringAn AGENT's message to ANOTHER session — the session whose room this thread is: blocked_on_you | handoff (may wake its agent) | done | fyi (never wake). The pod stamps the sender session and the target; it never notifies the person.
"blocked_on_you""handoff""done""fyi"fromSessionId?stringWith intent: YOUR session, when it is not the one this conversation is bound to. It must be yours.
uuidrefs?array<>With intent: the state behind the message (a blocked_by session, a delegated slot, a proposal).
items <= 10cause?stringWith intent: the id of the session_message that woke you, when this replies to it.
uuidInserted message id
application/json- response
success*truetruemessageId*stringslot?An agent's question naming a slotLabel: 'blocked' when the question is now that output's ask; otherwise why not (unknown_label, already_done, no_session, not_found, failed).
sessionPost?With intent: what the pod stamped — the sender and target sessions, and whether the delivery may wake the target's agent.
note?stringWith intent: why a wake-worthy message was delivered without waking anyone.
curl -X POST 'https://pod.example.com/api/hub/threads/string/messages' \ -H 'Content-Type: application/json' \ -d '{ "role": "system", "content": "string", "userId": "string"}'{ "success": true, "messageId": "string", "slot": { "status": "string" }, "sessionPost": { "intent": "blocked_on_you", "from": { "sessionId": "string" }, "to": { "sessionId": "string" }, "hop": 0, "wake": true, "wakeHeld": "hop_limit" }, "note": "string"}bearerAuthAuthorizationBearer <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.
threadId*stringapplication/json- body
messages*array<>1 <= items <= 100autoRespond?booleanIf true, the LAST user message in the batch fires an A2AI reply.
Inserted message ids
application/json- response
messageIds*array<string>curl -X POST 'https://pod.example.com/api/hub/threads/string/messages.batch' \ -H 'Content-Type: application/json' \ -d '{ "messages": [ { "role": "system", "content": "string", "userId": "string" } ]}'{ "messageIds": [ "string" ]}