Threads
The Threads operations of the Hub REST API (10 operations).
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*stringMessages
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 } }]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.
Inserted 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).
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" }}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" ]}