{"info":{"title":"Sazabi Public API","version":"1.0.0","description":"Public REST API for Sazabi. Authenticate using a secret API key in the Authorization header.\n\n## Pagination\n\nThis API uses two pagination strategies depending on the endpoint type:\n\n### Cursor-Based Pagination (List Endpoints)\n\nList endpoints (threads, messages, keys) use cursor-based pagination for efficient, consistent results:\n\n- **Parameters**: `limit` (items per page, default 50, max 100), `cursor` (opaque pagination token)\n- **Response**: Includes `nextCursor` field - pass this as `cursor` in the next request\n- **End of results**: When `nextCursor` is `null`, there are no more results\n- **Example**: `GET /v1/threads?limit=20&cursor=01234567-89ab-cdef-0123-456789abcdef`\n\n### Page-Based Pagination (Search Endpoints)\n\nSearch endpoints use page-based pagination due to the underlying search engine:\n\n- **Parameters**: `limit` (items per page, default 20, max 100), `page` (1-indexed page number)\n- **Response**: Includes `pagination` object with `page`, `limit`, `totalResults`, `totalPages`\n- **Example**: `GET /v1/search/threads?q=error&limit=10&page=2`\n"},"servers":[{"url":"https://api.sazabi.com/v1","description":"Production"},{"url":"https://api.sazabi.dev/v1","description":"Staging"}],"openapi":"3.1.1","paths":{"/me":{"get":{"operationId":"me.get","description":"Return the identity and available context for the current credential.","tags":["Auth"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"credentialType":{"const":"user"},"user":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email"}},"required":["id","name","email"]},"activeOrganizationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["admin","member"],"type":"string"}},"required":["id","name","slug","role"]},"description":"Organizations the user belongs to, including membership role."}},"required":["credentialType","user","activeOrganizationId","organizations"]},{"type":"object","properties":{"credentialType":{"const":"secret"},"organization":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug"]},"keyName":{"type":"string"}},"required":["credentialType","organization","keyName"]},{"type":"object","properties":{"credentialType":{"const":"partner"},"superorganization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]}},"required":["credentialType","superorganization"]}]}}}}}}},"/data-sources/types":{"get":{"operationId":"dataSources.listTypes","description":"List all supported data source types with their metadata requirements.","tags":["Data Sources"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Data source type identifier."},"name":{"type":"string","description":"Human-readable display name."},"metadataFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Field name used as the JSON key in metadata."},"type":{"type":"string","description":"Zod type name, e.g. \"string\", \"boolean\", \"enum\"."},"required":{"type":"boolean","description":"Whether the field is required."},"sensitive":{"type":"boolean","description":"Whether the field contains a secret and will be encrypted."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the field."}},"required":["name","type","required","sensitive","description"]},"description":"Fields required in the metadata object when creating a connection."},"setupSkill":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Markdown setup skill for AI agents. Null when no skill is available."}},"required":["id","name","metadataFields","setupSkill"]}}},"required":["types"]}}}}}}},"/data-sources/connections":{"get":{"operationId":"dataSources.listConnections","description":"List data source connections within one project.","tags":["Data Sources"],"parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid","description":"Project to list connections for. Auto-filled from SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true},{"name":"dataSourceType","in":"query","schema":{"enum":["vercel","cloudflare","railway","render","fly_io","heroku","netlify","supabase","planetscale","digital_ocean","inngest","trigger_dev","temporal","mastra","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","openrouter","posthog","gcl","gcp","otel"],"type":"string","description":"Filter connections by data source type."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"dataSourceType":{"enum":["vercel","cloudflare","railway","render","fly_io","heroku","netlify","supabase","planetscale","digital_ocean","inngest","trigger_dev","temporal","mastra","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","openrouter","posthog","gcl","gcp","otel"],"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","projectId","dataSourceType","displayName","createdAt"]}}},"required":["connections"]}}}}}},"post":{"operationId":"dataSources.createConnection","description":"Create a new data source connection. Validates credentials, encrypts sensitive fields, and auto-generates a public API key.","tags":["Data Sources"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Project to create the connection in. Auto-filled from SDK context when omitted."},"dataSourceType":{"enum":["vercel","cloudflare","railway","render","fly_io","heroku","netlify","supabase","planetscale","digital_ocean","inngest","trigger_dev","temporal","mastra","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","openrouter","posthog","gcl","gcp","otel"],"type":"string","description":"Data source type identifier."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Platform-specific credentials. Fields vary by data source type."},"displayName":{"type":"string","description":"Optional human-readable name for this connection."}},"required":["dataSourceType","metadata"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","format":"uuid","description":"ID of the created connection."},"publicKey":{"type":"string","description":"Auto-generated public API key for this connection. Store this securely — it is only shown once."}},"required":["connectionId","publicKey"]}}}}}}},"/data-sources/connections/{connectionId}":{"get":{"operationId":"dataSources.getConnection","description":"Get one data source connection by ID.","tags":["Data Sources"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Connection ID to fetch."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"dataSourceType":{"enum":["vercel","cloudflare","railway","render","fly_io","heroku","netlify","supabase","planetscale","digital_ocean","inngest","trigger_dev","temporal","mastra","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","openrouter","posthog","gcl","gcp","otel"],"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","projectId","dataSourceType","displayName","createdAt"]}},"required":["connection"]}}}}}}},"/data-sources/connections/{connectionId}/streams":{"get":{"operationId":"dataSources.listStreams","description":"List streams for a data source connection.","tags":["Data Sources"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Connection ID to list streams for."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"streams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connectionId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"enum":["pending","provisioning","active","error"],"type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","connectionId","displayName","config","status","errorMessage","createdAt"]}}},"required":["streams"]}}}}}},"post":{"operationId":"dataSources.createStream","description":"Create a new stream for a data source connection. Triggers async provisioning.","tags":["Data Sources"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Connection ID to create the stream under."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Resource name, e.g. service or app name."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Platform-specific stream configuration."}},"required":["displayName","config"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"streamId":{"type":"string","format":"uuid","description":"ID of the created stream."}},"required":["streamId"]}}}}}}},"/data-sources/streams/{streamId}":{"get":{"operationId":"dataSources.getStream","description":"Get one data source stream by ID. Use to poll provisioning status.","tags":["Data Sources"],"parameters":[{"name":"streamId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stream ID to fetch."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"stream":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connectionId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"enum":["pending","provisioning","active","error"],"type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","connectionId","displayName","config","status","errorMessage","createdAt"]}},"required":["stream"]}}}}}}},"/organizations":{"get":{"operationId":"organizations.list","description":"List organizations available to the current credential.","tags":["Organizations"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["admin","member"],"type":"string"}},"required":["id","name","slug"]},"description":"Organizations available to the current credential."}},"required":["organizations"]}}}}}}},"/organizations/{organizationId}":{"get":{"operationId":"organizations.get","description":"Get one organization by ID.","tags":["Organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Organization ID to fetch."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug"]}},"required":["organization"]}}}}}},"patch":{"operationId":"organizations.update","description":"Update one organization.","tags":["Organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"New organization name."}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug"],"description":"Updated organization."}},"required":["organization"]}}}}}}},"/members":{"get":{"operationId":"members.list","description":"List members in an organization.","tags":["Members"],"parameters":[{"name":"organizationId","in":"query","schema":{"type":"string","minLength":1,"description":"Organization to list members for. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"membershipId":{"type":"string","minLength":1,"description":"Organization membership record ID."},"userId":{"type":"string","minLength":1,"description":"User ID for the organization member."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name for the member, when available."},"email":{"type":"string","format":"email","description":"Email address for the member."},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Profile image URL for the member, when available."},"role":{"enum":["admin","member"],"type":"string","description":"Organization role."},"createdAt":{"type":"string","format":"date-time","description":"When the membership was created."}},"required":["membershipId","userId","name","email","imageUrl","role","createdAt"]},"description":"Members visible within the selected organization."}},"required":["members"]}}}}}}},"/members/{userId}/role":{"patch":{"operationId":"members.updateRole","description":"Update a member's organization role.","tags":["Members"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"User ID of the member to update."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","minLength":1,"description":"Organization containing the member. Auto-filled from CLI and SDK context when omitted."},"role":{"enum":["admin","member"],"type":"string","description":"Role to assign."}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"membershipId":{"type":"string","minLength":1,"description":"Organization membership record ID."},"userId":{"type":"string","minLength":1,"description":"User ID for the organization member."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name for the member, when available."},"email":{"type":"string","format":"email","description":"Email address for the member."},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Profile image URL for the member, when available."},"role":{"enum":["admin","member"],"type":"string","description":"Organization role."},"createdAt":{"type":"string","format":"date-time","description":"When the membership was created."}},"required":["membershipId","userId","name","email","imageUrl","role","createdAt"],"description":"Updated organization member."}},"required":["member"]}}}}}}},"/members/{userId}":{"delete":{"operationId":"members.remove","description":"Remove a member from an organization.","tags":["Members"],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"User ID of the member to remove."}},{"name":"organizationId","in":"query","schema":{"type":"string","minLength":1,"description":"Organization containing the member. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"removedUserId":{"type":"string","minLength":1,"description":"User ID removed from the organization."}},"required":["removedUserId"]}}}}}}},"/projects":{"get":{"operationId":"projects.list","description":"List projects in an organization.","tags":["Projects"],"parameters":[{"name":"organizationId","in":"query","schema":{"type":"string","minLength":1,"description":"Organization to list projects for. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","minLength":1},"name":{"type":"string"},"region":{"enum":["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"],"type":"string"}},"required":["id","organizationId","name","region"]},"description":"Projects visible within the selected organization."}},"required":["projects"]}}}}}}},"/projects/{projectId}":{"get":{"operationId":"projects.get","description":"Get one project by ID.","tags":["Projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID to fetch."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","minLength":1},"name":{"type":"string"},"region":{"enum":["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"],"type":"string"}},"required":["id","organizationId","name","region"]}},"required":["project"]}}}}}}},"/threads":{"get":{"operationId":"threads.list","description":"List threads in a project, optionally filtered by status.","tags":["Threads"],"parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid","description":"Project to list threads for. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of threads to return per page."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid","description":"Cursor from a previous response's nextCursor to fetch the next page."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["regular","archived"],"type":"string","description":"Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["regular","archived"],"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","projectId","title","status","createdAt","updatedAt"]},"description":"The page of threads matching the query."},"nextCursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as 'cursor' to fetch the next page. Null when there are no more results."}},"required":["threads","nextCursor"]}}}}}},"post":{"operationId":"threads.create","description":"Create a thread with an initial message and optionally wait for the agent response.","tags":["Threads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Project to create the thread in. Auto-filled from CLI and SDK context when omitted."},"message":{"type":"string","minLength":1,"maxLength":10000,"description":"Initial user message that starts the thread."},"wait":{"type":"boolean","default":true,"description":"Whether the server should wait for the agent run before responding."},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":20,"default":20,"description":"Maximum seconds to wait when wait is true before handing off to polling."}},"required":["message"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"boolean","description":"Whether the run has reached a terminal status."},"threadId":{"type":"string","format":"uuid","description":"Thread ID associated with the run."},"runId":{"type":"string","format":"uuid","description":"Run ID for subsequent polling."},"status":{"enum":["processing","completed","aborted","error"],"type":"string","description":"Current run lifecycle status."},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Assistant response text when the run has completed."}},"required":["completed","threadId","runId","status","response"],"description":"Deferred run result for creating a thread."}}}}}}},"/threads/{threadId}":{"get":{"operationId":"threads.get","description":"Get a thread and its messages.","tags":["Threads"],"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Thread ID returned by threads.list or threads.create."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["regular","archived"],"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","projectId","title","status","createdAt","updatedAt"],"description":"The requested thread."},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"enum":["user","assistant"],"type":"string"},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"message"},"message":{"type":"string"}},"required":["type","message"]},{"type":"object","properties":{"type":{"const":"reasoning"},"reasoning":{"type":"string"},"status":{"enum":["in_progress","complete"],"type":"string"}},"required":["type","reasoning"]},{"type":"object","properties":{"type":{"const":"tool_call"},"name":{"type":"string"},"params":{},"result":{},"status":{"enum":["in_progress","success","error","unknown"],"type":"string"},"toolCallId":{"type":"string"},"durationMs":{"type":"number","minimum":0}},"required":["type","name"]},{"type":"object","properties":{"type":{"const":"artifact"},"name":{"enum":["timeseries","table","log_detail","integration_required","alert_card"],"type":"string"},"data":{},"toolCallId":{"type":"string"}},"required":["type","name"]},{"type":"object","properties":{"type":{"const":"fork"},"sourceThreadId":{"type":"string"},"sourceMessageId":{"type":"string"},"sourceThreadTitle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sourceThreadId","sourceMessageId","sourceThreadTitle"]},{"type":"object","properties":{"type":{"const":"summary"},"summary":{"type":"string"}},"required":["type","summary"]},{"type":"object","properties":{"type":{"const":"slack_context"},"channelId":{"type":"string"},"isTruncated":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"slackUserId":{"type":"string"},"displayName":{"type":"string"},"text":{"type":"string"},"isBot":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mimetype":{"type":"string"},"size":{"type":"number"},"attachmentId":{"type":"string","format":"uuid"},"ingestionStatus":{"enum":["attached","unsupported","oversized","skipped","unavailable"],"type":"string"}},"required":["name","mimetype"]}}},"required":["timestamp","displayName","text","isBot"]}}},"required":["type","channelId","messages"]}]}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","role","content","createdAt"]},"description":"Messages currently stored on the thread in chronological order."}},"required":["thread","messages"]}}}}}},"patch":{"operationId":"threads.update","description":"Update a thread's status.","tags":["Threads"],"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Thread ID of the thread to update."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["regular","archived"],"type":"string","description":"New status for the thread. 'archived' hides the thread from the sidebar."}},"required":["status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["regular","archived"],"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","projectId","title","status","createdAt","updatedAt"],"description":"The updated thread."}},"required":["thread"]}}}}}}},"/threads/{threadId}/status":{"get":{"operationId":"threads.getStatus","description":"Get the current processing status for a thread.","tags":["Threads"],"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Thread ID whose current processing status should be returned."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["idle","processing"],"type":"string"},"lastRunStatus":{"anyOf":[{"enum":["error"],"type":"string"},{"type":"null"}]}},"required":["status","lastRunStatus"]}}}}}}},"/threads/{threadId}/messages":{"get":{"operationId":"messages.list","description":"List messages in a thread with cursor pagination.","tags":["Messages"],"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Thread ID to list messages for."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of messages to return per page."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Cursor from a previous response's nextCursor to fetch the next page."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"enum":["user","assistant"],"type":"string"},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"message"},"message":{"type":"string"}},"required":["type","message"]},{"type":"object","properties":{"type":{"const":"reasoning"},"reasoning":{"type":"string"},"status":{"enum":["in_progress","complete"],"type":"string"}},"required":["type","reasoning"]},{"type":"object","properties":{"type":{"const":"tool_call"},"name":{"type":"string"},"params":{},"result":{},"status":{"enum":["in_progress","success","error","unknown"],"type":"string"},"toolCallId":{"type":"string"},"durationMs":{"type":"number","minimum":0}},"required":["type","name"]},{"type":"object","properties":{"type":{"const":"artifact"},"name":{"enum":["timeseries","table","log_detail","integration_required","alert_card"],"type":"string"},"data":{},"toolCallId":{"type":"string"}},"required":["type","name"]},{"type":"object","properties":{"type":{"const":"fork"},"sourceThreadId":{"type":"string"},"sourceMessageId":{"type":"string"},"sourceThreadTitle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sourceThreadId","sourceMessageId","sourceThreadTitle"]},{"type":"object","properties":{"type":{"const":"summary"},"summary":{"type":"string"}},"required":["type","summary"]},{"type":"object","properties":{"type":{"const":"slack_context"},"channelId":{"type":"string"},"isTruncated":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"slackUserId":{"type":"string"},"displayName":{"type":"string"},"text":{"type":"string"},"isBot":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mimetype":{"type":"string"},"size":{"type":"number"},"attachmentId":{"type":"string","format":"uuid"},"ingestionStatus":{"enum":["attached","unsupported","oversized","skipped","unavailable"],"type":"string"}},"required":["name","mimetype"]}}},"required":["timestamp","displayName","text","isBot"]}}},"required":["type","channelId","messages"]}]}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","role","content","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as 'cursor' to fetch the next page. Null when there are no more results."}},"required":["messages","nextCursor"]}}}}}},"post":{"operationId":"messages.append","description":"Append a user message to an existing thread and trigger a deferred run.","tags":["Messages"],"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Thread ID to append the message to."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":10000},"wait":{"type":"boolean","default":true,"description":"Whether the server should wait for the appended message run before responding."},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":20,"default":20,"description":"Maximum seconds to wait when wait is true before handing off to polling."}},"required":["message"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"boolean","description":"Whether the run has reached a terminal status."},"threadId":{"type":"string","format":"uuid","description":"Thread ID associated with the run."},"runId":{"type":"string","format":"uuid","description":"Run ID for subsequent polling."},"status":{"enum":["processing","completed","aborted","error"],"type":"string","description":"Current run lifecycle status."},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Assistant response text when the run has completed."}},"required":["completed","threadId","runId","status","response"],"description":"Deferred run result for appending a message to an existing thread."}}}}}}},"/public-keys":{"get":{"operationId":"publicKeys.list","description":"List public keys within one project.","tags":["Public Keys"],"parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid","description":"Project to list keys for. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of keys to return per page."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid","description":"Cursor from a previous response's nextCursor to fetch the next page."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"publicKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","format":"uuid"},"dataSourceConnectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Linked data source connection ID when this key is scoped to one data source."}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId","dataSourceConnectionId"]}},"nextCursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as 'cursor' to fetch the next page. Null when there are no more results."}},"required":["publicKeys","nextCursor"]}}}}}},"post":{"operationId":"publicKeys.create","description":"Create one public key within one project.","tags":["Public Keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Project to create the key in. Auto-filled from CLI and SDK context when omitted."},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9\\s\\-_]+$","description":"Human-readable name for the key."},"expiresAt":{"type":"string","format":"date-time","description":"Optional expiration timestamp for the key."}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","format":"uuid"},"dataSourceConnectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Linked data source connection ID when this key is scoped to one data source."},"value":{"type":"string"}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId","dataSourceConnectionId","value"]}},"required":["publicKey"]}}}}}}},"/public-keys/{keyId}":{"get":{"operationId":"publicKeys.get","description":"Get one public key within one project.","tags":["Public Keys"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Key ID to fetch."}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Project containing the key. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","format":"uuid"},"dataSourceConnectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Linked data source connection ID when this key is scoped to one data source."}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId","dataSourceConnectionId"]}},"required":["publicKey"]}}}}}},"patch":{"operationId":"publicKeys.update","description":"Update one public key within one project.","tags":["Public Keys"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Key ID to update."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Project containing the key. Auto-filled from CLI and SDK context when omitted."},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9\\s\\-_]+$","description":"New human-readable name for the key."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"New expiration timestamp for the key, or null to clear it."}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","format":"uuid"},"dataSourceConnectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Linked data source connection ID when this key is scoped to one data source."}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId","dataSourceConnectionId"]}},"required":["publicKey"]}}}}}},"delete":{"operationId":"publicKeys.delete","description":"Delete one public key within one project.","tags":["Public Keys"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Key ID to delete."}},{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid","description":"Project containing the key. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/secret-keys":{"get":{"operationId":"secretKeys.list","description":"List secret keys within the organization.","tags":["Secret Keys"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of keys to return per page."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid","description":"Cursor from a previous response's nextCursor to fetch the next page."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secretKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId"]}},"nextCursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as 'cursor' to fetch the next page. Null when there are no more results."}},"required":["secretKeys","nextCursor"]}}}}}},"post":{"operationId":"secretKeys.create","description":"Create one secret key within the organization.","tags":["Secret Keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9\\s\\-_]+$","description":"Human-readable name for the key."},"expiresAt":{"type":"string","format":"date-time","description":"Optional expiration timestamp for the key."}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secretKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"value":{"type":"string"}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId","value"]}},"required":["secretKey"]}}}}}}},"/secret-keys/{keyId}":{"get":{"operationId":"secretKeys.get","description":"Get one secret key within the organization.","tags":["Secret Keys"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Key ID to fetch."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secretKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId"]}},"required":["secretKey"]}}}}}},"patch":{"operationId":"secretKeys.update","description":"Update one secret key within the organization.","tags":["Secret Keys"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Key ID to update."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9\\s\\-_]+$","description":"New human-readable name for the key."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"New expiration timestamp for the key, or null to clear it."}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secretKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","name","expiresAt","lastUsedAt","createdAt","projectId"]}},"required":["secretKey"]}}}}}},"delete":{"operationId":"secretKeys.delete","description":"Delete one secret key within the organization.","tags":["Secret Keys"],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Key ID to delete."}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/search/threads":{"get":{"operationId":"search.threads","description":"Search threads within one project.","tags":["Search"],"parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Project to search within. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Maximum number of search results to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"page","in":"query","required":false,"schema":{"type":"number","minimum":1,"default":1,"description":"One-based page number."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","required":false,"schema":{"enum":["regular","archived"],"type":"string","description":"Optional thread status filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"enum":["regular","archived"],"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"highlights":{"type":"array","items":{"type":"string"}},"score":{"type":"number"}},"required":["id","title","status","labels","createdAt","updatedAt","highlights"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"totalResults":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","totalResults","totalPages"],"description":"Page-based pagination metadata for the current search result."}},"required":["threads","pagination"]}}}}}}},"/search/messages":{"get":{"operationId":"search.messages","description":"Search messages within one project.","tags":["Search"],"parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Project to search within. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Maximum number of search results to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"page","in":"query","required":false,"schema":{"type":"number","minimum":1,"default":1,"description":"One-based page number."},"allowEmptyValue":true,"allowReserved":true},{"name":"threadId","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Optional thread restriction for message search."},"allowEmptyValue":true,"allowReserved":true},{"name":"role","in":"query","required":false,"schema":{"enum":["user","assistant"],"type":"string","description":"Optional message role filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"threadId":{"type":"string","format":"uuid"},"threadTitle":{"type":"string"},"role":{"enum":["user","assistant"],"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"highlights":{"type":"array","items":{"type":"string"}},"score":{"type":"number"}},"required":["id","threadId","threadTitle","role","content","createdAt","updatedAt","highlights"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"totalResults":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","totalResults","totalPages"],"description":"Page-based pagination metadata for the current search result."}},"required":["messages","pagination"]}}}}}}},"/logs/query":{"post":{"operationId":"logs.query","description":"Query logs within one project via the platform API proxy.","tags":["Logs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Project to query logs for. Auto-filled from CLI and SDK context when omitted."},"search":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500,"description":"Search query text (1-500 characters)"},"fields":{"type":"array","items":{"type":"string"},"description":"Fields to search in (defaults to backend allowlist)"},"mode":{"enum":["any","all","phrase"],"type":"string","description":"Token matching mode","default":"all"}},"required":["query"],"description":"Full-text search configuration"},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Field name to filter on"},"op":{"enum":["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"],"type":"string","description":"Filter operator"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}],"description":"Filter value (type depends on operator)"}},"required":["field","op","value"]},"description":"Structured filter clauses (ANDed together)"},"select":{"type":"array","items":{"type":"string"},"description":"Fields to return (defaults to backend default set)"},"sort":{"type":"object","properties":{"field":{"type":"string","description":"Field name to sort by"},"direction":{"enum":["asc","desc"],"type":"string","default":"desc","description":"Sort direction: 'asc' for ascending, 'desc' for descending"}},"required":["field"],"description":"Sort configuration (defaults to timestamp desc)"},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Maximum number of rows to return"},"cursor":{"type":"string","description":"Opaque cursor from previous response for pagination"}},"description":"Pagination configuration"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Array of log rows with selected fields"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."},"meta":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of log rows returned in this response"},"took":{"type":"number","minimum":0,"description":"Query execution time in milliseconds"}},"required":["count","took"],"description":"Query execution metadata"}},"required":["data","nextCursor","meta"]}}}}}}},"/runs":{"get":{"operationId":"runs.list","description":"List deferred runs within one project.","tags":["Runs"],"parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid","description":"Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of runs to return per page."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time","description":"Cursor from a previous response's nextCursor to fetch the next page."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"threadId":{"type":"string","format":"uuid"},"userMessageId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assistantMessageId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"workflowRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["processing","completed","aborted","error"],"type":"string"},"source":{"enum":["web","api","mcp","slack","agent","cli"],"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","threadId","userMessageId","assistantMessageId","parentRunId","workflowRunId","status","source","createdAt","updatedAt","completedAt"]}},"nextCursor":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Pass as 'cursor' to fetch the next page. Null when there are no more results."}},"required":["runs","nextCursor"]}}}}}}},"/runs/{runId}":{"get":{"operationId":"runs.get","description":"Get the current result for a deferred run by run ID.","tags":["Runs"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Run ID returned by a deferred operation."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"boolean","description":"Whether the run has reached a terminal status."},"threadId":{"type":"string","format":"uuid","description":"Thread ID associated with the run."},"runId":{"type":"string","format":"uuid","description":"Run ID for subsequent polling."},"status":{"enum":["processing","completed","aborted","error"],"type":"string","description":"Current run lifecycle status."},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Assistant response text when the run has completed."}},"required":["completed","threadId","runId","status","response"],"description":"Current run state and, when complete, the assistant response."}}}}}}},"/threads/{threadId}/runs":{"get":{"operationId":"runs.listForThread","description":"List deferred runs for one thread.","tags":["Runs"],"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Thread ID to list runs for."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of runs to return per page."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Cursor from a previous response's nextCursor to fetch the next page."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"threadId":{"type":"string","format":"uuid"},"userMessageId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assistantMessageId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"workflowRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["processing","completed","aborted","error"],"type":"string"},"source":{"enum":["web","api","mcp","slack","agent","cli"],"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","threadId","userMessageId","assistantMessageId","parentRunId","workflowRunId","status","source","createdAt","updatedAt","completedAt"]}},"nextCursor":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Pass as 'cursor' to fetch the next page. Null when there are no more results."}},"required":["runs","nextCursor"]}}}}}}}}}