{"openapi":"3.1.0","info":{"title":"Sim API v2","version":"2.0.0","description":"Complete OpenAPI description for the Sim API v2."},"servers":[{"url":"https://www.sim.ai","description":"Production"}],"security":[{"apiKey":[]},{"oauthBearer":[]}],"tags":[{"name":"Workspace Sync","description":"Portable workflow configuration, workspace forks, push and pull, and durable operation status."},{"name":"Workflows","description":"Manage and execute workflow definitions, folders, deployment versions, and portable imports and exports."},{"name":"Workflow Runs","description":"Inspect, resume, and cancel workflow runs."},{"name":"Logs","description":"Query workflow execution logs and retrieve complete run diagnostics."},{"name":"Files","description":"Create, upload, download, organize, share, version, and delete workspace files."},{"name":"Audit Logs","description":"Query the organization audit trail with Enterprise authorization."},{"name":"Tables","description":"Manage tables, columns, rows, views, runs, folders, imports, and exports."},{"name":"Knowledge Bases","description":"Create and organize knowledge bases, ingest documents, and search indexed content."},{"name":"Billing","description":"Inspect billing standing, credit allowance, storage quota, and usage history."},{"name":"Access Requests","description":"Request access and review changes to organization permissions and member credit limits."},{"name":"Organizations","description":"Discover organizations and manage their members and invitations."},{"name":"Permission Groups","description":"Manage organization permission groups, their restrictions, and membership."},{"name":"Meta","description":"Read API availability and the calling credential’s type and expiry."},{"name":"Workspaces","description":"Read workspace metadata and its effective member roster."},{"name":"MCP Servers","description":"Register and manage Model Context Protocol servers."},{"name":"Skills","description":"Create and manage reusable instruction documents for agents."},{"name":"Custom Tools","description":"Create and manage code-backed tools that agents can call."},{"name":"Sandboxes","description":"Create and manage the reusable dependency sets that Function blocks execute against."},{"name":"Credentials","description":"Discover providers, create service-account credentials, connect or reconnect OAuth accounts, disconnect credentials, and list connections without secret material."},{"name":"Secrets","description":"Manage workspace and personal secrets; writes return metadata, and visible workspace values may appear in lists."},{"name":"Catalog","description":"Inspect workflow blocks, built-in tools, and knowledge-base connector types."}],"paths":{"/api/v2/workflows":{"get":{"operationId":"listWorkflows","summary":"List workflows","description":"List active workflows in a workspace with workspace read access. Use `scope=archived` to find workflows available for restoration. Filter by folder, deployment, or name; sort and page with the returned cursor. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.list","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose workflows should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose workflows should be listed."}},{"name":"scope","in":"query","required":false,"description":"Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows a `DELETE` archived. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too.","schema":{"default":"active","description":"Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows a `DELETE` archived. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too.","type":"string","enum":["active","archived"]}},{"name":"folderPath","in":"query","required":false,"description":"Restrict results to workflows in this folder path. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to workflows in this folder path. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/Workflows_FolderPathInput"}},{"name":"deployedOnly","in":"query","required":false,"description":"Return only workflows with an active deployment when true.","schema":{"description":"Return only workflows with an active deployment when true.","type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum workflows to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum workflows to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the resource name.","schema":{"description":"Case-insensitive substring match against the resource name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"position","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["position","name","createdAt","updatedAt","runCount"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of workflows.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"post":{"operationId":"createWorkflowV2","summary":"Create workflow","description":"Create an undeployed workflow at the workspace root or in a workflow folder. Requires workspace write access. The response includes the seeded start block and its ID for connecting other blocks. A name already used in the destination folder returns `409`. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.create","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Name, description, workspace, and optional folder for a new workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_CreateWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Customer support triage","folderPath":"/Operations"}}}}}},"responses":{"201":{"description":"The created workflow.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_CreateWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":false,"deployedAt":null,"runCount":0,"lastRunAt":null,"createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z","blocks":[{"id":"start-1","type":"starter","name":"Start"}]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/state":{"get":{"operationId":"getWorkflowState","summary":"Get workflow state","description":"Read the saved editable draft, including blocks, edges, loop and parallel containers, and variables. Requires workspace read access. Configured values are included; use this state with Replace workflow state for same-workspace editing, or Export workflow for portable data with registered credential fields cleared. This read records no audit event; `HEAD` mirrors `GET`.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.read","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The workflow draft graph.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowStateResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"blocks":{},"edges":[],"loops":{},"parallels":{},"variables":{}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"put":{"operationId":"replaceWorkflowState","summary":"Replace workflow state","description":"Replace the draft graph in one write. Requires workspace write access. Concurrent row-locked writes are last-write-wins; IDs owned by another workflow return `409`. Deployments, schedules, and webhook registrations are unchanged. Deploy to serve the edits.\n\nLint is advisory. Use `dryRun=true` to validate without saving, auditing, or notifying collaborators. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.state.replace","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"dryRun","in":"query","required":false,"description":"Validate and lint without writing, auditing, or notifying collaborators. Returns the same validation, preparation warnings, lint findings, and ID-ownership conflicts (`409`) as a committed write. `needsRedeployment` describes the pre-write state. For semantic operations, `mintedBlockIds` is empty; `previewBlockIds` contains provisional IDs with a warning, since committing mints new IDs.","schema":{"description":"Validate and lint without writing, auditing, or notifying collaborators. Returns the same validation, preparation warnings, lint findings, and ID-ownership conflicts (`409`) as a committed write. `needsRedeployment` describes the pre-write state. For semantic operations, `mintedBlockIds` is empty; `previewBlockIds` contains provisional IDs with a warning, since committing mints new IDs.","type":"boolean"}}],"requestBody":{"required":true,"description":"A complete replacement draft graph for a workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ReplaceWorkflowStateRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"blocks":{},"edges":[]}}}}}},"responses":{"200":{"description":"The draft graph was replaced.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ReplaceWorkflowStateResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","warnings":[],"needsRedeployment":true,"dryRun":false,"lint":{"sources":[],"sinks":[],"orphanBlocks":[],"emptyOutgoingPorts":[],"invalidBranchPorts":[],"invalidConnectionTargets":[],"fieldIssues":[],"unresolvedReferences":[],"tableFieldIssues":[],"notes":[]}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/operations":{"post":{"operationId":"applyWorkflowOperations","summary":"Apply workflow operations","description":"Apply draft edits and block enablement changes in one write. Requires workspace write access. The live deployment is unchanged; lint is advisory.\n\nInspect `skipped` and `inputValidationErrors` for edits that did not apply. Deferred edges apply when their targets exist; do not resubmit them. With `atomic=true`, declined operations or dropped inputs return `409` (`OPERATIONS_NOT_APPLIED`) without saving. Use returned `mintedBlockIds` in later requests. `dryRun=true` evaluates without saving, auditing, or notifying. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.operations.apply","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"dryRun","in":"query","required":false,"description":"Validate and lint without writing, auditing, or notifying collaborators. Returns the same validation, preparation warnings, lint findings, and ID-ownership conflicts (`409`) as a committed write. `needsRedeployment` describes the pre-write state. For semantic operations, `mintedBlockIds` is empty; `previewBlockIds` contains provisional IDs with a warning, since committing mints new IDs.","schema":{"description":"Validate and lint without writing, auditing, or notifying collaborators. Returns the same validation, preparation warnings, lint findings, and ID-ownership conflicts (`409`) as a committed write. `needsRedeployment` describes the pre-write state. For semantic operations, `mintedBlockIds` is empty; `previewBlockIds` contains provisional IDs with a warning, since committing mints new IDs.","type":"boolean"}}],"requestBody":{"required":true,"description":"A batch of semantic edits against a workflow graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ApplyWorkflowOperationsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"operations":[{"operation_type":"add","block_id":"agent-1","params":{"type":"agent","name":"Triage","inputs":{"tools":[{"type":"cloudwatch","operation":"describe_alarm_history","usageControl":"auto","params":{}}]}}}]}}}}}},"responses":{"200":{"description":"The batch was applied.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ApplyWorkflowOperationsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","applied":1,"skipped":[],"deferred":[],"inputValidationErrors":[],"mintedBlockIds":{"agent-1":"a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77"},"lint":{"sources":[],"sinks":[],"orphanBlocks":[],"emptyOutgoingPorts":[],"invalidBranchPorts":[],"invalidConnectionTargets":[],"fieldIssues":[{"blockId":"a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77","blockName":"Triage","blockType":"agent","missingRequiredFields":["systemPrompt"],"inactiveModeValues":[]}],"unresolvedReferences":[],"tableFieldIssues":[],"notes":[]},"warnings":[],"needsRedeployment":true,"dryRun":false}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/variables":{"patch":{"operationId":"applyWorkflowVariables","summary":"Update workflow variables","description":"Add, edit, or delete variables by name with workspace write access. Operations run in order. Values are coerced to their declared type when possible and otherwise stored as supplied. A no-op batch returns `changed: false`; read current values with Get workflow.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.variables.apply_operations","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":true,"description":"Additions, edits, and deletions against a workflow’s variables.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ApplyWorkflowVariablesRequest"}}}},"responses":{"200":{"description":"The variable set after the batch.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ApplyWorkflowVariablesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","variableCount":3,"changed":true}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/duplicate":{"post":{"operationId":"duplicateWorkflow","summary":"Duplicate workflow","description":"Create an undeployed copy of a workflow's graph and variables in the same workspace. Requires workspace write access. The destination folder and name default to the source; name collisions in the destination are resolved automatically. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.duplicate","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":true,"description":"Optional name and destination folder for the copy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DuplicateWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"name":"Customer support triage (copy)","folderPath":"/Operations"}}}}}},"responses":{"201":{"description":"The created copy.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DuplicateWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage (copy)","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":false,"deployedAt":null,"runCount":0,"lastRunAt":null,"createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/restore":{"post":{"operationId":"restoreWorkflow","summary":"Restore workflow","description":"Restore an archived workflow and its archived schedules, webhooks, MCP tools, and hosted chat. Requires workspace write access. An active workflow returns `409`. If its folder is archived, the workflow returns to the workspace root. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.restore","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The restored workflow.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RestoreWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/move":{"post":{"operationId":"moveWorkflows","summary":"Move workflows","description":"Move up to 100 workflows to one folder with workspace write access. Each move succeeds or fails independently; missing, archived, or locked workflows appear in `failed`. Duplicate IDs are ignored. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.bulk.move","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workflows to relocate and the folder to relocate them into.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_MoveWorkflowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","workflowIds":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"],"folderPath":"/Operations"}}}}}},"responses":{"200":{"description":"Which workflows moved and which did not.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_MoveWorkflowsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"moved":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"],"failed":[],"folderPath":"/Operations"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}":{"get":{"operationId":"getWorkflow","summary":"Get workflow","description":"Get workflow metadata, variables, and trigger input fields from the saved draft. Requires workspace read access. Input fields may differ from the live deployment. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.read","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The requested workflow.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowDetailResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z","variables":{},"inputs":[]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"patch":{"operationId":"updateWorkflowV2","summary":"Update workflow","description":"Update a workflow's name, description, or folder path with workspace write access. Omitted fields remain unchanged; `description: null` clears the description. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.update","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":true,"description":"Fields to update on an existing workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"name":"Customer support and escalation","folderPath":"/Operations"}}}}}},"responses":{"200":{"description":"The updated workflow.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"delete":{"operationId":"deleteWorkflowV2","summary":"Delete workflow","description":"Archive a workflow and stop its schedules, webhooks, MCP tools, and hosted chat. Requires workspace write access. Find it with List workflows (`scope=archived`) and recover it with Restore workflow. Both `deleted` and `archived` acknowledge archival.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.delete","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The workflow was archived.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DeleteWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deleted":true,"archived":true}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/versions":{"get":{"operationId":"listWorkflowVersionsV2","summary":"List workflow versions","description":"List saved deployment versions, newest first, with workspace read access. Each version pins an immutable graph; its name and release note can be updated.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.versions.list","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"limit","in":"query","required":false,"description":"Maximum deployment versions to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum deployment versions to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of deployment versions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowVersionListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"version_3","version":3,"name":"Escalation routing","description":"Adds the priority escalation branch.","isActive":true,"createdAt":"2026-06-12T10:30:00.000Z","deployedBy":"Jane Smith","latestOperationStatus":"active"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/versions/compare":{"get":{"operationId":"compareWorkflowVersionsV2","summary":"Compare workflow versions","description":"Compare two deployment versions of the same workflow with workspace read access. The comparison excludes layout changes and withholds credential-bearing values while reporting their changes. Connections include stable block and port IDs. The combined snapshots and the comparison result must each fit within 16 MiB.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.versions.compare","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"base","in":"query","required":true,"description":"Deployment version to compare from.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Deployment version to compare from."}},{"name":"target","in":"query","required":true,"description":"Deployment version to compare to, in the same workflow.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Deployment version to compare to, in the same workflow."}}],"responses":{"200":{"description":"Changes from the base deployment to the target deployment.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowVersionComparisonResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","base":1,"target":2,"diff":{"addedBlocks":[],"removedBlocks":[],"modifiedBlocks":[],"edgeChanges":{"added":0,"removed":0,"addedDetails":[],"removedDetails":[]},"loopChanges":{"added":0,"removed":0,"modified":0},"parallelChanges":{"added":0,"removed":0,"modified":0},"containerChanges":[],"variableChanges":{"added":0,"removed":0,"modified":0,"addedNames":[],"removedNames":[],"modifiedNames":[]},"hasChanges":false}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/versions/{version}":{"get":{"operationId":"getWorkflowVersionV2","summary":"Get workflow version","description":"Get a deployment version and its pinned graph with workspace read access. Registered credential fields and opaque table/tool values are cleared. Environment references and ordinary workflow variables remain included; review other configuration before sharing.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.versions.read","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"version","in":"path","required":true,"description":"Numeric deployment version.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Numeric deployment version.","examples":[3]}},{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}}],"responses":{"200":{"description":"The requested deployment version.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowVersionDetailResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"version_3","version":3,"name":"Escalation routing","description":"Adds the priority escalation branch.","isActive":true,"createdAt":"2026-06-12T10:30:00.000Z","state":{"blocks":{},"edges":[]}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"patch":{"operationId":"updateWorkflowVersionV2","summary":"Update workflow version","description":"Update a deployment version's name or release note with workspace write access. Omitted fields remain unchanged; `description: null` clears the note. The graph and live version are unchanged. Use Activate workflow version to serve it.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.versions.update","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"version","in":"path","required":true,"description":"Numeric deployment version.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Numeric deployment version.","examples":[3]}},{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}}],"requestBody":{"required":true,"description":"Merge-patch body for the mutable metadata of a deployment version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkflowVersionRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"name":"Escalation routing","description":"Adds the priority escalation branch."}}}}}},"responses":{"200":{"description":"The updated version metadata.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkflowVersionResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"version":3,"name":"Escalation routing","description":"Adds the priority escalation branch."}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/versions/{version}/activate":{"post":{"operationId":"activateWorkflowVersion","summary":"Activate workflow version","description":"Activate a specific deployment version asynchronously. Requires workspace Admin access and works when the workflow is undeployed. The draft is unchanged. Poll Get workflow deployment for the accepted `latestDeploymentAttempt`; `isDeployed` alone can describe an older live version. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.versions.activate","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"version","in":"path","required":true,"description":"Numeric deployment version.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Numeric deployment version.","examples":[3]}},{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}}],"requestBody":{"required":false,"description":"No body. The version to promote is named by the request path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ActivateWorkflowVersionRequest"},"examples":{"example1":{"summary":"Request example 1","value":{}}}}}},"responses":{"200":{"description":"The accepted activation attempt.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ActivateWorkflowVersionResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":{"id":"depop_01J8ZK4RX5N7Y3S0U8D6E1W2","deploymentVersionId":"depver_01J8ZK4RX5N7Y3S0U8D6E1W3","version":3,"action":"activate","status":"activating","isCurrent":true,"readiness":{"webhooks":"ready","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:30:00.000Z","activatedAt":null,"error":null},"version":3}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/versions/{version}/revert":{"post":{"operationId":"revertWorkflowVersion","summary":"Revert workflow to version","description":"Overwrite the editable draft with a deployment version, discarding current draft edits. Requires workspace Admin access. Use `active` for the live version. The live deployment is unchanged; use Activate workflow version or Rollback workflow to change it. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.versions.revert","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"version","in":"path","required":true,"description":"Numeric deployment version, or `active` for the currently live version.","schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"string","const":"active"}],"description":"Numeric deployment version, or `active` for the currently live version.","examples":[3,"active"]}},{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}}],"requestBody":{"required":false,"description":"No body. The version to load into the draft is named by the request path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RevertWorkflowVersionRequest"},"examples":{"example1":{"summary":"Request example 1","value":{}}}}}},"responses":{"200":{"description":"The draft after it was overwritten.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RevertWorkflowVersionResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","version":3,"lastSaved":1765535400000}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/deployment":{"get":{"operationId":"getWorkflowDeployment","summary":"Get workflow deployment","description":"Read live deployment status, the latest attempt's readiness or failure, and draft divergence (`needsRedeployment`). Requires workspace read access. `isPublicApi` reports anonymous billed execution; `webhooks` lists registered delivery URLs.\n\n`/workflows/{workflowId}/deployment` controls overall API executability; `/deployments/chat` controls only the hosted-chat surface. A workflow can remain deployed without a chat.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.read","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The current deployment state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowDeploymentResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":true,"needsRedeployment":true,"isPublicApi":false,"deployedAt":"2026-06-12T10:30:00.000Z","warnings":[],"activeDeployment":{"deploymentVersionId":"depver_01J8ZK3QW4M6X2R9T7B5C0V2","version":3,"deployedAt":"2026-06-12T10:30:00.000Z"},"latestDeploymentAttempt":{"id":"depop_01J8ZK3QW4M6X2R9T7B5C0V1","deploymentVersionId":"depver_01J8ZK3QW4M6X2R9T7B5C0V2","version":3,"action":"deploy","status":"active","isCurrent":true,"readiness":{"webhooks":"ready","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:29:58.000Z","activatedAt":"2026-06-12T10:30:00.000Z","error":null},"webhooks":[{"blockId":"blk_01J8ZK3QW4M6X2R9T7B5C0V3","provider":"generic","url":"https://www.sim.ai/api/webhooks/trigger/leads"}]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"patch":{"operationId":"updateWorkflowPublicApi","summary":"Update workflow public API access","description":"Enable or disable unauthenticated execution of the deployed workflow. Requires workspace Admin access. Enabling lets anyone with the execution URL consume billed usage. Organization sharing restrictions return `403` with `PUBLIC_SHARING_NOT_ALLOWED`. Hosted chat is managed separately. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.public_api.update","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":true,"description":"Enable or disable unauthenticated public execution of the deployed workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkflowPublicApiRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"isPublicApi":true}}}}}},"responses":{"200":{"description":"The updated public API setting.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkflowPublicApiResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isPublicApi":true}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/deploy":{"post":{"operationId":"deployWorkflow","summary":"Deploy workflow","description":"Create a deployment version and activate it asynchronously. Requires workspace Admin access. Each accepted deploy creates a new version; retrying after a timeout can create a duplicate. Poll Get workflow deployment for the accepted `latestDeploymentAttempt` before treating the version as live.\n\n`lint` reports advisory findings for this version and never blocks deployment. A conflicting webhook path returns `409`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.deploy","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":false,"description":"Optional metadata for the new deployment version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DeployWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"name":"Escalation routing","description":"Adds the priority escalation branch."}}}}}},"responses":{"200":{"description":"The accepted deployment attempt.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DeployWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":{"id":"depop_01J8ZK3QW4M6X2R9T7B5C0V1","deploymentVersionId":"depver_01J8ZK3QW4M6X2R9T7B5C0V2","version":3,"action":"deploy","status":"preparing","isCurrent":true,"readiness":{"webhooks":"pending","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:30:00.000Z","activatedAt":null,"error":null},"version":3,"lint":{"sources":[],"sinks":[],"orphanBlocks":[],"emptyOutgoingPorts":[],"invalidBranchPorts":[],"invalidConnectionTargets":[],"fieldIssues":[],"unresolvedReferences":[],"tableFieldIssues":[],"notes":[]}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"delete":{"operationId":"undeployWorkflow","summary":"Undeploy workflow","description":"Deactivate the live workflow version and stop its scheduled and webhook triggers. Requires workspace Admin access and a deployed workflow. Deployed MCP tools become inactive; `archivedMcpTools` identifies them. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.undeploy","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The workflow was undeployed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UndeployWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":null,"archivedMcpTools":[]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/rollback":{"post":{"operationId":"rollbackWorkflow","summary":"Rollback workflow","description":"Activate a previous deployment version asynchronously, defaulting to the preceding active version. Requires workspace Admin access and a deployed workflow. The draft is unchanged. Poll the accepted `latestDeploymentAttempt`. To select a version while undeployed, use Activate workflow version. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.versions.activate","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":false,"description":"Optional deployment version to reactivate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RollbackWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"version":2}}}}}},"responses":{"200":{"description":"The accepted rollback attempt.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RollbackWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":{"id":"depop_01J8ZK4RX5N7Y3S0U8D6E1W2","deploymentVersionId":"depver_01J8ZK4RX5N7Y3S0U8D6E1W3","version":2,"action":"activate","status":"activating","isCurrent":true,"readiness":{"webhooks":"ready","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:30:00.000Z","activatedAt":null,"error":null},"version":2}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/export":{"get":{"operationId":"exportWorkflow","summary":"Export workflow","description":"Export the saved draft as portable workflow data with workspace read access. Registered credential fields and opaque table/tool values are cleared; environment references and ordinary workflow variables remain included. Review other configuration before sharing.\n\nDefault exports clear workspace bindings. Use `includeWorkspaceBindings=true` to retain non-secret bindings for a same-workspace import, or `includeReferences=true` for source identities and field occurrences used by mapped imports. Exporting records an audit event. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.export","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"includeReferences","in":"query","required":false,"description":"Include non-secret resource identifiers and source field occurrences for mapped imports.","schema":{"description":"Include non-secret resource identifiers and source field occurrences for mapped imports.","type":"boolean"}},{"name":"includeWorkspaceBindings","in":"query","required":false,"description":"Keep non-secret table, knowledge base, document, folder, channel, and other workspace bindings for a same-workspace import. Defaults to false, which clears these IDs. Registered credential fields and opaque table/tool values are cleared either way; environment references and ordinary workflow variables remain included.","schema":{"description":"Keep non-secret table, knowledge base, document, folder, channel, and other workspace bindings for a same-workspace import. Defaults to false, which clears these IDs. Registered credential fields and opaque table/tool values are cleared either way; environment references and ordinary workflow variables remain included.","type":"boolean"}}],"responses":{"200":{"description":"The workflow export payload.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ExportWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"version":"1.0","exportedAt":"2026-08-09T18:04:11.000Z","workflow":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","folderPath":"/Operations"},"state":{"blocks":{},"edges":[]}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/import":{"post":{"operationId":"importWorkflow","summary":"Import workflow","description":"Create an undeployed workflow from a portable export object, bare draft state, or JSON string. Requires workspace write access. The empty-state example creates a draft that needs runnable blocks before execution.\n\nMapped imports require a preview with the same choices, its `previewFingerprint`, and a stable `requestId`. Unresolved required configuration creates nothing. Identical retries return the committed result; reusing the ID with changed inputs returns `409`. The result includes regenerated graph IDs and an operation receipt. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.import","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workflow document, destination, and optional reviewed mappings. This example creates an empty draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ImportWorkflowBody"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Support draft","workflow":{"blocks":{},"edges":[]}}}}}}},"responses":{"201":{"description":"The imported workflow.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ImportWorkflowResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","folderPath":"/Operations","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z","blocks":[{"id":"block_start","type":"starter","name":"Start"},{"id":"block_triage","type":"agent","name":"Triage"},{"id":"block_reply","type":"response","name":"Reply"}],"warnings":["Triage: knowledgeBaseId was stripped by export; set it before running"]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/chat-deployments":{"get":{"operationId":"listChatDeployments","summary":"List chat deployments","description":"List hosted chats and their URLs with workspace read access and cursor pagination. Filter by `workflowId` for one workflow's chat. The admin-only detail read also includes visitor access settings and customizations. Passwords are never returned; organization permission groups can restrict chat deployment access.\n\nOAuth scope: `api:read`.","x-sim-operation":"chat_deployments.list","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose chat deployments to list.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose chat deployments to list."}},{"name":"workflowId","in":"query","required":false,"description":"Restrict to deployments of one workflow.","schema":{"description":"Restrict to deployments of one workflow.","type":"string","minLength":1}},{"name":"isActive","in":"query","required":false,"description":"Restrict to active or inactive deployments.","schema":{"description":"Restrict to active or inactive deployments.","type":"boolean"}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["identifier","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum chat deployments to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum chat deployments to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of chat deployments.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ChatDeploymentListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","identifier":"support","url":"https://sim.ai/chat/support","title":"Support chat","description":"Ask about billing, onboarding, or outages.","isActive":true,"authType":"public","outputConfigs":[{"blockId":"block_01J8ZK3QW4M6X2R9T7B5C0V4","path":"content"}],"includeThinking":false,"includeToolCalls":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/deployments/chat":{"get":{"operationId":"getWorkflowChatDeployment","summary":"Get workflow chat deployment","description":"Get a workflow's hosted chat and visitor access settings with workspace Admin access. A missing chat returns `404`. Passwords are never returned; `hasPassword` reports whether one is set. Hosted chat and workflow API deployment are managed separately. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"chat_deployments.read","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The workflow's chat deployment.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetWorkflowChatDeploymentResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","identifier":"support","url":"https://sim.ai/chat/support","title":"Support chat","description":"Ask about billing, onboarding, or outages.","isActive":true,"authType":"public","hasPassword":false,"allowedEmails":[],"customizations":{"primaryColor":"#6F3DFA","welcomeMessage":"Hi there! How can I help?"},"outputConfigs":[{"blockId":"block_01J8ZK3QW4M6X2R9T7B5C0V4","path":"content"}],"includeThinking":false,"includeToolCalls":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"put":{"operationId":"replaceWorkflowChatDeployment","summary":"Create or replace workflow chat deployment","description":"Create or replace a workflow's hosted chat and deploy its saved draft. Requires workspace Admin access. Omitted fields use defaults; customization exceptions are described on their fields.\n\nPassword authentication requires `password`; email or SSO requires non-empty `allowedEmails`. Public authentication lets anyone with the chat URL run it. A duplicate identifier or pending deployment returns `409`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"chat_deployments.replace","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"requestBody":{"required":true,"description":"The complete desired state of a workflow's chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ReplaceChatDeploymentRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"identifier":"support","title":"Support chat"}}}}}},"responses":{"200":{"description":"The saved chat deployment.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ReplaceWorkflowChatDeploymentResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","identifier":"support","url":"https://sim.ai/chat/support","title":"Support chat","description":"Ask about billing, onboarding, or outages.","isActive":true,"authType":"public","hasPassword":false,"allowedEmails":[],"customizations":{"primaryColor":"#6F3DFA","welcomeMessage":"Hi there! How can I help?"},"outputConfigs":[{"blockId":"block_01J8ZK3QW4M6X2R9T7B5C0V4","path":"content"}],"includeThinking":false,"includeToolCalls":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"delete":{"operationId":"deleteWorkflowChatDeployment","summary":"Delete workflow chat deployment","description":"Remove the hosted chat and release its URL identifier with workspace Admin access. The workflow API deployment remains active; use Undeploy workflow to stop it. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"chat_deployments.delete","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}],"responses":{"200":{"description":"The chat deployment was removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DeleteWorkflowChatDeploymentResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/execute":{"post":{"operationId":"executeWorkflowV2","summary":"Execute workflow","description":"Run the active deployment, or set `run.source: \"manual\"` to run the saved draft. Deployed execution requires workspace read access and OAuth `api:write` scope or an API key; public deployments also allow anonymous synchronous or streamed runs. Manual runs require personal-key or OAuth write access and cannot be async.\n\nUse `async: true` for a queue receipt, or `stream: true` for SSE. For a synchronous run with both flags false, send `Accept: application/x-ndjson` for heartbeat frames and a final frame containing `data`. Timeouts return `200` with `status: \"failed\"` and `error.code: \"TIMEOUT\"`; inspect run status. See [Streaming](/workflows/deployment/api#streaming) for event formats. Input descriptions specify compatible modes; invalid combinations return `400`.\n\nSupply `X-Run-Id` to prevent duplicate execution. Reuse returns `409`, without replaying results. A `503` with `error.details.code: \"ASYNC_ENQUEUE_AMBIGUOUS\"` omits `Retry-After` because the run may already have started. Reconcile using the returned run ID; do not start another run with a new or omitted ID.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.execute","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]},{}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"x-run-id","in":"header","required":false,"description":"Run ID for API-key or OAuth callers; ignored for anonymous requests. Reuse it after an uncertain response: a claimed ID returns `409` with `RUN_ID_CONFLICT`, without replaying results. Check Get workflow run, but `404` can persist while the ID remains claimed and does not establish whether execution started. Do not automatically restart with a fresh or omitted ID; either can start another run.","schema":{"description":"Run ID for API-key or OAuth callers; ignored for anonymous requests. Reuse it after an uncertain response: a claimed ID returns `409` with `RUN_ID_CONFLICT`, without replaying results. Check Get workflow run, but `404` can persist while the ID remains claimed and does not establish whether execution started. Do not automatically restart with a fresh or omitted ID; either can start another run.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","examples":["run_8f14e45f-ceea-467f-a"]}},{"name":"x-sim-via","in":"header","required":false,"description":"Comma-separated workflow identifiers naming the workflow-to-workflow call chain that led to this request. Each hop appends its own workflow id, and Sim sets it automatically; supply it yourself only when relaying an existing chain. A chain at the maximum depth is rejected with `409` and `error.details.code: \"CALL_CHAIN_DEPTH_EXCEEDED\"`.","schema":{"description":"Comma-separated workflow identifiers naming the workflow-to-workflow call chain that led to this request. Each hop appends its own workflow id, and Sim sets it automatically; supply it yourself only when relaying an existing chain. A chain at the maximum depth is rejected with `409` and `error.details.code: \"CALL_CHAIN_DEPTH_EXCEEDED\"`.","type":"string"}}],"requestBody":{"required":true,"description":"Input, workflow-state selection, and execution-mode options. Input descriptions specify compatible modes; invalid combinations return `400`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ExecuteWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"input":{"ticketId":"ticket_123"}}},"example2":{"summary":"Request example 2","value":{"input":{"ticketId":"ticket_123"},"async":true}},"example3":{"summary":"Request example 3","value":{"input":{"ticketId":"ticket_123"},"stream":true}},"example4":{"summary":"Request example 4","value":{"run":{"source":"manual"}}},"example5":{"summary":"Request example 5","value":{"run":{"source":"manual","entry":{"type":"block","blockId":"block_123","sourceRunId":"run_123"}}}},"example6":{"summary":"Request example 6","value":{"run":{"source":"manual","entry":{"type":"block","blockId":"block_123","sourceRunId":"run_123"},"stopAfterBlockId":"block_123"}}}}}}},"responses":{"200":{"description":"A synchronous run result, heartbeat-delimited NDJSON result stream, or Server-Sent Event stream.","headers":{"X-Run-Id":{"$ref":"#/components/headers/Workflows_X-Run-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ExecuteWorkflowSyncResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","output":{"result":"Ticket routed to Support"},"blockOutputs":null,"error":null,"startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000}}}}},"application/x-ndjson":{"schema":{"type":"string"}},"text/event-stream":{"schema":{"type":"string"}}}},"202":{"description":"The asynchronous run was queued.","headers":{"X-Run-Id":{"$ref":"#/components/headers/Workflows_X-Run-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ExecuteWorkflowQueuedResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"runId":"run_8f14e45f-ceea-467f-a","statusUrl":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"402":{"$ref":"#/components/responses/Workflows_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_RunIdConflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"499":{"$ref":"#/components/responses/Workflows_ClientClosedRequest"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/runs":{"get":{"operationId":"listWorkflowRunsV2","summary":"List workflow runs","description":"List recorded workflow runs with workspace read access, filters, and cursor pagination. Cost can be hidden by organization permission groups. Expired runs are permanently deleted by retention cleanup. Sim Cloud Free defaults to 30 days from run start; paid plans and billing-disabled deployments have no default expiry. Organization policies and workspace overrides can set an effective window. Billing-disabled cleanup requires enabled data retention. Runs referenced by active pauses are protected from cleanup.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.runs.list","x-oauth-scope":"api:read","tags":["Workflow Runs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}},{"name":"status","in":"query","required":false,"description":"Filter by run status.","schema":{"description":"Filter by run status.","type":"string","enum":["pending","running","completed","failed","cancelled","paused"]}},{"name":"trigger","in":"query","required":false,"description":"Filter by trigger type.","schema":{"description":"Filter by trigger type.","type":"string","minLength":1}},{"name":"startDate","in":"query","required":false,"description":"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."}},{"name":"endDate","in":"query","required":false,"description":"Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."}},{"name":"limit","in":"query","required":false,"description":"Maximum workflow runs to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum workflow runs to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"order","in":"query","required":false,"description":"Sort direction by run start time. This list is sortable only by run start time, so it takes `order` in place of `sortBy`/`sortOrder`, which it rejects.","schema":{"default":"desc","description":"Sort direction by run start time. This list is sortable only by run start time, so it takes `order` in place of `sortBy`/`sortOrder`, which it rejects.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of workflow runs.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowRunListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","trigger":"api","startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000,"cost":{"total":12}}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/runs/{runId}":{"get":{"operationId":"getWorkflowRunV2","summary":"Get workflow run","description":"Read current run state with workspace read access. Request final output and files with `includeOutput`, or block outputs with `selectedOutputs`. Organization permission groups can hide output, files, or cost.\n\n`includeFileBase64` inlines file bytes. A file or the total above 16 MiB returns `413` naming a download path; download large files individually. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.runs.read","x-oauth-scope":"api:read","tags":["Workflow Runs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}},{"name":"runId","in":"path","required":true,"description":"Unique workflow run identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]}},{"name":"includeOutput","in":"query","required":false,"description":"Include the final workflow output when true. It does not gate `blockOutputs`, which `selectedOutputs` selects on its own.","schema":{"description":"Include the final workflow output when true. It does not gate `blockOutputs`, which `selectedOutputs` selects on its own.","type":"boolean"}},{"name":"selectedOutputs","in":"query","required":false,"description":"Comma-separated block output references to include, as `blockId` or `blockId.path`. Block *names* are not resolved here — unlike the execute request, this resource reads a recorded run and matches ids only, so a selector that is not headed by a block id answers `400` instead of an empty `blockOutputs`.","schema":{"description":"Comma-separated block output references to include, as `blockId` or `blockId.path`. Block *names* are not resolved here — unlike the execute request, this resource reads a recorded run and matches ids only, so a selector that is not headed by a block id answers `400` instead of an empty `blockOutputs`.","type":"string"}},{"name":"includeFileBase64","in":"query","required":false,"description":"Inline each produced file's bytes as base64. Requires `includeOutput`. A file above the inline ceiling answers `413` naming its download path; fetch large files from `downloadPath` instead.","schema":{"description":"Inline each produced file's bytes as base64. Requires `includeOutput`. A file above the inline ceiling answers `413` naming its download path; fetch large files from `downloadPath` instead.","type":"boolean"}},{"name":"base64MaxBytes","in":"query","required":false,"description":"Per-file inline ceiling, lowering but never raising the server limit of 16 MiB.","schema":{"description":"Per-file inline ceiling, lowering but never raising the server limit of 16 MiB.","type":"integer","minimum":1,"maximum":16777216}}],"responses":{"200":{"description":"The workflow run status.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowRunStatusResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","trigger":"api","startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000,"paused":null,"cost":{"total":12},"error":null,"output":{"result":"Ticket routed to Support"},"blockOutputs":null,"files":[{"id":"file_1a2b3c","name":"summary.pdf","size":20480,"type":"application/pdf","downloadPath":"/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a/files/file_1a2b3c","base64":null}]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/runs/{runId}/files/{fileId}":{"get":{"operationId":"downloadWorkflowRunFileV2","summary":"Download workflow run file","description":"Download one run-produced file by its reported ID with workspace read access. Downloads record an audit event. Expired runs are permanently deleted by retention cleanup. Sim Cloud Free defaults to 30 days from run start; paid plans and billing-disabled deployments have no default expiry. Organization policies and workspace overrides can set an effective window. Billing-disabled cleanup requires enabled data retention. Runs referenced by active pauses are protected from cleanup. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. `HEAD` does not provide byte length; use the file's size in Get workflow run when available.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.download_run_file","x-oauth-scope":"api:read","tags":["Workflow Runs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}},{"name":"runId","in":"path","required":true,"description":"Unique workflow run identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]}},{"name":"fileId","in":"path","required":true,"description":"Identifier of a file the run produced, as reported by the run resource.","schema":{"type":"string","minLength":1,"maxLength":256,"description":"Identifier of a file the run produced, as reported by the run resource."}}],"responses":{"200":{"description":"The run file bytes.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"},"Content-Type":{"$ref":"#/components/headers/Workflows_Content-Type"},"Content-Disposition":{"$ref":"#/components/headers/Workflows_Content-Disposition"},"Content-Length":{"$ref":"#/components/headers/Workflows_Content-Length"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/runs/{runId}/resume":{"post":{"operationId":"resumeWorkflowRunV2","summary":"Resume workflow run","description":"Resume one human-in-the-loop pause with workspace write access. The resumed attempt receives a new run ID and returns a synchronous result or queue receipt. A run that originally streamed resumes asynchronously through v2; this endpoint returns no SSE stream.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.runs.resume","x-oauth-scope":"api:write","tags":["Workflow Runs"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}},{"name":"runId","in":"path","required":true,"description":"Unique workflow run identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]}}],"requestBody":{"required":true,"description":"Pause context and optional input used to resume a workflow run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ResumeWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"contextId":"ctx_123","input":{"approved":true}}}}}}},"responses":{"200":{"description":"The resumed workflow attempt completed synchronously.","headers":{"X-Run-Id":{"$ref":"#/components/headers/Workflows_X-Run-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ResumeWorkflowSyncResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","output":{"result":"Ticket routed to Support"},"blockOutputs":null,"error":null,"startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000}}}}}}},"202":{"description":"The resumed workflow attempt was queued.","headers":{"X-Run-Id":{"$ref":"#/components/headers/Workflows_X-Run-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ResumeWorkflowQueuedResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"runId":"run_8f14e45f-ceea-467f-a","statusUrl":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"402":{"$ref":"#/components/responses/Workflows_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/{workflowId}/runs/{runId}/cancel":{"post":{"operationId":"cancelRunV2","summary":"Cancel workflow run","description":"Request cancellation of a running, queued, or paused workflow run with workspace write access. Cancellation is best effort; inspect the outcome flags and `reason`. A terminal run returns `200` with `success: false` and an `already_*` reason. A table workflow-group run returns `409` when its cell can no longer accept cancellation.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.runs.cancel","x-oauth-scope":"api:write","tags":["Workflow Runs"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Unique workflow identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow identifier."}},{"name":"runId","in":"path","required":true,"description":"Unique workflow run identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]}}],"responses":{"200":{"description":"The cancellation outcome.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_CancelWorkflowRunResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"success":true,"runId":"run_8f14e45f-ceea-467f-a","redisAvailable":true,"durablyRecorded":true,"locallyAborted":true,"pausedCancelled":false,"reason":"recorded"}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/folders":{"get":{"operationId":"listWorkflowsFolders","summary":"List workflow folders","description":"List workflow folders with workspace read access, optional parent/name filters, and sorting. Returns one page; `nextCursor` is always null. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"workflows.folders.list","x-oauth-scope":"api:read","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose folders should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose folders should be listed."}},{"name":"parentPath","in":"query","required":false,"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/Workflows_FolderPathInput"}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the folder name.","schema":{"description":"Case-insensitive substring match against the folder name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A list of workflow folders.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_WorkflowFolderListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"name":"Operations","path":"/Operations","parentPath":"/","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-05-01T09:00:00.000Z","locked":false}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"post":{"operationId":"createWorkflowsFolder","summary":"Create workflow folder","description":"Create a workflow folder at a non-root path with workspace write access. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.folders.create","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace and canonical path for a new workflow folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_CreateWorkflowFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Operations"}}}}}},"responses":{"201":{"description":"The created workflow folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_CreateWorkflowFolderResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"name":"Operations","path":"/Operations","parentPath":"/","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-05-01T09:00:00.000Z","locked":false}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"patch":{"operationId":"relocateWorkflowsFolder","summary":"Rename or move workflow folder","description":"Rename or move a workflow folder and update descendant paths with workspace write access. An existing destination receives the folder as a child; otherwise the destination is its new full path. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.folders.relocate","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Current and destination paths for a workflow folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RelocateWorkflowFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Operations","destinationPath":"/Support"}}}}}},"responses":{"200":{"description":"The relocated workflow folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RelocateWorkflowFolderResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"name":"Support","path":"/Support","parentPath":"/","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-05-01T09:00:00.000Z","locked":false}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Workflows_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"delete":{"operationId":"deleteWorkflowsFolder","summary":"Delete workflow folder","description":"Archive an empty workflow folder with workspace write access. `recursive=true` also archives its subfolders and workflows, stopping the archived workflows' triggers and hosted surfaces. Use Restore workflow to recover workflows.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.folders.delete","x-oauth-scope":"api:write","tags":["Workflows"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace containing the folder.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."}},{"name":"path","in":"query","required":true,"description":"Path of the folder to delete.","schema":{"description":"Path of the folder to delete.","$ref":"#/components/schemas/Workflows_NonRootFolderPathInput"}},{"name":"recursive","in":"query","required":false,"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","schema":{"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"default":"false","type":"string"}}],"responses":{"200":{"description":"The workflow folder was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Workflows_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Workflows_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Workflows_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_DeleteWorkflowFolderResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"path":"/Operations","deleted":true,"deletedItems":{"folders":1,"workflows":0}}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"423":{"$ref":"#/components/responses/Workflows_Locked"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/preview":{"post":{"operationId":"previewWorkspaceFork","summary":"Preview workspace fork","description":"Preview deployed workflows and explicitly selected resources for a new child workspace. Requires source workspace Admin access and permission to create a workspace in its organization. The read-only result supplies the fingerprint for Fork workspace with the same choices. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.preview","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Optional child name and explicitly selected resource copies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkspaceForkBody"}}}},"responses":{"200":{"description":"Deployed source workflows, selected-copy count, and a preview fingerprint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkspaceForkResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork":{"post":{"operationId":"forkWorkspace","summary":"Fork workspace","description":"Create a child workspace with undeployed drafts of the source's deployed workflows. Requires source workspace Admin access and permission to create a workspace in its organization. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nFirst preview the same name and copy choices, then send the returned fingerprint and a stable request ID. The example fingerprint is illustrative. Identical retries return the same committed operation; changed inputs with that ID return `409`. Poll Get workspace operation until selected resource copies finish. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.create","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Child name and copy choices, with the actual preview fingerprint and a stable request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ForkWorkspaceBody"},"examples":{"example1":{"summary":"Request example 1","value":{"name":"Support sandbox","requestId":"fork-support-2026-10-13","previewFingerprint":"c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a"}}}}}},"responses":{"200":{"description":"Committed fork receipt and resource-copy progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ForkWorkspaceResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"operationId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","requestId":"fork-support-2026-10-13","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","kind":"workspace_fork","applied":true,"status":"processing","resourceIds":["destination_workflow_id"],"issues":[]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/push/preview":{"post":{"operationId":"previewWorkspacePush","summary":"Preview workspace push","description":"Preview changes from this workspace into the other workspace along a direct fork edge. Requires Admin access to both workspaces. The plan lists workflows to create, replace, or archive; replacements overwrite target drafts with the source deployment. Proposed mappings are not saved. Dependent choices use source workflow, block, and field IDs. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.sync.preview","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Other workspace and proposed source-to-target sync choices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkspacePushBody"}}}},"responses":{"200":{"description":"Current-to-other workflow actions, required choices, and preview fingerprint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkspacePushResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/push":{"post":{"operationId":"pushWorkspace","summary":"Push workspace","description":"Apply a reviewed sync from this workspace into the other workspace along a direct fork edge. Requires Admin access to both workspaces. Creates unmatched deployed workflows, overwrites mapped target drafts, and archives mapped targets whose sources were deleted or archived. Undeployed sources alone do not archive targets. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nSend `confirm: true`, the fingerprint from a preview with identical choices, and a stable request ID. The example hash is illustrative. Changed or unresolved plans return `409` without applying. Identical retries return the committed operation; changed inputs with that ID return `409`. Copies and deployment activation can finish after the transaction commits. Poll Get workspace operation before treating the target as ready. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.sync","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Confirmed current-to-other choices, actual preview fingerprint, and stable request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PushWorkspaceBody"},"examples":{"example1":{"summary":"Request example 1","value":{"otherWorkspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","requestId":"push-support-2026-10-13","previewFingerprint":"c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a","confirm":true}}}}}},"responses":{"200":{"description":"Committed push receipt with copy and deployment readiness.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PushWorkspaceResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"operationId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","requestId":"push-support-2026-10-13","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","kind":"workspace_push","applied":true,"status":"processing","resourceIds":["destination_workflow_id"],"issues":[]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/pull/preview":{"post":{"operationId":"previewWorkspacePull","summary":"Preview workspace pull","description":"Preview changes from the other workspace into this workspace along a direct fork edge. Requires Admin access to both workspaces. The plan lists workflows to create, replace, or archive; replacements overwrite target drafts with the source deployment. Proposed mappings are not saved. Dependent choices use source workflow, block, and field IDs. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.sync.preview","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Other workspace and proposed source-to-target sync choices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkspacePullBody"}}}},"responses":{"200":{"description":"Other-to-current workflow actions, required choices, and preview fingerprint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkspacePullResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/pull":{"post":{"operationId":"pullWorkspace","summary":"Pull workspace","description":"Apply a reviewed sync from the other workspace into this workspace along a direct fork edge. Requires Admin access to both workspaces. Creates unmatched deployed workflows, overwrites mapped target drafts, and archives mapped targets whose sources were deleted or archived. Undeployed sources alone do not archive targets. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nSend `confirm: true`, the fingerprint from a preview with identical choices, and a stable request ID. The example hash is illustrative. Changed or unresolved plans return `409` without applying. Identical retries return the committed operation; changed inputs with that ID return `409`. Copies and deployment activation can finish after the transaction commits. Poll Get workspace operation before treating the target as ready. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.sync","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Confirmed other-to-current choices, actual preview fingerprint, and stable request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PullWorkspaceBody"},"examples":{"example1":{"summary":"Request example 1","value":{"otherWorkspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","requestId":"pull-support-2026-10-13","previewFingerprint":"c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a","confirm":true}}}}}},"responses":{"200":{"description":"Committed pull receipt with copy and deployment readiness.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PullWorkspaceResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"operationId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","requestId":"pull-support-2026-10-13","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","kind":"workspace_pull","applied":true,"status":"processing","resourceIds":["destination_workflow_id"],"issues":[]}}}}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/availability":{"get":{"operationId":"getWorkspaceForkAvailability","summary":"Get workspace fork availability","description":"Check whether workspace forking is enabled for this deployment and workspace plan. Requires workspace Admin access. Returns `available: false` when the feature gate is unmet. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.fork.discover","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"responses":{"200":{"description":"Whether forking is enabled for this deployment and workspace plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetWorkspaceForkAvailabilityResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/lineage":{"get":{"operationId":"getWorkspaceForkLineage","summary":"Get workspace fork lineage","description":"Read this workspace and its direct parent, or `parent: null` when it has no active parent. Requires workspace Admin access. The relationship does not grant access to the parent. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.fork.discover","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"responses":{"200":{"description":"Current workspace and its active direct parent, when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetWorkspaceForkLineageResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/children":{"get":{"operationId":"listWorkspaceForkChildren","summary":"List workspace fork children","description":"List this workspace's active direct children, newest first, with cursor pagination. Requires workspace Admin access. A fork relationship does not grant access to a child workspace. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.fork.discover","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}},{"name":"limit","in":"query","required":false,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"sortBy","in":"query","required":false,"description":"Supported stable sort key for this collection.","schema":{"default":"createdAt","description":"Supported stable sort key for this collection.","type":"string","enum":["createdAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["desc"]}}],"responses":{"200":{"description":"A page of active direct child workspaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ListWorkspaceForkChildrenResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/resources":{"get":{"operationId":"listWorkspaceForkResources","summary":"List workspace fork resources","description":"List copyable resources of one kind in this workspace with cursor pagination. Requires workspace Admin access. Fork creation uses file IDs; sync copy choices use file storage keys from source references or file resource reads. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.fork.discover","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}},{"name":"limit","in":"query","required":false,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"kind","in":"query","required":true,"description":"Kind of source resource to list for copy selection.","schema":{"type":"string","enum":["files","tables","knowledgeBases","customTools","skills","mcpServers","workflowMcpServers"],"description":"Kind of source resource to list for copy selection."}},{"name":"sortBy","in":"query","required":false,"description":"Supported stable sort key for this collection.","schema":{"default":"id","description":"Supported stable sort key for this collection.","type":"string","enum":["id"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc"]}}],"responses":{"200":{"description":"A page of copyable resource candidates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ListWorkspaceForkResourcesResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/mappings":{"get":{"operationId":"getWorkspaceForkMappings","summary":"Get workspace fork mappings","description":"Read persisted resource mappings in the requested source-to-target direction along a direct fork edge. Requires Admin access to both workspaces. Discover candidates with destination resource reads and selector operations. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.fork.mappings.read","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}},{"name":"otherWorkspaceId","in":"query","required":true,"description":"Workspace on the other side of the direct fork edge.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."}},{"name":"direction","in":"query","required":true,"description":"Push means current to other; pull means other to current, independent of parent/child orientation.","schema":{"type":"string","enum":["push","pull"],"description":"Push means current to other; pull means other to current, independent of parent/child orientation."}},{"name":"limit","in":"query","required":false,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"sortBy","in":"query","required":false,"description":"Supported stable sort key for this collection.","schema":{"default":"id","description":"Supported stable sort key for this collection.","type":"string","enum":["id"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc"]}}],"responses":{"200":{"description":"A page of persisted source-to-target mapping entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetWorkspaceForkMappingsResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}},"put":{"operationId":"updateWorkspaceForkMappings","summary":"Update workspace fork mappings","description":"Update mappings along a direct fork edge with Admin access to both workspaces. Destination resource membership and credential provider compatibility are validated. Push maps current-to-other; pull maps other-to-current. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.mappings.update","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Other workspace, direction, and mapping entries to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkspaceForkMappingsBody"}}}},"responses":{"200":{"description":"Number of mapping records changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkspaceForkMappingsResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/rollback":{"post":{"operationId":"rollbackWorkspaceFork","summary":"Rollback workspace fork","description":"Restore the latest sync into this workspace from the named other workspace using prior deployed versions. Requires target workspace Admin access. A newer sync from another fork edge returns `409`. Arbitrary draft edits and copied resources are not restored or removed. Inspect `pendingActivations`; retry rollback if activation remains unfinished. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.rollback","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Other workspace whose latest inbound sync should be undone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RollbackWorkspaceForkBody"}}}},"responses":{"200":{"description":"Restored, archived, skipped, and still-activating workflow counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_RollbackWorkspaceForkResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/unlink":{"post":{"operationId":"unlinkWorkspaceFork","summary":"Unlink workspace fork","description":"Remove the direct fork relationship and its mappings with Admin access to the acting workspace. Existing workflows and resources remain available. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.unlink","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Other workspace on the direct fork edge to remove.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UnlinkWorkspaceForkBody"}}}},"responses":{"200":{"description":"Confirmation that the relationship was removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UnlinkWorkspaceForkResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/fork/exclusions":{"put":{"operationId":"updateWorkspaceForkExclusions","summary":"Update workspace fork exclusions","description":"Include or exclude selected workflows from fork sync with workspace Admin access. Excluded workflows are skipped as sources and targets. Missing, archived, and unchanged workflow IDs are skipped. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspaces.fork.exclusions","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}}],"requestBody":{"required":true,"description":"Workflow IDs and whether to exclude them from sync.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkspaceForkExclusionsBody"}}}},"responses":{"200":{"description":"Number of workflow exclusion flags changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_UpdateWorkspaceForkExclusionsResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workflows/import/preview":{"post":{"operationId":"previewWorkflowImport","summary":"Preview workflow import","description":"Validate destination mappings and configuration with workspace write access, without creating a workflow. The result reports readiness, unresolved fields, discovery instructions, and a fingerprint for mapped import with the same choices. Imported provenance never authorizes or queries a source workspace.\n\nOAuth scope: `api:write`.","x-sim-operation":"workflows.import.preview","x-oauth-scope":"api:write","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Portable workflow data and destination metadata for an import.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ImportWorkflowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","folderPath":"/Operations","workflow":{"blocks":{},"edges":[]}}}}}}},"responses":{"200":{"description":"Import readiness, unresolved bindings, and destination discovery instructions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_PreviewWorkflowImportResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/selectors/list":{"post":{"operationId":"listSelector","summary":"List selector options","description":"List authorized workspace configuration choices using the selector key and context from an import or sync preview. Requires workspace read access. Missing OAuth connections require human authorization. Keep workspace, selector, context, and search unchanged while paging; a changed provider page returns `409` and requires restarting without a cursor. Provider pages above 8 MiB return `413`; narrow the search. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"selectors.execute","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"requestBody":{"required":true,"description":"Workspace, registered selector key, context, and optional search/cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ListSelectorBody"}}}},"responses":{"200":{"description":"A page of authorized options, continuation cursor, and truncation status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ListSelectorResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/selectors/get":{"post":{"operationId":"getSelector","summary":"Get selector option","description":"Get an authorized configuration choice by provider ID and declared context with workspace read access. Returns `data: null` when the option is absent from complete results. Truncated results or pagination limits that prevent verification return `413`; a list-only lookup checks at most 100 pages or 10,000 options. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"selectors.execute","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"requestBody":{"required":true,"description":"Workspace, registered selector key, context, and provider option ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetSelectorBody"}}}},"responses":{"200":{"description":"The authorized option, or data:null when absent from complete results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetSelectorResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/operations/{operationId}":{"get":{"operationId":"getWorkspaceOperation","summary":"Get workspace operation","description":"Read a committed operation and refresh its copy progress, exact admitted deployment readiness, and structured issues with workspace read access. `applied: true` means the transaction committed even if follow-up work failed. This read does not require the fork-specific Admin role or feature gate.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.operations.read","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}},{"name":"operationId","in":"path","required":true,"description":"Durable operation identifier to use for polling.","schema":{"type":"string","minLength":1,"maxLength":256,"description":"Durable operation identifier to use for polling."}}],"responses":{"200":{"description":"Refreshed commit, copy progress, and exact deployment readiness.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_GetWorkspaceOperationResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/operations":{"get":{"operationId":"listWorkspaceOperations","summary":"List workspace operations","description":"List stored operation receipts newest first with workspace read access. Filter by the original `requestId` to reconcile an uncertain mutation response. Read an individual operation to refresh its copy and deployment readiness. This list does not require the fork-specific Admin role or feature gate.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.operations.read","x-oauth-scope":"api:read","tags":["Workspace Sync"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Explicit current workspace scope.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."}},{"name":"limit","in":"query","required":false,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"requestId","in":"query","required":false,"description":"Find an uncertain mutation by the original client request ID; keep the same filter while paging.","schema":{"description":"Find an uncertain mutation by the original client request ID; keep the same filter while paging.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"A page of stored operation receipts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_ListWorkspaceOperationsResponse"}}}},"400":{"$ref":"#/components/responses/Workflows_BadRequest"},"401":{"$ref":"#/components/responses/Workflows_Unauthorized"},"403":{"$ref":"#/components/responses/Workflows_Forbidden"},"404":{"$ref":"#/components/responses/Workflows_NotFound"},"409":{"$ref":"#/components/responses/Workflows_Conflict"},"413":{"$ref":"#/components/responses/Workflows_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Workflows_RateLimited"},"500":{"$ref":"#/components/responses/Workflows_InternalError"},"503":{"$ref":"#/components/responses/Workflows_ServiceUnavailable"}}}},"/api/v2/logs":{"get":{"operationId":"listLogs","summary":"List logs","description":"List logs with filters, selectable detail, sorting, and cursor pagination. `includeJobRuns=true` includes chat and Sim-agent jobs only with `sortBy=startedAt`, because other orderings are unsupported. `files` contains only run-produced files; use the files API for input attachments. Expired runs are permanently deleted by retention cleanup. Sim Cloud Free defaults to 30 days from run start; paid plans and billing-disabled deployments have no default expiry. Organization policies and workspace overrides can set an effective window. Billing-disabled cleanup requires enabled data retention. Runs referenced by active pauses are protected from cleanup. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"logs.list","x-oauth-scope":"api:read","tags":["Logs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose execution logs should be returned.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose execution logs should be returned."}},{"name":"workflowIds","in":"query","required":false,"description":"Comma-separated workflow identifiers to include. An empty entry is rejected. At most 200 entries.","schema":{"type":"string","description":"Comma-separated workflow identifiers to include. An empty entry is rejected. At most 200 entries."}},{"name":"triggers","in":"query","required":false,"description":"Comma-separated, lowercase trigger types or webhook provider IDs. Matching is exact and case-sensitive; unknown values select no runs. An empty entry is rejected. The sentinel `all` disables this filter, even when listed with other values. At most 100 entries.","schema":{"type":"string","description":"Comma-separated, lowercase trigger types or webhook provider IDs. Matching is exact and case-sensitive; unknown values select no runs. An empty entry is rejected. The sentinel `all` disables this filter, even when listed with other values. At most 100 entries."}},{"name":"level","in":"query","required":false,"description":"Severity level to include.","schema":{"type":"string","enum":["info","error"],"description":"Severity level to include."}},{"name":"startDate","in":"query","required":false,"description":"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."}},{"name":"endDate","in":"query","required":false,"description":"Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."}},{"name":"minDurationMs","in":"query","required":false,"description":"Minimum total execution duration in milliseconds. Whole milliseconds from 0 to 2147483647; the stored duration is a 32-bit integer, so a fractional or out-of-range bound is rejected.","schema":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Minimum total execution duration in milliseconds. Whole milliseconds from 0 to 2147483647; the stored duration is a 32-bit integer, so a fractional or out-of-range bound is rejected."}},{"name":"maxDurationMs","in":"query","required":false,"description":"Maximum total execution duration in milliseconds. Whole milliseconds from 0 to 2147483647; the stored duration is a 32-bit integer, so a fractional or out-of-range bound is rejected.","schema":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Maximum total execution duration in milliseconds. Whole milliseconds from 0 to 2147483647; the stored duration is a 32-bit integer, so a fractional or out-of-range bound is rejected."}},{"name":"minCost","in":"query","required":false,"description":"Minimum execution cost in USD, from 0 to 1000000. A run is never charged a negative amount, so a negative bound is rejected rather than treated as a filter that matches every run.","schema":{"type":"number","minimum":0,"maximum":1000000,"description":"Minimum execution cost in USD, from 0 to 1000000. A run is never charged a negative amount, so a negative bound is rejected rather than treated as a filter that matches every run."}},{"name":"maxCost","in":"query","required":false,"description":"Maximum execution cost in USD, from 0 to 1000000. A run is never charged a negative amount, so a negative bound is rejected rather than treated as a filter that matches every run.","schema":{"type":"number","minimum":0,"maximum":1000000,"description":"Maximum execution cost in USD, from 0 to 1000000. A run is never charged a negative amount, so a negative bound is rejected rather than treated as a filter that matches every run."}},{"name":"model","in":"query","required":false,"description":"AI model used during execution.","schema":{"type":"string","description":"AI model used during execution."}},{"name":"details","in":"query","required":false,"description":"Response detail level. `full` adds the `workflow` summary to every workflow run; a job run never carries one, whatever this is set to. `includeTraceSpans=true` and `includeFinalOutput=true` each imply `full`, so either one adds `workflow` even when `details=basic` is sent explicitly.","schema":{"default":"basic","type":"string","enum":["basic","full"],"description":"Response detail level. `full` adds the `workflow` summary to every workflow run; a job run never carries one, whatever this is set to. `includeTraceSpans=true` and `includeFinalOutput=true` each imply `full`, so either one adds `workflow` even when `details=basic` is sent explicitly."}},{"name":"includeTraceSpans","in":"query","required":false,"description":"Whether to include block-level trace spans. Implies `details=full`. Spans are pruned on their own retention schedule, so a run whose spans have aged out returns `traceSpans: []` rather than an error.","schema":{"description":"Whether to include block-level trace spans. Implies `details=full`. Spans are pruned on their own retention schedule, so a run whose spans have aged out returns `traceSpans: []` rather than an error.","type":"boolean"}},{"name":"includeFinalOutput","in":"query","required":false,"description":"Whether to include the final workflow output. Implies `details=full`, so the `workflow` summary is present regardless of what `details` is set to.","schema":{"description":"Whether to include the final workflow output. Implies `details=full`, so the `workflow` summary is present regardless of what `details` is set to.","type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum log entries per page. Values outside 1–1000 are truncated and clamped into that range rather than rejected. Defaults to 100.","schema":{"description":"Maximum log entries per page. Values outside 1–1000 are truncated and clamped into that range rather than rejected. Defaults to 100.","type":"integer","default":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"includeHandledErrors","in":"query","required":false,"description":"Whether `level=error` also selects runs that finished at `info` after a block error was recovered by an error path. Off by default: such a run succeeded, so it is an error only to a caller auditing error handling. Every row reports `hasHandledErrors` whether or not this is set. Job runs carry no block trace, so the flag never widens that branch.","schema":{"description":"Whether `level=error` also selects runs that finished at `info` after a block error was recovered by an error path. Off by default: such a run succeeded, so it is an error only to a caller auditing error handling. Every row reports `hasHandledErrors` whether or not this is set. Job runs carry no block trace, so the flag never widens that branch.","type":"boolean"}},{"name":"status","in":"query","required":false,"description":"Comma-separated execution statuses to include, from `pending` | `running` | `paused` | `redacting` | `completed` | `failed` | `cancelled`. An empty entry is rejected. ANDed with `level`, which reports severity rather than lifecycle.","schema":{"type":"string","description":"Comma-separated execution statuses to include, from `pending` | `running` | `paused` | `redacting` | `completed` | `failed` | `cancelled`. An empty entry is rejected. ANDed with `level`, which reports severity rather than lifecycle."}},{"name":"workflowName","in":"query","required":false,"description":"Case-insensitive substring match against the run's workflow name. Runs whose workflow has been deleted match nothing, because the name is no longer joinable.","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive substring match against the run's workflow name. Runs whose workflow has been deleted match nothing, because the name is no longer joinable."}},{"name":"includeJobRuns","in":"query","required":false,"description":"Include Chat and Sim-agent jobs alongside workflow runs. Jobs use `kind: \"job\"` and have no workflow or cost ledger. Workflow, folder, model, or status filters exclude jobs. This option is valid only when sorting by `startedAt`.","schema":{"description":"Include Chat and Sim-agent jobs alongside workflow runs. Jobs use `kind: \"job\"` and have no workflow or cost ledger. Workflow, folder, model, or status filters exclude jobs. This option is valid only when sorting by `startedAt`.","type":"boolean"}},{"name":"runId","in":"query","required":false,"description":"Exact run identifier to match.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Exact run identifier to match."}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. `durationMs` and `cost` are null until a run settles; those runs sort before recorded values in ascending order and after them in descending order. Only `startedAt` can order Chat and Sim-agent job runs, so any other value is rejected when job runs are included.","schema":{"default":"startedAt","description":"Field used to sort the result. `durationMs` and `cost` are null until a run settles; those runs sort before recorded values in ascending order and after them in descending order. Only `startedAt` can order Chat and Sim-agent job runs, so any other value is rejected when job runs are included.","type":"string","enum":["startedAt","durationMs","cost","status"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"folderPaths","in":"query","required":false,"description":"Comma-separated workflow folder paths, including descendants. Up to 100 paths. Unknown folder paths contribute no matches.","schema":{"type":"string","description":"Comma-separated workflow folder paths, including descendants. Up to 100 paths. Unknown folder paths contribute no matches."}}],"responses":{"200":{"description":"A page of execution logs matching the filters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Logs_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Logs_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Logs_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2LogListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"kind":"workflow","runId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deploymentVersionId":"dep_2c4e6a8b0d1f","status":"completed","level":"info","trigger":"api","startedAt":"2026-01-15T10:30:00.000Z","endedAt":"2026-01-15T10:30:01.250Z","totalDurationMs":1250,"cost":{"total":0.0072},"hasHandledErrors":false,"files":[{"id":"f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04","name":"summary.pdf","size":18422,"type":"application/pdf","downloadPath":"/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13/files/f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04"}]}],"nextCursor":"eyJzdGFydGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwMFoifQ=="}}}}}},"400":{"$ref":"#/components/responses/Logs_BadRequest"},"401":{"$ref":"#/components/responses/Logs_Unauthorized"},"403":{"$ref":"#/components/responses/Logs_Forbidden"},"404":{"$ref":"#/components/responses/Logs_NotFound"},"413":{"$ref":"#/components/responses/Logs_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Logs_RateLimited"},"500":{"$ref":"#/components/responses/Logs_InternalError"},"503":{"$ref":"#/components/responses/Logs_ServiceUnavailable"}}}},"/api/v2/logs/{runId}":{"get":{"operationId":"getLog","summary":"Get log","description":"Get a run's workflow graph, trace spans, final output, and cost. Trace spans expire separately, so an empty `traceSpans` array does not prove none were recorded. Expired runs are permanently deleted by retention cleanup. Sim Cloud Free defaults to 30 days from run start; paid plans and billing-disabled deployments have no default expiry. Organization policies and workspace overrides can set an effective window. Billing-disabled cleanup requires enabled data retention. Runs referenced by active pauses are protected from cleanup. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"logs.read_detail","x-oauth-scope":"api:read","tags":["Logs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"runId","in":"path","required":true,"description":"Unique workflow run identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier."}},{"name":"includeWorkflowState","in":"query","required":false,"description":"Include the saved workflow snapshot (default: true). Set false to omit block configuration from a log read. Other run fields are unchanged.","schema":{"description":"Include the saved workflow snapshot (default: true). Set false to omit block configuration from a log read. Other run fields are unchanged.","type":"boolean"}}],"responses":{"200":{"description":"The requested diagnostic log representation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Logs_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Logs_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Logs_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2LogDetailResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"runId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deploymentVersionId":"dep_2c4e6a8b0d1f","status":"completed","level":"info","trigger":"api","startedAt":"2026-01-15T10:30:00.000Z","endedAt":"2026-01-15T10:30:01.250Z","totalDurationMs":1250,"files":[{"id":"f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04","name":"summary.pdf","size":18422,"type":"application/pdf","downloadPath":"/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13/files/f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04"}],"executedByEmail":"billing@example.com","workflow":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer Support Agent","description":"Routes incoming support tickets and drafts responses","folderPath":"/","ownerEmail":"jane@example.com","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","createdAt":"2025-01-10T09:00:00.000Z","updatedAt":"2025-06-18T16:45:00.000Z","deleted":false},"workflowState":{"blocks":{},"edges":[]},"traceSpans":[],"finalOutput":{"result":"Hello, world!"},"cost":{"total":0.0072,"items":[{"category":"fixed","description":"Base execution charge","cost":0.005},{"category":"model","description":"gpt-5","cost":0.0022,"inputTokens":1840,"outputTokens":260}]},"workflowInput":{"ticketId":"T-4821"},"createdAt":"2026-01-15T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Logs_BadRequest"},"401":{"$ref":"#/components/responses/Logs_Unauthorized"},"403":{"$ref":"#/components/responses/Logs_Forbidden"},"404":{"$ref":"#/components/responses/Logs_NotFound"},"413":{"$ref":"#/components/responses/Logs_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Logs_RateLimited"},"500":{"$ref":"#/components/responses/Logs_InternalError"},"503":{"$ref":"#/components/responses/Logs_ServiceUnavailable"}}}},"/api/v2/logs/stats":{"get":{"operationId":"getLogStats","summary":"Get log statistics","description":"Get bucketed run counts, success rate, errors, and mean latency for the workspace and individual workflows. Query fields describe window selection and bucketing. Folder filters cover subtrees. Expired runs are permanently deleted by retention cleanup. Sim Cloud Free defaults to 30 days from run start; paid plans and billing-disabled deployments have no default expiry. Organization policies and workspace overrides can set an effective window. Billing-disabled cleanup requires enabled data retention. Runs referenced by active pauses are protected from cleanup. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"logs.read_stats","x-oauth-scope":"api:read","tags":["Logs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose execution statistics to summarize.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose execution statistics to summarize."}},{"name":"workflowIds","in":"query","required":false,"description":"Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected.","schema":{"type":"string","description":"Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected."}},{"name":"folderPaths","in":"query","required":false,"description":"Comma-separated workflow folder paths, including descendants. Up to 100 paths. Unknown folder paths contribute no matches.","schema":{"type":"string","description":"Comma-separated workflow folder paths, including descendants. Up to 100 paths. Unknown folder paths contribute no matches."}},{"name":"triggers","in":"query","required":false,"description":"Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal `all` disables this filter.","schema":{"type":"string","description":"Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal `all` disables this filter."}},{"name":"level","in":"query","required":false,"description":"Severity level to include.","schema":{"type":"string","enum":["info","error"],"description":"Severity level to include."}},{"name":"includeHandledErrors","in":"query","required":false,"description":"Whether runs with a handled block error are counted as `handledErrorRuns`, and whether `level=error` also selects them. Off by default: counting them scans each run’s stored trace.","schema":{"description":"Whether runs with a handled block error are counted as `handledErrorRuns`, and whether `level=error` also selects them. Off by default: counting them scans each run’s stored trace.","type":"boolean"}},{"name":"startDate","in":"query","required":false,"description":"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."}},{"name":"endDate","in":"query","required":false,"description":"Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."}},{"name":"segmentCount","in":"query","required":false,"description":"Number of equal time buckets to divide the window into, from 1 to 500. It is the ceiling on how many buckets a series carries: with `includeEmpty=true` exactly this many are returned, otherwise only the buckets holding at least one run. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.","schema":{"default":72,"description":"Number of equal time buckets to divide the window into, from 1 to 500. It is the ceiling on how many buckets a series carries: with `includeEmpty=true` exactly this many are returned, otherwise only the buckets holding at least one run. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.","type":"integer","minimum":1,"maximum":500}},{"name":"includeEmpty","in":"query","required":false,"description":"Whether buckets with no runs are included in every series. Off by default, so each series carries only the buckets that hold at least one run; set it to publish exactly `segmentCount` buckets per series, empty ones included. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected.","schema":{"default":"false","description":"Whether buckets with no runs are included in every series. Off by default, so each series carries only the buckets that hold at least one run; set it to publish exactly `segmentCount` buckets per series, empty ones included. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"type":"string"}}],"responses":{"200":{"description":"Bucketed execution statistics for the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Logs_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Logs_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Logs_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2LogStatsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"workflows":[{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workflowName":"Customer Support Agent","segments":[{"timestamp":"2026-01-15T10:00:00.000Z","totalExecutions":40,"successfulExecutions":38,"avgDurationMs":1180}],"totalExecutions":40,"totalSuccessful":38,"overallSuccessRate":95}],"workflowsTruncated":false,"aggregateSegments":[{"timestamp":"2026-01-15T10:00:00.000Z","totalExecutions":40,"successfulExecutions":38,"avgDurationMs":1180}],"totalRuns":40,"totalErrors":2,"avgLatency":1180,"timeBounds":{"start":"2026-01-15T10:00:00.000Z","end":"2026-01-15T22:00:00.000Z"},"segmentMs":600000}}}}}}},"400":{"$ref":"#/components/responses/Logs_BadRequest"},"401":{"$ref":"#/components/responses/Logs_Unauthorized"},"403":{"$ref":"#/components/responses/Logs_Forbidden"},"404":{"$ref":"#/components/responses/Logs_NotFound"},"413":{"$ref":"#/components/responses/Logs_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Logs_RateLimited"},"500":{"$ref":"#/components/responses/Logs_InternalError"},"503":{"$ref":"#/components/responses/Logs_ServiceUnavailable"}}}},"/api/v2/files":{"get":{"operationId":"listFiles","summary":"List files","description":"List active workspace files with folder filtering, search, sorting, and cursor pagination. Use `scope=archived` to find files available for restoration. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.list","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose files should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose files should be listed."}},{"name":"folderPath","in":"query","required":false,"description":"Restrict files to this folder, including subfolders when `recursive` is true. Unknown folder paths contribute no matches.","schema":{"description":"Restrict files to this folder, including subfolders when `recursive` is true. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/FilesAudit_FolderPathInput"}},{"name":"recursive","in":"query","required":false,"description":"Include subfolders in the folder filter. Defaults to true when searching and false otherwise. Ignored without a folder filter.","schema":{"description":"Include subfolders in the folder filter. Defaults to true when searching and false otherwise. Ignored without a folder filter.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"type":"string"}},{"name":"scope","in":"query","required":false,"description":"Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.","schema":{"default":"active","description":"Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.","type":"string","enum":["active","archived"]}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the file name.","schema":{"description":"Case-insensitive substring match against the file name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"uploadedAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","size","uploadedAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum files per page. Values outside 1–1000 are truncated and clamped into that range rather than rejected. Defaults to 100.","schema":{"description":"Maximum files per page. Values outside 1–1000 are truncated and clamped into that range rather than rejected. Defaults to 100.","type":"integer","default":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of workspace files.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"post":{"operationId":"createFile","summary":"Create file","description":"Create a workspace file from inline UTF-8 or base64 content. Use an upload session for streamed or larger files.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.create","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Inline content and placement for a new workspace file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_CreateFileRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"notes.md","content":"# Notes"}}}}}},"responses":{"201":{"description":"The created file.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2CreatedFileResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/uploads":{"post":{"operationId":"createFileUpload","summary":"Create file upload","description":"Create a resumable upload session and receive either a signed PUT URL or multipart instructions.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.upload.create","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"File metadata required to create an upload session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_CreateFileUploadRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"archive.zip","contentType":"application/zip","size":1048576}}}}}},"responses":{"201":{"description":"The created upload session and transfer instructions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_CreateFileUploadResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/uploads/{uploadId}":{"get":{"operationId":"getFileUpload","summary":"Get file upload","description":"Get an upload session's state to determine whether an interrupted transfer can resume. Requires the signed upload token and current workspace access.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.upload.read","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier.","schema":{"type":"string","minLength":1,"description":"Upload session identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the upload session.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the upload session."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"responses":{"200":{"description":"Current upload-session state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileUploadResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"delete":{"operationId":"abortFileUpload","summary":"Abort file upload","description":"Abort an incomplete upload session and discard its uploaded data. Completed uploads cannot be aborted.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.upload.cancel","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier.","schema":{"type":"string","minLength":1,"description":"Upload session identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the upload session.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the upload session."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"responses":{"200":{"description":"The aborted upload session.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileUploadResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/uploads/{uploadId}/parts":{"post":{"operationId":"createFileUploadPartUrls","summary":"Create file upload part URLs","description":"Create signed URLs for a bounded set of multipart upload part numbers.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.upload.parts","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier.","schema":{"type":"string","minLength":1,"description":"Upload session identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the upload session.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the upload session."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"requestBody":{"required":true,"description":"Multipart part numbers requiring signed URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_CreateFileUploadPartUrlsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"partNumbers":[1,2]}}}}}},"responses":{"200":{"description":"Signed URLs for the requested upload parts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_CreateFileUploadPartUrlsResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/uploads/{uploadId}/complete":{"post":{"operationId":"completeFileUpload","summary":"Complete file upload","description":"Finalize an upload and register its workspace file. Repeating a completed upload returns the existing file.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.upload.complete","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier.","schema":{"type":"string","minLength":1,"description":"Upload session identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the upload session.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the upload session."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"responses":{"200":{"description":"The completed or finalizing upload session.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileUploadResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/text":{"get":{"operationId":"readFileText","summary":"Read file text","description":"Extract text without changing the file. Accepts its ID or canonical path (`files/<folder>/<name>` or `uploads/<name>` for an unlisted chat upload); the response echoes the read path. Use Unzip file to unpack archives or Download file for original bytes. Unsupported types return `400`, compiling documents return `409`, and oversized files return `413`. `degraded: true` indicates incomplete or synthesized text, such as the legacy `.pptx` fallback; `truncated: true` indicates a parser limit.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.read_content","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier, or the file’s VFS path: `files/<folder>/<name>`, or `uploads/<name>` for a Chat upload.","schema":{"type":"string","minLength":1,"maxLength":4096,"description":"File identifier, or the file’s VFS path: `files/<folder>/<name>`, or `uploads/<name>` for a Chat upload."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}},{"name":"maxBytes","in":"query","required":false,"description":"Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.","schema":{"description":"Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.","type":"integer","minimum":1,"maximum":26214400}},{"name":"offset","in":"query","required":false,"description":"First line to return, 1-based; 0 also starts at the first line. Absent starts at the first line.","schema":{"description":"First line to return, 1-based; 0 also starts at the first line. Absent starts at the first line.","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"description":"How many lines to return from `offset`. Absent reads to the end.","schema":{"description":"How many lines to return from `offset`. Absent reads to the end.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"The extracted text and its extraction-quality flags.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileTextResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/versions":{"get":{"operationId":"listFileVersions","summary":"List file versions","description":"List the versions of a file, newest first by default. Each write that changes the bytes records one; identical rewrites do not. Collaborative edits, and repeated workflow writes by one author, fold into a version under ten minutes old and written in the last five. Renames and moves are not versions. Retention removes older versions by age and plan but keeps the newest ten, so numbers can have gaps.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.versions.list","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"version","description":"Field used to sort the result.","type":"string","enum":["version"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum versions to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum versions to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of file versions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileVersionListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":3,"isCurrent":true,"size":1024,"contentType":"text/csv","source":"api","authors":[{"id":"usr_4kJ9mN2pQ7rS","email":"jane@example.com"}],"restoredFromVersion":null,"createdAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","supersededAt":null}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/versions/{version}":{"get":{"operationId":"getFileVersion","summary":"Get file version","description":"Get one version of a file. A version removed by retention, or one that never existed, returns `404`.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.versions.read","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"version","in":"path","required":true,"description":"Version number.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Version number."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}}],"responses":{"200":{"description":"The file version.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileVersionResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":3,"isCurrent":true,"size":1024,"contentType":"text/csv","source":"api","authors":[{"id":"usr_4kJ9mN2pQ7rS","email":"jane@example.com"}],"restoredFromVersion":null,"createdAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","supersededAt":null}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"delete":{"operationId":"deleteFileVersion","summary":"Delete file version","description":"Permanently remove an earlier version from history and schedule deletion of its stored content. Storage cleanup may retry in the background. The current version returns `409`; revert to another version first. A version that does not exist returns `404`.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.versions.delete","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"version","in":"path","required":true,"description":"Version number.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Version number."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}}],"responses":{"200":{"description":"Deletion confirmation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileVersionDeleteResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":2,"deleted":true}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/versions/{version}/text":{"get":{"operationId":"readFileVersionText","summary":"Read file version text","description":"Extract the text of one version, exactly as Read file text extracts the current content. Unsupported types return `400`, compiling documents return `409`, and oversized versions return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.versions.read_content","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"version","in":"path","required":true,"description":"Version number.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Version number."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}},{"name":"maxBytes","in":"query","required":false,"description":"Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.","schema":{"description":"Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.","type":"integer","minimum":1,"maximum":26214400}},{"name":"offset","in":"query","required":false,"description":"First line to return, 1-based; 0 also starts at the first line. Absent starts at the first line.","schema":{"description":"First line to return, 1-based; 0 also starts at the first line. Absent starts at the first line.","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"description":"How many lines to return from `offset`. Absent reads to the end.","schema":{"description":"How many lines to return from `offset`. Absent reads to the end.","type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"The extracted text of the version and its extraction-quality flags.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileVersionTextResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/versions/{version}/content":{"get":{"operationId":"downloadFileVersion","summary":"Download file version","description":"Download the bytes of one version, served exactly as Download file serves the current bytes. Generated documents use compiled artifacts, returning `409` while compiling and `413` above the rendered-size ceiling. Downloading records an audit event. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. `HEAD` omits `Content-Length` and cannot determine the download size.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.versions.download","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"version","in":"path","required":true,"description":"Version number.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Version number."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}}],"responses":{"200":{"description":"The version bytes.","headers":{"Content-Type":{"$ref":"#/components/headers/FilesAudit_Content-Type"},"Content-Disposition":{"$ref":"#/components/headers/FilesAudit_Content-Disposition"},"Content-Length":{"$ref":"#/components/headers/FilesAudit_Content-Length"},"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/versions/{version}/revert":{"post":{"operationId":"revertFileVersion","summary":"Revert file version","description":"Make the content of a version current again by writing it as a new `revert` version, so the revert can itself be reverted. Open editors receive the change. Reverting to the current version writes nothing and returns `reverted: false`. A concurrent write, or an `expectedCurrentVersion` that is no longer current, returns `409`; a version above 100 MiB returns `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.versions.revert","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"version","in":"path","required":true,"description":"Version number.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Version number."}}],"requestBody":{"required":true,"description":"Workspace scope and an optional current-version precondition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_RevertFileVersionRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","expectedCurrentVersion":4}}}}}},"responses":{"200":{"description":"The file and its current version after the revert.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileVersionRevertResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"reverted":true,"file":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null},"version":{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":5,"isCurrent":true,"size":1024,"contentType":"text/csv","source":"revert","authors":[{"id":"usr_4kJ9mN2pQ7rS","email":"jane@example.com"}],"restoredFromVersion":3,"createdAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","supersededAt":null},"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg"}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/bulk-download":{"get":{"operationId":"bulkDownloadFiles","summary":"Bulk download files","description":"Stream selected files and recursive folder contents as a ZIP archive. Each selection parameter and the resolved set allow 100 entries; unmatched paths or excess entries return `400`. Total bytes are bounded. Downloads record an audit event. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. `HEAD` omits `Content-Length` and cannot determine the download size.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.download","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace containing the selection.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the selection."}},{"name":"fileIds","in":"query","required":false,"description":"File identifiers to include, comma-separated. At most 100 entries.","schema":{"description":"File identifiers to include, comma-separated. At most 100 entries.","type":"string"}},{"name":"folderPaths","in":"query","required":false,"description":"Comma-separated folder paths whose contents are included recursively. Up to 100 paths; resolved files share the 100-file download limit. Unknown paths are rejected.","schema":{"description":"Comma-separated folder paths whose contents are included recursively. Up to 100 paths; resolved files share the 100-file download limit. Unknown paths are rejected.","type":"string"}}],"responses":{"200":{"description":"The selected files as a zip archive.","headers":{"Content-Type":{"$ref":"#/components/headers/FilesAudit_Content-Type"},"Content-Disposition":{"$ref":"#/components/headers/FilesAudit_Content-Disposition"},"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/unzip":{"post":{"operationId":"unzipFile","summary":"Unzip file","description":"Extract a ZIP archive into a new sibling folder and return counts and the destination path. Use List files to inspect its contents. Large archives can take minutes; concurrent extraction of the same archive returns `409`. Size or processing-time limits return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.extract_archive","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}}],"requestBody":{"required":true,"description":"Workspace scope for the archive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_UnzipFileBody"}}}},"responses":{"200":{"description":"Counts and destination folder for the unpacked archive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileUnzipResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}":{"get":{"operationId":"downloadFile","summary":"Download file","description":"Download current file bytes. Generated documents use compiled artifacts, returning `409` while compiling and `413` above the rendered-size ceiling. Downloading records an audit event. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. `HEAD` omits `Content-Length` and cannot determine the download size.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.download","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}}],"responses":{"200":{"description":"The file bytes.","headers":{"Content-Type":{"$ref":"#/components/headers/FilesAudit_Content-Type"},"Content-Disposition":{"$ref":"#/components/headers/FilesAudit_Content-Disposition"},"Content-Length":{"$ref":"#/components/headers/FilesAudit_Content-Length"},"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"delete":{"operationId":"deleteFile","summary":"Delete file","description":"Archive a workspace file, retaining its stored bytes and removing API read access. List files with `scope=archived` finds it; Restore file recovers it. Archiving an already archived file returns `404`.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.delete","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}}],"responses":{"200":{"description":"Deletion confirmation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2DeleteFileResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"patch":{"operationId":"renameFile","summary":"Rename file","description":"Rename a workspace file without changing its containing folder.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.rename","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and new file name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_RenameFileRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"renamed.csv"}}}}}},"responses":{"200":{"description":"The renamed file.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/restore":{"post":{"operationId":"restoreFile","summary":"Restore file","description":"Restore a soft-deleted file to its original folder, or the workspace root if that folder was archived. Name collisions add a `_restored` suffix; read `folderPath` and `name` from the response. Already-active files return unchanged, making retries safe. An archived workspace returns `400`; an unresolved name collision returns `409`.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.restore","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}}],"requestBody":{"required":true,"description":"Workspace scope for the archived file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_RestoreFileRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}}}}}},"responses":{"200":{"description":"The file as it exists after the restore.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2RestoreFileResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data_restored.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/metadata":{"get":{"operationId":"getFile","summary":"Get file metadata","description":"Get file metadata, its public-share configuration, and the version number of its current content. The `share` field is null when the file has never been shared. `currentVersion` identifies the content in List file versions and is the precondition Revert file version accepts.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.read_metadata","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}},{"name":"scope","in":"query","required":false,"description":"Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file a delete soft-deleted; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both.","schema":{"default":"active","description":"Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file a delete soft-deleted; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both.","type":"string","enum":["active","archived"]}}],"responses":{"200":{"description":"File metadata and public-share state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileMetadataResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null,"share":null,"currentVersion":1,"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg"}}},"example2":{"summary":"Response example 2","value":{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-16T09:12:00Z","deletedAt":null,"share":{"id":"shr_8Hf3kL9wQ2mNpXr6Tz1Vb","token":"share-token-example","url":"https://www.sim.ai/f/share-token-example","isActive":true,"resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","authType":"public","hasPassword":false,"allowedEmails":[]},"currentVersion":3,"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTZUMDk6MTI6MDAuMDAwWg"}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/audit-logs":{"get":{"operationId":"listAuditLogs","summary":"List audit logs","description":"List an organization audit trail with filters and opaque cursor pagination. Requires an Enterprise subscription and organization admin or owner access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"audit_logs.list","x-oauth-scope":"api:read","tags":["Audit Logs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"action","in":"query","required":false,"description":"Filter by exact action name.","schema":{"description":"Filter by exact action name.","type":"string"}},{"name":"resourceType","in":"query","required":false,"description":"Filter by resource type. Accepts a comma-separated set; members are trimmed and deduplicated, and member order affects neither the result nor the cursor.","schema":{"description":"Filter by resource type. Accepts a comma-separated set; members are trimmed and deduplicated, and member order affects neither the result nor the cursor.","type":"string"}},{"name":"resourceId","in":"query","required":false,"description":"Filter by exact resource identifier.","schema":{"description":"Filter by exact resource identifier.","type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Filter to actions in one workspace.","schema":{"description":"Filter to actions in one workspace.","type":"string","minLength":1,"maxLength":128}},{"name":"startDate","in":"query","required":false,"description":"Include audit entries created at or after this UTC ISO 8601 timestamp, such as `2026-08-06T00:00:00Z`. Dates without a time, timestamps with an offset instead of `Z`, and year `0000` are rejected.","schema":{"description":"Include audit entries created at or after this UTC ISO 8601 timestamp, such as `2026-08-06T00:00:00Z`. Dates without a time, timestamps with an offset instead of `Z`, and year `0000` are rejected.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"endDate","in":"query","required":false,"description":"Include audit entries created at or before this UTC ISO 8601 timestamp, such as `2026-08-06T00:00:00Z`. Dates without a time, timestamps with an offset instead of `Z`, and year `0000` are rejected.","schema":{"description":"Include audit entries created at or before this UTC ISO 8601 timestamp, such as `2026-08-06T00:00:00Z`. Dates without a time, timestamps with an offset instead of `Z`, and year `0000` are rejected.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"includeDeparted","in":"query","required":false,"description":"Include actions by users who have left the organization.","schema":{"description":"Include actions by users who have left the organization.","type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum audit entries to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum audit entries to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"organizationId","in":"query","required":false,"description":"Organization whose audit trail should be queried. Defaults to the caller's own organization when omitted. A caller that belongs to no organization, or that names one it is not a member of, is refused with a 403.","schema":{"description":"Organization whose audit trail should be queried. Defaults to the caller's own organization when omitted. A caller that belongs to no organization, or that names one it is not a member of, is refused with a 403.","type":"string","minLength":1}},{"name":"actorEmail","in":"query","required":false,"description":"Filter by actor email address.","schema":{"description":"Filter by actor email address.","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}],"responses":{"200":{"description":"A page of audit-log entries.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2AuditLogListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"audit_2c3d4e5f6g","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","actorName":"Jane Smith","actorEmail":"jane@example.com","action":"file.uploaded","resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","resourceName":"data.csv","description":"Uploaded file \"data.csv\" via API","metadata":{"fileSize":1024,"fileType":"text/csv"},"createdAt":"2026-01-15T10:30:00Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/audit-logs/{auditLogId}":{"get":{"operationId":"getAuditLog","summary":"Get audit log","description":"Get one organization audit-log entry. Requires an Enterprise subscription and organization admin or owner access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"audit_logs.read_detail","x-oauth-scope":"api:read","tags":["Audit Logs"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"auditLogId","in":"path","required":true,"description":"Audit-log entry identifier.","schema":{"type":"string","minLength":1,"description":"Audit-log entry identifier."}},{"name":"organizationId","in":"query","required":false,"description":"Organization whose audit-log entry should be returned. Defaults to the caller's own organization when omitted. A caller that belongs to no organization, or that names one it is not a member of, is refused with a 403.","schema":{"description":"Organization whose audit-log entry should be returned. Defaults to the caller's own organization when omitted. A caller that belongs to no organization, or that names one it is not a member of, is refused with a 403.","type":"string","minLength":1}}],"responses":{"200":{"description":"The requested audit-log entry.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2AuditLogResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"audit_2c3d4e5f6g","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","actorName":"Jane Smith","actorEmail":"jane@example.com","action":"file.uploaded","resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","resourceName":"data.csv","description":"Uploaded file \"data.csv\" via API","metadata":{"fileSize":1024,"fileType":"text/csv"},"createdAt":"2026-01-15T10:30:00Z"}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/move":{"post":{"operationId":"moveFileItems","summary":"Move files","description":"Move up to 1,000 files to a folder path or the workspace root.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.move","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Files and destination selected for a bulk move.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_MoveFileItemsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","fileIds":["wf_V1StGXR8z5jdHi6BmyT91"],"targetFolderPath":"/Archive"}}}}}},"responses":{"200":{"description":"Count of moved files.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2MoveFileItemsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"movedItems":{"files":1}}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/share":{"get":{"operationId":"getFileShare","summary":"Get file share","description":"Get a file's public-share configuration. An unshared file returns `data: null`; a disabled share returns its configuration with `isActive: false`.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.share.read","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the file.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."}}],"responses":{"200":{"description":"Current nullable file-share state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2GetFileShareResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"shr_8Hf3kL9wQ2mNpXr6Tz1Vb","token":"share-token-example","url":"https://www.sim.ai/f/share-token-example","isActive":true,"resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","authType":"public","hasPassword":false,"allowedEmails":[]}}},"example2":{"summary":"Response example 2","value":{"data":null}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"patch":{"operationId":"upsertFileShare","summary":"Enable or disable file share","description":"Create or update a file's public share. `isActive` is required; other fields describe their behavior when access modes change. Enabling a protected mode on a previously unshared file requires its credential in the same request. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.share.update","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}}],"requestBody":{"required":true,"description":"Desired public-share state and access policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_UpsertFileShareRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isActive":true,"authType":"public"}},"example2":{"summary":"Request example 2","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isActive":false}}}}}},"responses":{"200":{"description":"The updated file share.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2UpsertFileShareResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"shr_8Hf3kL9wQ2mNpXr6Tz1Vb","token":"share-token-example","url":"https://www.sim.ai/f/share-token-example","isActive":true,"resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","authType":"public","hasPassword":false,"allowedEmails":[]}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/{fileId}/content":{"patch":{"operationId":"editFileContent","summary":"Edit file content","description":"Edit part of a UTF-8 file; use Replace file content to replace it entirely. Search-and-replace requires one exact match unless `replaceAll` is true. Anchored modes match trimmed complete lines; their input descriptions specify boundary handling. Non-UTF-8 files return `400`. Concurrent writes return `409`; re-read before retrying.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.update_content","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the change to apply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_EditFileContentRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","edit":{"mode":"search_replace","search":"- based in NYC","content":"- based in SF"}}},"example2":{"summary":"Request example 2","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","edit":{"mode":"insert_after","anchor":"## Preferences","content":"- prefers async updates"}}}}}}},"responses":{"200":{"description":"The edited file and its new line count.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2EditedFileResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"file":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null},"lineCount":5}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/FilesAudit_Locked"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"put":{"operationId":"updateFileContent","summary":"Replace file content","description":"Replace the complete contents of an existing file from UTF-8 or base64 input. A stale `expectedRevision`, or a write that raced this one, returns `409`; re-read before retrying.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.update_content","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"File identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and complete replacement content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_UpdateFileContentRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","content":"replacement text"}}}}}},"responses":{"200":{"description":"The updated file.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2WrittenFileResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null,"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg"}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/search":{"get":{"operationId":"searchFileContent","summary":"Search file content","description":"Search indexed text in active workspace files and return matching lines with file IDs and line numbers. `folderPaths` limits both results and reported coverage. Missing matches are inconclusive if `complete` is false or `indexStatus.skippedFiles` or `indexStatus.partialFiles` is nonzero. `truncated` means additional matches exist beyond `maxResults`.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.search_content","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace to search.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace to search."}},{"name":"query","in":"query","required":true,"description":"Regular expression, or exact text when `mode` is `exact`.","schema":{"type":"string","description":"Regular expression, or exact text when `mode` is `exact`.","minLength":3,"maxLength":512}},{"name":"mode","in":"query","required":false,"description":"How `query` is read.","schema":{"default":"regex","description":"How `query` is read.","type":"string","enum":["exact","regex"]}},{"name":"maxResults","in":"query","required":false,"description":"Maximum matching lines to return.","schema":{"default":50,"description":"Maximum matching lines to return.","type":"integer","minimum":1,"maximum":200}},{"name":"folderPaths","in":"query","required":false,"description":"Folders the search is confined to, comma-separated. Absent searches the whole workspace. The scope also narrows `indexStatus`, so `complete` describes the folders searched rather than the workspace.","schema":{"description":"Folders the search is confined to, comma-separated. Absent searches the whole workspace. The scope also narrows `indexStatus`, so `complete` describes the folders searched rather than the workspace.","type":"string"}},{"name":"includeSubfolders","in":"query","required":false,"description":"Whether the scope descends into nested folders. Absent means yes. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected.","schema":{"description":"Whether the scope descends into nested folders. Absent means yes. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"type":"string"}}],"responses":{"200":{"description":"Matching lines and the index coverage they were drawn from.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2FileSearchResultsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"results":[{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","lineNumber":4,"text":"- based in NYC"}],"count":1,"truncated":false,"complete":true,"indexStatus":{"readyFiles":12,"pendingFiles":0,"failedFiles":0,"skippedFiles":0,"partialFiles":0}}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"423":{"$ref":"#/components/responses/FilesAudit_Locked"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/bulk-delete":{"post":{"operationId":"bulkDeleteFiles","summary":"Delete files","description":"Archive up to 1,000 workspace files while retaining their stored bytes. Use Restore file to recover each file.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.delete","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace and files selected for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_BulkDeleteFilesRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","fileIds":["wf_V1StGXR8z5jdHi6BmyT91"]}}}}}},"responses":{"200":{"description":"Count of deleted files.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_BulkDeleteFilesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"deletedItems":{"files":1}}}}}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/folders":{"get":{"operationId":"listFilesFolders","summary":"List folders","description":"List workspace file folders with parent-path filtering and sorting. Use `scope=archived` to find paths accepted by Restore folder. Returns one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"files.folders.list","x-oauth-scope":"api:read","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose folders should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose folders should be listed."}},{"name":"parentPath","in":"query","required":false,"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/FilesAudit_FolderPathInput"}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the folder name.","schema":{"description":"Case-insensitive substring match against the folder name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"scope","in":"query","required":false,"description":"Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.","schema":{"default":"active","description":"Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.","type":"string","enum":["active","archived"]}},{"name":"recursive","in":"query","required":false,"description":"Whether parentPath includes every descendant instead of direct children only.","schema":{"description":"Whether parentPath includes every descendant instead of direct children only.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"type":"string"}},{"name":"depth","in":"query","required":false,"description":"Deepest level below parentPath to include when recursive is true.","schema":{"description":"Deepest level below parentPath to include when recursive is true.","type":"integer","minimum":1,"maximum":64}}],"responses":{"200":{"description":"Workspace file folders.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileFolderListResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"post":{"operationId":"createFilesFolder","summary":"Create folder","description":"Create a folder at the supplied workspace path.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.folders.create","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace and canonical path for a new folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_CreateFileFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Engineering"}}}}}},"responses":{"201":{"description":"The created folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileFolderResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"patch":{"operationId":"relocateFilesFolder","summary":"Rename or move folder","description":"Rename or move a folder and atomically update all descendant paths.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.folders.update","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Current and destination canonical paths for a folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_RelocateFileFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Engineering","destinationPath":"/Archive/Engineering"}}}}}},"responses":{"200":{"description":"The relocated folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileFolderResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}},"delete":{"operationId":"deleteFilesFolder","summary":"Delete folder","description":"Archive an empty folder, or set `recursive=true` to archive its files and subfolders. Use Restore folder to recover the archived contents.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.folders.delete","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace containing the folder.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."}},{"name":"path","in":"query","required":true,"description":"Path of the folder to delete.","schema":{"description":"Path of the folder to delete.","$ref":"#/components/schemas/FilesAudit_NonRootFolderPathInput"}},{"name":"recursive","in":"query","required":false,"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","schema":{"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"default":"false","type":"string"}}],"responses":{"200":{"description":"Folder deletion confirmation and deleted item counts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_DeleteFileFolderResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/files/folders/restore":{"post":{"operationId":"restoreFilesFolder","summary":"Restore folder","description":"Restore a folder and the files and subfolders archived with it. Use the path from List folders with `scope=archived`. A path that is not archived returns `404`.\n\nOAuth scope: `api:write`.","x-sim-operation":"files.folders.restore","x-oauth-scope":"api:write","tags":["Files"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace scope and archived folder path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_RestoreFileFolderRequest"}}}},"responses":{"200":{"description":"The restored folder and what it brought back.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/FilesAudit_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_FileFolderRestoreResponse"}}}},"400":{"$ref":"#/components/responses/FilesAudit_BadRequest"},"401":{"$ref":"#/components/responses/FilesAudit_Unauthorized"},"403":{"$ref":"#/components/responses/FilesAudit_Forbidden"},"404":{"$ref":"#/components/responses/FilesAudit_NotFound"},"409":{"$ref":"#/components/responses/FilesAudit_Conflict"},"413":{"$ref":"#/components/responses/FilesAudit_PayloadTooLarge"},"415":{"$ref":"#/components/responses/FilesAudit_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/FilesAudit_RateLimited"},"500":{"$ref":"#/components/responses/FilesAudit_InternalError"},"503":{"$ref":"#/components/responses/FilesAudit_ServiceUnavailable"}}}},"/api/v2/tables":{"get":{"operationId":"listTables","summary":"List tables","description":"List active tables with folder filtering, search, sorting, and cursor pagination. Use `scope=archived` to find tables available for restoration. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.list","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose tables should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose tables should be listed."}},{"name":"scope","in":"query","required":false,"description":"Which lifecycle set to list: `active` (default) for live tables, `archived` for tables a delete archived and a table restore can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.","schema":{"default":"active","description":"Which lifecycle set to list: `active` (default) for live tables, `archived` for tables a delete archived and a table restore can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.","type":"string","enum":["active","archived"]}},{"name":"folderPath","in":"query","required":false,"description":"Restrict results to tables in this folder. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to tables in this folder. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/Tables_FolderPathInput"}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the resource name.","schema":{"description":"Case-insensitive substring match against the resource name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum tables to return per page. Values outside 1–1000 are truncated and clamped into that range rather than rejected. Defaults to 100.","schema":{"description":"Maximum tables to return per page. Values outside 1–1000 are truncated and clamped into that range rather than rejected. Defaults to 100.","type":"integer","default":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of tables in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableListResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"post":{"operationId":"createTable","summary":"Create table","description":"Create a table with a typed column schema and optional folder placement.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace, table metadata, folder placement, and typed columns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Customers","description":"Customer accounts and lifecycle state.","schema":{"columns":[{"name":"email","type":"string","unique":true},{"name":"status","type":"string"}]}}}}}}},"responses":{"201":{"description":"The created table.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}":{"get":{"operationId":"getTable","summary":"Get table","description":"Get a table with its metadata, column schema, locks, and current job. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The requested table.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTable","summary":"Delete table","description":"Archive a table while retaining its rows. Use List tables with `scope=archived` to find it and Restore table to recover it.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"Table deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DeleteTableResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"updateTable","summary":"Update table","description":"Rename a table, edit its description, or move it to a folder. Fields are saved independently: a failed request may leave partial changes. `error.details.applied` lists saved fields; retry only the remaining fields. If absent, nothing changed. Lock flags are read-only. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.update","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and one or more table metadata or placement changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpdateTableRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"EnterpriseCustomers","folderPath":"/Sales"}}}}}},"responses":{"200":{"description":"The updated table.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2UpdateTableResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/columns":{"post":{"operationId":"addTableColumn","summary":"Add column","description":"Add a typed column and return the complete resulting table schema.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.columns.add","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the typed column to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_AddTableColumnRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","column":{"name":"plan","type":"string"}}}}}}},"responses":{"201":{"description":"The updated table columns.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableColumnsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"updateTableColumn","summary":"Update column","description":"Update a column by name and return the complete schema. Renames update rows, views, and workflow-group references keyed by column ID. Workflow Table blocks keep their authored `filter`, `order`, and `data` JSON unchanged. Bound blocks still referencing the old name appear in `unmigrated`; edit them with Apply Workflow Operations to prevent failures on their next run.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.columns.update","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, current column name, and fields to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpdateTableColumnRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","columnName":"plan","updates":{"name":"subscriptionPlan"}}}}}}},"responses":{"200":{"description":"The updated table columns, plus any unmigrated workflow Table blocks.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2UpdateTableColumnResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"columns":[{"id":"col_name","name":"name","type":"string","required":true,"unique":false},{"id":"col_plan","name":"subscriptionPlan","type":"string","required":false,"unique":false}],"unmigrated":[{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workflowName":"Weekly digest","blockId":"blk_9c1d3f5a7e2b4068a0c2e4f6b8d0f193","blockName":"Query plans","fields":["filter"]}]}}}}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTableColumn","summary":"Delete column","description":"Delete a column by name while preserving at least one table column.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.columns.delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and column name to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_DeleteTableColumnRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","columnName":"legacyStatus"}}}}}},"responses":{"200":{"description":"The surviving table columns.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableColumnsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/rows":{"get":{"operationId":"listTableRows","summary":"List rows","description":"List rows in default order with cursor pagination. Pages default to a 5 MiB limit and may contain fewer rows than requested; continue until `nextCursor` is null. Use Query rows for filtering and sorting. `includeRunState=true` adds per-group run outcomes and reduces the row limit.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.rows.list","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the table."}},{"name":"limit","in":"query","required":false,"description":"Maximum rows to return per page. Must be a whole number from 1 to 1000. Defaults to 100.","schema":{"default":100,"description":"Maximum rows to return per page. Must be a whole number from 1 to 1000. Defaults to 100.","type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"includeRunState","in":"query","required":false,"description":"Include per-workflow-group run outcomes on every row. Off by default. Caps `limit` at 200. Run state above 2 MiB returns `413`; request fewer rows or omit run state.","schema":{"description":"Include per-workflow-group run outcomes on every row. Off by default. Caps `limit` at 200. Run state above 2 MiB returns `413`; request fewer rows or omit run state.","type":"boolean"}}],"responses":{"200":{"description":"A page of table rows.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableRowListResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"post":{"operationId":"createTableRows","summary":"Create rows","description":"Insert one row with a data object or insert a bounded batch with a rows array. Cell keys are column names.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"A single row or bounded row batch keyed by column name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","data":{"email":"jane@example.com","status":"active"}}}}}}},"responses":{"201":{"description":"The inserted row or rows.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"updateTableRows","summary":"Update rows by filter","description":"Apply the same partial data patch to every row matching a non-empty predicate.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.update_many","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, typed predicate, and row-data patch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpdateTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","filter":{"all":[{"field":"status","op":"eq","value":"trial"}]},"data":{"status":"active"}}}}}}},"responses":{"200":{"description":"The bulk update result.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2UpdateTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTableRows","summary":"Delete rows","description":"Delete rows by a non-empty predicate or an explicit bounded list of row identifiers.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.delete_many","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and exactly one of a predicate or row identifier list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_DeleteTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","rowIds":["row_1f3e5d7c9b8a4c2d806e4a6b8d0f2e93"]}}}}}},"responses":{"200":{"description":"The bulk deletion result.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DeleteTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/rows/{rowId}":{"get":{"operationId":"getTableRow","summary":"Get row","description":"Get one row by identifier. Set `includeRunState=true` to attach the row's per-workflow-group run outcomes.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.rows.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"rowId","in":"path","required":true,"description":"Unique table row identifier.","schema":{"type":"string","minLength":1,"description":"Unique table row identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}},{"name":"includeRunState","in":"query","required":false,"description":"Include per-workflow-group run outcomes on the row. Off by default. Run state above 2 MiB returns `413`; omit this option to read the row without run state.","schema":{"description":"Include per-workflow-group run outcomes on the row. Off by default. Run state above 2 MiB returns `413`; omit this option to read the row without run state.","type":"boolean"}}],"responses":{"200":{"description":"The requested table row.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableRowResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"updateTableRow","summary":"Update row","description":"Merge a partial data patch into one row by identifier.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.update","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"rowId","in":"path","required":true,"description":"Unique table row identifier.","schema":{"type":"string","minLength":1,"description":"Unique table row identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and row-data patch keyed by column name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpdateTableRowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","data":{"status":"active"}}}}}}},"responses":{"200":{"description":"The updated table row.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableRowResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTableRow","summary":"Delete row","description":"Delete one row by identifier.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"rowId","in":"path","required":true,"description":"Unique table row identifier.","schema":{"type":"string","minLength":1,"description":"Unique table row identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The row deletion result.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DeleteTableRowResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/rows/upsert":{"post":{"operationId":"upsertTableRow","summary":"Upsert row","description":"Insert a row or replace the row matching a selected unique column. On replacement, omitted columns are cleared; send the complete row. Use Update row for a partial patch.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.upsert","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, row data, and optional unique-column conflict target.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpsertTableRowRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","data":{"email":"jane@example.com","status":"active"},"conflictTarget":"email"}}}}}},"responses":{"200":{"description":"The upserted row and operation performed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2UpsertTableRowResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/query":{"post":{"operationId":"queryTableRows","summary":"Query rows","description":"Query rows with typed predicates, sorting, and cursor pagination. Omit the predicate to match all rows. Pages default to a 5 MiB limit; continue until `nextCursor` is null. Oversized predicates return `413`. `includeRunState` adds per-group outcomes and reduces the row limit. Counts are read separately and can differ from paged results if rows change.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.rows.query","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, optional predicate and sort, and cursor pagination controls. The predicate may be one condition or an `all`/`any` group; omitting it matches every row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_QueryTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","limit":100}},"example2":{"summary":"Request example 2","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","predicate":{"field":"status","op":"eq","value":"active"},"sort":[{"field":"createdAt","direction":"desc"}],"limit":100}},"example3":{"summary":"Request example 3","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","predicate":{"all":[{"field":"status","op":"eq","value":"active"},{"field":"score","op":"gte","value":80}]}}}}}}},"responses":{"200":{"description":"A page of matching table rows.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2QueryTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/query/count":{"post":{"operationId":"countTableRows","summary":"Count rows","description":"Count rows matching a typed predicate, or omit the predicate to count all rows. The count is read separately from row pages and can change between requests. Oversized predicates return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.rows.query","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the optional condition or `all`/`any` predicate group whose matches are counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CountTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","predicate":{"field":"status","op":"eq","value":"active"}}}}}}},"responses":{"200":{"description":"The number of matching table rows.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CountTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/views":{"get":{"operationId":"listTableViews","summary":"List views","description":"List saved table views, omitting references to removed columns. Returns one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.views.list","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The saved table views.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableViewListResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"post":{"operationId":"createTableView","summary":"Create view","description":"Save a filter, sort, and column layout as a named presentation of a table.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.views.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, name, and saved filter, sort, and layout configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableViewRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Active customers","config":{"filter":{"all":[{"field":"status","op":"eq","value":"active"}]},"sort":[{"field":"createdAt","direction":"desc"}]}}}}}}},"responses":{"201":{"description":"The created table view.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableViewResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/views/{viewId}":{"get":{"operationId":"getTableView","summary":"Get view","description":"Get one saved table view by identifier.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.views.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"viewId","in":"path","required":true,"description":"Unique saved-view identifier.","schema":{"type":"string","minLength":1,"description":"Unique saved-view identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The requested table view.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableViewResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"updateTableView","summary":"Update view","description":"Rename a view, replace or shallow-merge its configuration, or promote it to the table default.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.views.update","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"viewId","in":"path","required":true,"description":"Unique saved-view identifier.","schema":{"type":"string","minLength":1,"description":"Unique saved-view identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and one or more saved-view changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpdateTableViewRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Priority customers","isDefault":true}}}}}},"responses":{"200":{"description":"The updated table view.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableViewResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTableView","summary":"Delete view","description":"Delete a saved presentation without changing any table rows.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.views.delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"viewId","in":"path","required":true,"description":"Unique saved-view identifier.","schema":{"type":"string","minLength":1,"description":"Unique saved-view identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"Table view deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DeleteTableViewResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/groups":{"get":{"operationId":"listTableWorkflowGroups","summary":"List workflow groups","description":"List the workflow and enrichment groups that can be dispatched for a table. Returns one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.groups.list","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The table workflow groups.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableWorkflowGroupListResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"post":{"operationId":"addTableWorkflowGroup","summary":"Add workflow group","description":"Bind a workflow or enrichment to the table and create the columns populated by its outputs. An output whose column the table already has attaches that column to the group instead of creating it, so `outputColumns` may be omitted when every output lands in an existing column.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.groups.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, producer definition, and output columns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_AddTableWorkflowGroupRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","group":{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Enrich company","outputs":[{"blockId":"block_lookup","path":"output.revenue","columnName":"revenue"}]},"outputColumns":[{"name":"revenue","type":"number"}]}}}}}},"responses":{"201":{"description":"The created workflow group and resulting columns.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2AddTableWorkflowGroupResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"updateTableWorkflowGroup","summary":"Update workflow group","description":"Restructure a workflow group, its producer, outputs, or execution behavior. Repointing the group at a different workflow concurrently invalidates the resolved output types and returns `409` — retry the update.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.groups.update","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, workflow group identifier, and producer changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_UpdateTableWorkflowGroupRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","groupId":"grp_5d8b2f0a6c1e4739a8b3d5f7e9c1a204","name":"Company profile enrichment"}}}}}},"responses":{"200":{"description":"The updated workflow group and resulting columns.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2UpdateTableWorkflowGroupResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTableWorkflowGroup","summary":"Delete workflow group","description":"Delete a workflow group and every table column populated by that group.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.groups.delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and workflow group identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_DeleteTableWorkflowGroupRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","groupId":"grp_5d8b2f0a6c1e4739a8b3d5f7e9c1a204"}}}}}},"responses":{"200":{"description":"Workflow-group deletion acknowledgement and surviving columns.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DeleteTableWorkflowGroupResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/dispatches":{"post":{"operationId":"createTableDispatch","summary":"Create run dispatch","description":"Start workflow or enrichment groups across all rows or selected rows. Poll Get run dispatch until `complete` or `canceled`. A null `dispatchId` means no dispatch is available to poll; check row outcomes with `includeRunState`. Use Cancel run dispatch to stop further scheduling.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.runs.start","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, producer groups, execution mode, and optional row scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableDispatchRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","groupIds":["grp_5d8b2f0a6c1e4739a8b3d5f7e9c1a204"]}}}}}},"responses":{"200":{"description":"The accepted run dispatch.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableDispatchResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"get":{"operationId":"listTableDispatches","summary":"List run dispatches","description":"List the run dispatches on one table, most recent first — settled dispatches (`complete`, `canceled`) alongside the ones still in flight, so a run that finished between two polls is still visible next to the `dispatchId` its create returned. Capped at the 100 most recent, so this list is unpaginated and `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.runs.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The table's most recent run dispatches.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableRunDispatchListResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/rows/{rowId}/enrichment/{groupId}":{"post":{"operationId":"runRowEnrichment","summary":"Run enrichment for one row","description":"Start one workflow or enrichment group for a table row. Poll Get run dispatch using the returned `dispatchId`. A null `dispatchId` means no dispatch is available to poll; check row outcomes with `includeRunState`.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.runs.start","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"rowId","in":"path","required":true,"description":"Unique table row identifier.","schema":{"type":"string","minLength":1,"description":"Unique table row identifier."}},{"name":"groupId","in":"path","required":true,"description":"Workflow or enrichment group to run.","schema":{"type":"string","minLength":1,"description":"Workflow or enrichment group to run."}}],"requestBody":{"required":true,"description":"Workspace scope for the row enrichment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_RunRowEnrichmentRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}}}}}},"responses":{"200":{"description":"The accepted row enrichment dispatch.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2RunRowEnrichmentResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"get":{"operationId":"getRowEnrichment","summary":"Get row group run","description":"Read one row’s workflow or enrichment-group outcome: run state, output cells keyed by column name, and providers in cascade order with status, hosted-key cost, duration, and the matching provider. `runState: null` means never run; `cascade: null` means no breakdown was recorded. Missing tables, rows, or groups return `404`. Run state above 2 MiB returns `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.rows.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"rowId","in":"path","required":true,"description":"Unique table row identifier.","schema":{"type":"string","minLength":1,"description":"Unique table row identifier."}},{"name":"groupId","in":"path","required":true,"description":"Workflow or enrichment group to run.","schema":{"type":"string","minLength":1,"description":"Workflow or enrichment group to run."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the table.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the table."}}],"responses":{"200":{"description":"The run state, output cells, and provider cascade for the group on the row.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2RowEnrichmentResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/rows/search":{"post":{"operationId":"searchTableRows","summary":"Search rows","description":"Search cell text for a case-insensitive substring within an optional filtered and sorted view. Returns cell coordinates, not row data; `ordinal` matches the view used by Query rows. Results are unpaginated and capped at 1000. If `truncated` is true, narrow the search or predicate.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.rows.search","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, substring query, and optional predicate and sort.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_SearchTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","q":"acme","predicate":{"all":[{"field":"status","op":"eq","value":"active"}]}}}}}}},"responses":{"200":{"description":"The matching table cells.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2SearchTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/imports":{"post":{"operationId":"createTableImport","summary":"Create table import","description":"Create a CSV import. Upload sources receive signed transfer instructions; workspace-file sources start processing directly.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.imports.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace, CSV source, target table, optional mapping, and timezone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableImportRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","source":{"type":"upload","name":"customers.csv","contentType":"text/csv","size":2048},"target":{"type":"new","name":"ImportedCustomers","folderPath":"/Imports"},"timezone":"America/Los_Angeles"}}}}}},"responses":{"201":{"description":"The created table import and optional transfer instructions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableImportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/imports/{importId}":{"get":{"operationId":"getTableImport","summary":"Get table import","description":"Get an import's progress and status. During `uploading`, the signed upload token is required; omitting it returns `404`.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.imports.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"importId","in":"path","required":true,"description":"Unique table-import identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-import identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}},{"name":"upload-token","in":"header","required":false,"description":"Signed upload control token returned when an upload-backed import was created.","schema":{"description":"Signed upload control token returned when an upload-backed import was created.","type":"string","minLength":1}}],"responses":{"200":{"description":"The requested table import.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableImportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"cancelTableImport","summary":"Cancel table import","description":"Cancel an upload or processing import. Committed row batches remain. Non-cancelable states, including `expired`, return `409`; unknown or purged imports return `404`.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.imports.cancel","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"importId","in":"path","required":true,"description":"Unique table-import identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-import identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}},{"name":"upload-token","in":"header","required":false,"description":"Signed upload control token returned when an upload-backed import was created.","schema":{"description":"Signed upload control token returned when an upload-backed import was created.","type":"string","minLength":1}}],"responses":{"200":{"description":"The canceled table import.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CancelTableImportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/imports/{importId}/parts":{"post":{"operationId":"createTableImportPartUrls","summary":"Create table import part URLs","description":"Create signed URLs for multipart upload parts. Requires the `uploading` state; other states return `409`. Unknown or purged imports return `404`.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.imports.create_parts","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"importId","in":"path","required":true,"description":"Unique table-import identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-import identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"requestBody":{"required":true,"description":"Multipart part numbers for which signed URLs should be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableImportPartUrlsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"partNumbers":[1,2,3]}}}}}},"responses":{"200":{"description":"The signed multipart upload URLs.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableImportPartUrlsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/imports/{importId}/complete":{"post":{"operationId":"completeTableImportUpload","summary":"Complete table import upload","description":"Verify or assemble uploaded CSV bytes and start processing under the same import ID. Requires an import awaiting upload completion; other states return `409`. Unknown or purged imports return `404`.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.imports.complete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"importId","in":"path","required":true,"description":"Unique table-import identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-import identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"responses":{"200":{"description":"The table import after upload completion.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CompleteTableImportUploadResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/exports":{"post":{"operationId":"createTableExport","summary":"Create table export","description":"Create a CSV or JSON export. Exports of small tables finish during the request; larger exports run asynchronously.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.exports.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and export format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableExportRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","format":"csv"}}}}}},"responses":{"201":{"description":"The created table export.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableExportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/exports/{exportId}":{"get":{"operationId":"getTableExport","summary":"Get table export","description":"Get a table export's progress and status.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.exports.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"exportId","in":"path","required":true,"description":"Unique table-export identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-export identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}}],"responses":{"200":{"description":"The requested table export.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableExportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"cancelTableExport","summary":"Cancel table export","description":"Cancel an export that is still in progress.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.exports.cancel","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"exportId","in":"path","required":true,"description":"Unique table-export identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-export identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}}],"responses":{"200":{"description":"The canceled table export.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CancelTableExportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/exports/{exportId}/download":{"get":{"operationId":"downloadTableExport","summary":"Download table export","description":"Get a short-lived signed download URL for a completed export. Other states return `409`; an unavailable export file returns `404`.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.exports.download","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"exportId","in":"path","required":true,"description":"Unique table-export identifier.","schema":{"type":"string","minLength":1,"description":"Unique table-export identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}}],"responses":{"200":{"description":"Signed table-export download information.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DownloadTableExportResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/cancel-runs":{"post":{"operationId":"cancelTableRuns","summary":"Cancel column runs","description":"Stop in-flight and pending workflow or enrichment cell runs across the table or one selected row.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.runs.cancel","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, row or all-table cancellation, and optional row predicate or exclusions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CancelTableRunsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","scope":"row","rowId":"row_1f3e5d7c9b8a4c2d806e4a6b8d0f2e93"}}}}}},"responses":{"200":{"description":"The number of canceled cell runs.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CancelTableRunsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/folders":{"get":{"operationId":"listTablesFolders","summary":"List folders","description":"List table folders, optionally limiting results to direct children of a parent path. Returns one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.folders.list","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose folders should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose folders should be listed."}},{"name":"parentPath","in":"query","required":false,"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/Tables_FolderPathInput"}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the folder name.","schema":{"description":"Case-insensitive substring match against the folder name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"The table folders.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableFolderListResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"post":{"operationId":"createTablesFolder","summary":"Create folder","description":"Create one table-folder leaf whose parent path already exists.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.folders.create","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace scope and canonical folder path to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_CreateTableFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Sales/Enterprise"}}}}}},"responses":{"201":{"description":"The created table folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CreateTableFolderResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"patch":{"operationId":"relocateTablesFolder","summary":"Rename or move folder","description":"Rename or move a table folder and update all descendant paths.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.folders.update","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace scope, current canonical path, and destination path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_RelocateTableFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Sales/Enterprise","destinationPath":"/Revenue/Enterprise"}}}}}},"responses":{"200":{"description":"The relocated table folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2RelocateTableFolderResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"deleteTablesFolder","summary":"Delete folder","description":"Archive an empty folder, or set `recursive=true` to archive its tables and subfolders. Use Restore folder to recover the archived contents.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.folders.delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace containing the folder.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."}},{"name":"path","in":"query","required":true,"description":"Path of the folder to delete.","schema":{"description":"Path of the folder to delete.","$ref":"#/components/schemas/Tables_NonRootFolderPathInput"}},{"name":"recursive","in":"query","required":false,"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","schema":{"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"default":"false","type":"string"}}],"responses":{"200":{"description":"Table-folder deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2DeleteTableFolderResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/folders/restore":{"post":{"operationId":"restoreTablesFolder","summary":"Restore folder","description":"Restore an archived table folder, its descendants, and tables using its former path. An archived parent moves it to the root; name conflicts may change the returned `path`. Non-archived paths return `404`. Save the path from Delete folder, because List folders does not include archived table folders.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.folders.restore","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace scope and the canonical path the archived folder held.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_RestoreTableFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Sales/Enterprise"}}}}}},"responses":{"200":{"description":"The restored table folder and what it brought back.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2RestoreTableFolderResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/restore":{"post":{"operationId":"restoreTable","summary":"Restore table","description":"Restore a table and its archived rows, views, and workflow groups. Active tables return unchanged without a new audit event. Name conflicts may change the returned `name`. Find archived tables with List tables and `scope=archived`.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.restore","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope for the archived table.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_RestoreTableRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}}}}}},"responses":{"200":{"description":"The restored table.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2RestoreTableResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"409":{"$ref":"#/components/responses/Tables_Conflict"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/rows/bulk-update":{"post":{"operationId":"bulkUpdateTableRows","summary":"Bulk update rows","description":"Apply separate partial patches to up to 1,000 rows, preserving omitted columns. A row outside the table rejects the entire request with `400` and lists missing IDs. Use Update rows by filter to apply one patch to every matching row.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.rows.update_many","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and one merge patch per row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_BulkUpdateTableRowsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","updates":[{"rowId":"row_1f3e5d7c9b8a4c2d806e4a6b8d0f2e93","data":{"status":"active"}},{"rowId":"row_2b4d6f8a0c1e3759b8d0f2a4c6e80193","data":{"status":"churned"}}]}}}}}},"responses":{"200":{"description":"The bulk update result.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2BulkUpdateTableRowsResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/{tableId}/dispatches/{dispatchId}":{"get":{"operationId":"getTableDispatch","summary":"Get run dispatch","description":"Get a dispatch's current state. Poll until `complete` or `canceled`; use row reads with `includeRunState` for per-cell outcomes.\n\nOAuth scope: `api:read`.","x-sim-operation":"tables.runs.read","x-oauth-scope":"api:read","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"dispatchId","in":"path","required":true,"description":"Unique table run-dispatch identifier.","schema":{"type":"string","minLength":1,"description":"Unique table run-dispatch identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}}],"responses":{"200":{"description":"The requested run dispatch.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2TableRunDispatchResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}},"delete":{"operationId":"cancelTableDispatch","summary":"Cancel run dispatch","description":"Stop a dispatch from scheduling more cells. Already queued or running cells continue; use Cancel column runs to stop them. Completed or canceled dispatches return unchanged.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.runs.cancel","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tableId","in":"path","required":true,"description":"Unique table identifier.","schema":{"type":"string","minLength":1,"description":"Unique table identifier."}},{"name":"dispatchId","in":"path","required":true,"description":"Unique table run-dispatch identifier.","schema":{"type":"string","minLength":1,"description":"Unique table run-dispatch identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the transfer resource.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the transfer resource."}}],"responses":{"200":{"description":"The dispatch in its post-cancellation state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2CancelTableDispatchResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/move":{"post":{"operationId":"moveTables","summary":"Move tables and folders","description":"Move up to 100 tables and folders to one destination. Items succeed or fail independently: covered tables are `skipped`, missing items are `notFound`, and lock or cycle failures include reasons in `failed`. An invalid destination rejects the request before any move.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.bulk_move","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace scope, the tables and folder paths to move, and the destination folder path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_BulkMoveTablesRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","tableIds":["tbl_7c9e6679742540de944be07fc1f90ae7"],"folderPaths":["/Sales/Enterprise"],"targetFolderPath":"/Revenue"}}}}}},"responses":{"200":{"description":"Per-item outcome of the bulk move.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2MoveTablesResponse"}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/tables/bulk-delete":{"post":{"operationId":"bulkDeleteTables","summary":"Bulk delete tables and folders","description":"Archive up to 100 selected tables and folders, including folder contents. Items succeed or fail independently, with `skipped`, `notFound`, and `failed` outcomes. `deletedItems` includes all descendants. Use Restore table or Restore folder to recover archived items.\n\nOAuth scope: `api:write`.","x-sim-operation":"tables.bulk_delete","x-oauth-scope":"api:write","tags":["Tables"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace scope, and the tables and folder paths to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_BulkDeleteTablesRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","tableIds":["tbl_7c9e6679742540de944be07fc1f90ae7"],"folderPaths":["/Sales/Archive"]}}}}}},"responses":{"200":{"description":"Per-item outcome of the bulk delete.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Tables_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Tables_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Tables_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2BulkDeleteTablesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"deleted":[{"kind":"table","id":"tbl_7c9e6679742540de944be07fc1f90ae7","name":"Leads"},{"kind":"folder","id":"/Sales/Archive","name":"/Sales/Archive"}],"skipped":[],"notFound":[],"failed":[],"deletedItems":{"tables":1,"folders":1}}}}}}}},"400":{"$ref":"#/components/responses/Tables_BadRequest"},"401":{"$ref":"#/components/responses/Tables_Unauthorized"},"403":{"$ref":"#/components/responses/Tables_Forbidden"},"404":{"$ref":"#/components/responses/Tables_NotFound"},"413":{"$ref":"#/components/responses/Tables_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Tables_UnsupportedMediaType"},"423":{"$ref":"#/components/responses/Tables_Locked"},"429":{"$ref":"#/components/responses/Tables_RateLimited"},"500":{"$ref":"#/components/responses/Tables_InternalError"},"503":{"$ref":"#/components/responses/Tables_ServiceUnavailable"}}}},"/api/v2/knowledge":{"get":{"operationId":"listKnowledgeBases","summary":"List knowledge bases","description":"List active knowledge bases in a workspace with folder filtering, search, sorting, and cursor pagination. Use `scope=archived` to find knowledge bases available for restoration. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose knowledge bases should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose knowledge bases should be listed."}},{"name":"scope","in":"query","required":false,"description":"Lifecycle scope: active or archived knowledge bases. Use Restore knowledge base to recover archived entries. Folder paths resolve only active folders, so filtering by an archived folder returns no matches.","schema":{"default":"active","description":"Lifecycle scope: active or archived knowledge bases. Use Restore knowledge base to recover archived entries. Folder paths resolve only active folders, so filtering by an archived folder returns no matches.","type":"string","enum":["active","archived"]}},{"name":"folderPath","in":"query","required":false,"description":"Restrict results to knowledge bases in this folder. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to knowledge bases in this folder. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/Knowledge_FolderPathInput"}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the resource name.","schema":{"description":"Case-insensitive substring match against the resource name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum knowledge bases to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum knowledge bases to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of knowledge bases.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeBaseListResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"post":{"operationId":"createKnowledgeBase","summary":"Create knowledge base","description":"Create a knowledge base in a workspace with optional folder placement and chunking configuration. An unknown `folderPath` returns `404`. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.create","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace, name, description, chunking configuration, and folder placement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeBaseRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Product Documentation","folderPath":"/Product"}}}}}},"responses":{"201":{"description":"The created knowledge base.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeBaseResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}":{"get":{"operationId":"getKnowledgeBase","summary":"Get knowledge base","description":"Get a knowledge base's metadata and document counts. Inaccessible knowledge bases return `404`. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.read","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"The requested knowledge base.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeBaseResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"updateKnowledgeBase","summary":"Update knowledge base","description":"Update a knowledge base's name, description, chunking configuration, or folder placement. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.update","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and fields to update. At least one mutable field is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeBaseRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Updated Product Documentation"}}}}}},"responses":{"200":{"description":"The updated knowledge base.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeBaseResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeBase","summary":"Delete knowledge base","description":"Archive a knowledge base, its documents, and its connectors, pausing synchronization. Use List knowledge bases with `scope=archived` to find it and Restore knowledge base to recover it.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.delete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"Knowledge base deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDeleteResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/export":{"get":{"operationId":"exportKnowledgeBase","summary":"Export knowledge base","description":"Stream a knowledge base as a bundle archive: its configuration, tag definitions, each workspace-visible document's file and chunk text, and optionally chunk vectors. Access-control lists, connector links, and credentials never leave. More than 2000 documents returns `413`. Exports record an audit event. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. `HEAD` omits `Content-Length` and cannot determine the download size.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.export","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"vectors","in":"query","required":false,"description":"Include chunk vectors so an import into a deployment with the same embedding model reuses them instead of re-embedding.","schema":{"description":"Include chunk vectors so an import into a deployment with the same embedding model reuses them instead of re-embedding.","type":"boolean"}}],"responses":{"200":{"description":"The knowledge base as a zip archive.","headers":{"Content-Type":{"$ref":"#/components/headers/Knowledge_Content-Type"},"Content-Disposition":{"$ref":"#/components/headers/Knowledge_Content-Disposition"},"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/connectors":{"get":{"operationId":"listKnowledgeConnectors","summary":"List knowledge connectors","description":"List external sources connected to a knowledge base with cursor pagination. Stored API keys are never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.connectors.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["connectorType","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum connectors to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum connectors to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of knowledge connectors.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"active","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"post":{"operationId":"createKnowledgeConnector","summary":"Create knowledge connector","description":"Validate and connect an external source, then queue its initial synchronization. The `apiKey` field is never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.connectors.create","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace, connector type, authentication reference, source configuration, and sync schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeConnectorRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncIntervalMinutes":1440}}}}}},"responses":{"201":{"description":"The created connector without secret material.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"active","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/connectors/{connectorId}":{"get":{"operationId":"getKnowledgeConnector","summary":"Get knowledge connector","description":"Get one connector and its ten most recent synchronization attempts. Stored API keys are never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.connectors.read","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"connectorId","in":"path","required":true,"description":"Connector selected for the operation.","schema":{"type":"string","minLength":1,"description":"Connector selected for the operation."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Knowledge base that owns the connector.","schema":{"type":"string","minLength":1,"description":"Knowledge base that owns the connector."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"The connector and recent synchronization history.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDetailResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"active","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","syncLogs":[]}}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"updateKnowledgeConnector","summary":"Update knowledge connector","description":"Update connector source configuration, schedule, or active state. Replacing source configuration on a runnable connector queues an immediate synchronization; paused connectors retain the change without synchronizing until resumed. Source configuration cannot be replaced while synchronization is already in progress. Authentication material cannot be changed through this operation. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.connectors.update","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"connectorId","in":"path","required":true,"description":"Connector selected for the operation.","schema":{"type":"string","minLength":1,"description":"Connector selected for the operation."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Knowledge base that owns the connector.","schema":{"type":"string","minLength":1,"description":"Knowledge base that owns the connector."}}],"requestBody":{"required":true,"description":"Workspace scope and at least one mutable connector field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeConnectorRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","status":"paused"}}}}}},"responses":{"200":{"description":"The updated connector.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeConnectorResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"paused","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:03:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeConnector","summary":"Delete knowledge connector","description":"Delete a connector and optionally its synchronized documents. Documents are retained by default. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.connectors.delete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"connectorId","in":"path","required":true,"description":"Connector selected for the operation.","schema":{"type":"string","minLength":1,"description":"Connector selected for the operation."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Knowledge base that owns the connector.","schema":{"type":"string","minLength":1,"description":"Knowledge base that owns the connector."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"deleteDocuments","in":"query","required":false,"description":"Also permanently delete documents produced by this connector.","schema":{"description":"Also permanently delete documents produced by this connector.","type":"boolean"}}],"responses":{"200":{"description":"Connector deletion acknowledgement and document counts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDeleteResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"kc-9f8e7d6c","deleted":true,"documentsDeleted":0,"documentsKept":42}}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/connectors/{connectorId}/sync":{"post":{"operationId":"syncKnowledgeConnector","summary":"Sync knowledge connector","description":"Queue a connector synchronization. Rehydration forces existing documents to be fetched and indexed again. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.connectors.sync","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"connectorId","in":"path","required":true,"description":"Connector selected for the operation.","schema":{"type":"string","minLength":1,"description":"Connector selected for the operation."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Knowledge base that owns the connector.","schema":{"type":"string","minLength":1,"description":"Knowledge base that owns the connector."}}],"requestBody":{"required":true,"description":"Workspace scope and optional full rehydration control.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_SyncKnowledgeConnectorRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","rehydrate":false}}}}}},"responses":{"200":{"description":"Synchronization was queued.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorSyncResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"kc-9f8e7d6c","syncTriggered":true}}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/connectors/{connectorId}/documents":{"get":{"operationId":"listKnowledgeConnectorDocuments","summary":"List knowledge connector documents","description":"List documents produced by one connector with opaque cursor pagination. Excluded documents are omitted unless explicitly requested. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.connectors.documents.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"connectorId","in":"path","required":true,"description":"Connector selected for the operation.","schema":{"type":"string","minLength":1,"description":"Connector selected for the operation."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Knowledge base that owns the connector.","schema":{"type":"string","minLength":1,"description":"Knowledge base that owns the connector."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"includeExcluded","in":"query","required":false,"description":"Include documents explicitly excluded by a user.","schema":{"description":"Include documents explicitly excluded by a user.","type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum connector documents to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum connector documents to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of connector documents.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDocumentListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"doc-8a7b6c5d","filename":"Product requirements","externalId":"page-123","sourceUrl":"https://www.notion.so/page-123","enabled":true,"userExcluded":false,"createdAt":"2026-06-01T09:15:00.000Z","processingStatus":"completed"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"updateKnowledgeConnectorDocuments","summary":"Update knowledge connector documents","description":"Exclude connector documents from knowledge search or restore previously excluded documents. Only documents produced by the selected connector can change. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.connectors.documents.update","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"connectorId","in":"path","required":true,"description":"Connector selected for the operation.","schema":{"type":"string","minLength":1,"description":"Connector selected for the operation."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Knowledge base that owns the connector.","schema":{"type":"string","minLength":1,"description":"Knowledge base that owns the connector."}}],"requestBody":{"required":true,"description":"Workspace, restore or exclude operation, and selected document identifiers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeConnectorDocumentsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","operation":"exclude","documentIds":["doc-8a7b6c5d"]}}}}}},"responses":{"200":{"description":"The selected connector documents were updated.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDocumentsUpdateResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"operation":"exclude","updatedCount":1,"documentIds":["doc-8a7b6c5d"]}}}}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/search":{"post":{"operationId":"searchKnowledge","summary":"Search knowledge","description":"Search one or more knowledge bases with semantic vector retrieval, optional hybrid full-text retrieval, and structured tag filters. Every result names the `knowledgeBaseId` it came from. A request body over 2 MiB is a `413`. Reranking returns `409` when the stored results cannot pass secret-provenance enforcement.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.search","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"requestBody":{"required":true,"description":"Knowledge bases, query, result limit, retrieval mode, and optional tag filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_SearchKnowledgeRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","knowledgeBaseIds":["7c9e6679-7425-40de-944b-e07fc1f90ae7"],"query":"How do I reset my password?","topK":10}}}}}},"responses":{"200":{"description":"Matching document chunks ordered by relevance.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeSearchResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"402":{"$ref":"#/components/responses/Knowledge_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/tags":{"get":{"operationId":"listKnowledgeTags","summary":"List tags","description":"List the knowledge base's tag definitions with display names, write slots, and field types. Filters and document reads use display names; document writes use slots. Returns one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.tags.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"The knowledge base tag vocabulary.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTagListResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"post":{"operationId":"createKnowledgeTag","summary":"Create tag","description":"Create a tag definition. Write document values by `tagSlot` and filter by `displayName`. Omitting `tagSlot` selects a free slot; exhaustion returns `400`. An occupied slot or duplicate name returns `409`. Use Bulk save tag definitions for multiple definitions. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.tags.create","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, display name, field type, and optional slot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeTagRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","displayName":"category","fieldType":"text"}}}}}},"responses":{"201":{"description":"The created tag definition.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTagResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"put":{"operationId":"bulkSaveKnowledgeTagDefinitions","summary":"Bulk save tag definitions","description":"Create or update tag definitions, preserving unspecified slots. Updates require `originalDisplayName`; other entries create tags. Slot and name conflicts appear in per-definition `errors` with HTTP `200`, leaving conflicting values unchanged. Use Update document to set tag values. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.tags.bulk_save","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the tag definitions to create or update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_BulkSaveKnowledgeTagDefinitionsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","definitions":[{"tagSlot":"tag1","displayName":"category","fieldType":"text"}]}}}}}},"responses":{"200":{"description":"Definitions created and updated by the save.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2BulkSaveKnowledgeTagDefinitionsResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeTagDefinitions","summary":"Delete tag definitions","description":"Delete unused tag definitions by default. With `unused=false`, permanently delete all definitions and their values from documents and chunks. Use Delete tag to remove one definition. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.tags.cleanup","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"unused","in":"query","required":false,"description":"Whether to remove only the tag definitions no document in the knowledge base still carries a value for. Defaults to true. Pass `unused=false` to delete every definition on the knowledge base, which also clears its slot on every document and chunk and is not recoverable.","schema":{"description":"Whether to remove only the tag definitions no document in the knowledge base still carries a value for. Defaults to true. Pass `unused=false` to delete every definition on the knowledge base, which also clears its slot on every document and chunk and is not recoverable.","type":"boolean"}}],"responses":{"200":{"description":"Number of tag definitions removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2DeleteKnowledgeTagDefinitionsResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents":{"get":{"operationId":"listKnowledgeDocuments","summary":"List documents","description":"List documents with filename search, state and tag filters, sorting, and cursor pagination. Tag values use display names; use List tags to resolve the slots required for writes.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.documents.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the knowledge base."}},{"name":"limit","in":"query","required":false,"description":"Maximum documents to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum documents to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the document filename.","schema":{"description":"Case-insensitive substring match against the document filename.","type":"string","minLength":1,"maxLength":200}},{"name":"enabledFilter","in":"query","required":false,"description":"Filter by whether documents are enabled for search.","schema":{"default":"all","description":"Filter by whether documents are enabled for search.","type":"string","enum":["all","enabled","disabled"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `filename`.","schema":{"default":"uploadedAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `filename`.","type":"string","enum":["filename","fileSize","tokenCount","chunkCount","uploadedAt","processingStatus","enabled"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"tagFilters","in":"query","required":false,"description":"A JSON-encoded array of at most 10 tag filters, using the same display-name shape as knowledge search: `[{\"tagName\":\"category\",\"operator\":\"eq\",\"value\":\"billing\"}]`. Every filter must hold, including two that name the same tag. A name that is not defined in this knowledge base is rejected, never ignored.","schema":{"description":"A JSON-encoded array of at most 10 tag filters, using the same display-name shape as knowledge search: `[{\"tagName\":\"category\",\"operator\":\"eq\",\"value\":\"billing\"}]`. Every filter must hold, including two that name the same tag. A name that is not defined in this knowledge base is rejected, never ignored.","examples":["[{\"tagName\":\"category\",\"operator\":\"eq\",\"value\":\"billing\"}]"],"type":"string"}}],"responses":{"200":{"description":"A page of knowledge documents.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentListResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"bulkUpdateKnowledgeDocuments","summary":"Bulk enable or disable documents","description":"Enable or disable selected documents, or use `selectAll` for the entire knowledge base. Use Delete document to remove documents individually. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.bulk","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Operation and the documents it applies to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_BulkUpdateKnowledgeDocumentsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","operation":"disable","documentIds":["b2d4f8a0-1c3e-4a5b-9d7c-2e6f0a8b4c12"]}}}}}},"responses":{"200":{"description":"The number and identifiers of the documents that changed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2BulkKnowledgeDocumentsResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"post":{"operationId":"uploadKnowledgeDocument","summary":"Upload document","description":"Upload one document as multipart form data. Processing continues asynchronously after the document is accepted.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.upload","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}}],"requestBody":{"required":true,"description":"Multipart form containing the document file.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Knowledge_UploadKnowledgeDocumentForm"}}}},"responses":{"201":{"description":"The accepted document queued for processing.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentSummaryResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"402":{"$ref":"#/components/responses/Knowledge_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/uploads":{"post":{"operationId":"createKnowledgeDocumentUpload","summary":"Create document upload","description":"Create a resumable upload session and receive direct PUT or multipart transfer instructions.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.upload.create","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Document metadata used to authorize and initialize the upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeDocumentUploadRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"getting-started.pdf","contentType":"application/pdf","size":248913}}}}}},"responses":{"201":{"description":"The created upload session and transfer instructions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2CreateKnowledgeDocumentUploadResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"402":{"$ref":"#/components/responses/Knowledge_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/uploads/{uploadId}":{"delete":{"operationId":"abortKnowledgeDocumentUpload","summary":"Abort document upload","description":"Abort an incomplete upload session and discard its uploaded data. Completed uploads cannot be aborted.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.upload.cancel","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier returned when the upload was created.","schema":{"type":"string","minLength":1,"description":"Upload session identifier returned when the upload was created."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"responses":{"200":{"description":"The aborted upload session.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentUploadResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/uploads/{uploadId}/parts":{"post":{"operationId":"createKnowledgeDocumentUploadPartUrls","summary":"Create document upload part URLs","description":"Create short-lived signed PUT URLs for up to 100 multipart part numbers.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.upload.parts","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier returned when the upload was created.","schema":{"type":"string","minLength":1,"description":"Upload session identifier returned when the upload was created."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"requestBody":{"required":true,"description":"Multipart part numbers for which signed URLs should be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeDocumentUploadPartUrlsRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"partNumbers":[1,2,3]}}}}}},"responses":{"200":{"description":"Signed URLs for the requested upload parts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentUploadPartUrlsResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/uploads/{uploadId}/complete":{"post":{"operationId":"completeKnowledgeDocumentUpload","summary":"Complete document upload","description":"Verify a direct upload or assemble multipart parts, create the knowledge document, and queue asynchronous processing.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.upload.complete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"uploadId","in":"path","required":true,"description":"Upload session identifier returned when the upload was created.","schema":{"type":"string","minLength":1,"description":"Upload session identifier returned when the upload was created."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"upload-token","in":"header","required":true,"description":"Signed upload control token returned when the upload session was created.","schema":{"type":"string","minLength":1,"description":"Signed upload control token returned when the upload session was created."}}],"responses":{"200":{"description":"The completed upload and queued document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentUploadResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/{documentId}":{"get":{"operationId":"getKnowledgeDocument","summary":"Get document","description":"Get document metadata, processing status, and source connector details.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.documents.read","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"The requested knowledge document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"updateKnowledgeDocument","summary":"Update document","description":"Rename a document, change search availability, update tag slots, or requeue processing. Omitted fields remain unchanged; indexing state is read-only. Use List tags to resolve names to slots and Get document for source connector details, which this response omits. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.update","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Filename, search state, tag slot values, or a processing retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeDocumentRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","enabled":false,"tag1":"billing"}}}}}},"responses":{"200":{"description":"The updated document, or the requeue acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2UpdateKnowledgeDocumentResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeDocument","summary":"Delete document","description":"Remove a document from listings and search. Uploaded documents and their chunks are deleted. Connector documents are excluded while retaining their stored data; later synchronization does not re-add them.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.delete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"Knowledge document deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDeleteResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/folders":{"get":{"operationId":"listKnowledgeFolders","summary":"List folders","description":"List folders in the knowledge-base folder tree with filtering and sorting. Returns one page; `nextCursor` is always null. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.folders.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose folders should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose folders should be listed."}},{"name":"parentPath","in":"query","required":false,"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","schema":{"description":"Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.","$ref":"#/components/schemas/Knowledge_FolderPathInput"}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the folder name.","schema":{"description":"Case-insensitive substring match against the folder name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of knowledge-base folders.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeFolderListResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"post":{"operationId":"createKnowledgeFolder","summary":"Create folder","description":"Create a folder in the knowledge-base folder tree. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.folders.create","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Workspace and canonical path for a new knowledge-base folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Product"}}}}}},"responses":{"201":{"description":"The created knowledge-base folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeFolderResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"relocateKnowledgeFolder","summary":"Rename or move folder","description":"Rename or move a folder and atomically rewrite descendant paths. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.folders.relocate","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Current and destination canonical paths for a knowledge-base folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_RelocateKnowledgeFolderRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","path":"/Product","destinationPath":"/Archive/Product"}}}}}},"responses":{"200":{"description":"The relocated knowledge-base folder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeFolderResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeFolder","summary":"Delete folder","description":"Archive an empty folder, or set `recursive=true` to archive its subfolders and knowledge bases. Use Restore knowledge base to recover knowledge bases.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.folders.delete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace containing the folder.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."}},{"name":"path","in":"query","required":true,"description":"Path of the folder to delete.","schema":{"description":"Path of the folder to delete.","$ref":"#/components/schemas/Knowledge_NonRootFolderPathInput"}},{"name":"recursive","in":"query","required":false,"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","schema":{"description":"Delete the folder's contents and nested folders too. Required for a non-empty folder. Only the listed case-sensitive spellings are accepted.","enum":["true","1","yes","on","y","enabled","false","0","no","off","n","disabled"],"default":"false","type":"string"}}],"responses":{"200":{"description":"Folder deletion acknowledgement and deleted item counts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2DeleteKnowledgeFolderResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/restore":{"post":{"operationId":"restoreKnowledgeBase","summary":"Restore knowledge base","description":"Restore a knowledge base and the documents and connectors archived with it. Active knowledge bases return unchanged without a new audit event. An archived workspace returns `409`; an archived containing folder moves the restored knowledge base to the workspace root. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.restore","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope for the knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_RestoreKnowledgeBaseRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}}}}}},"responses":{"200":{"description":"The restored knowledge base.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeBaseResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/from-workspace-files":{"post":{"operationId":"addWorkspaceFilesToKnowledgeBase","summary":"Index workspace files","description":"Queue stored workspace files for indexing without re-uploading bytes. Unreadable, unsupported, or over-100 MiB files appear in `failed`; valid files are queued. Partial success returns `200`. Use Get document to poll processing after receiving document IDs. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.documents.add_workspace_files","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the workspace file references to index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_AddWorkspaceFilesToKnowledgeBaseRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","fileReferences":["handbook.pdf"]}}}}}},"responses":{"200":{"description":"Files queued for indexing, with any that could not be.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2AddWorkspaceFilesToKnowledgeBaseResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"402":{"$ref":"#/components/responses/Knowledge_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/{documentId}/chunks":{"get":{"operationId":"listKnowledgeChunks","summary":"List chunks","description":"List document chunks with content search, enabled filtering, sorting, and cursor pagination. Tags use slots; use List tags to resolve display names. Documents that have not finished processing return `409` with their current status. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.chunks.list","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against chunk content.","schema":{"description":"Case-insensitive substring match against chunk content.","type":"string","minLength":1,"maxLength":200}},{"name":"enabled","in":"query","required":false,"description":"Restrict to enabled or disabled chunks. `all` returns both.","schema":{"default":"all","description":"Restrict to enabled or disabled chunks. `all` returns both.","type":"string","enum":["true","false","all"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"chunkIndex","description":"Field used to sort the result.","type":"string","enum":["chunkIndex","tokenCount","enabled"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum chunks to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum chunks to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of document chunks.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkListResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"post":{"operationId":"createKnowledgeChunk","summary":"Create chunk","description":"Append a chunk and embed it before returning. It inherits the document's tags and next `chunkIndex`. Search includes it when the chunk and document are enabled and the document has completed processing. Connector-synced chunks are read-only and return `403` with `error.details.code: \"CONNECTOR_MANAGED_RESOURCE_READ_ONLY\"`; change the source and re-sync, or exclude the document. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.chunks.create","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the text to embed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_CreateKnowledgeChunkRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","content":"To reset your password, open Settings and choose Security."}}}}}},"responses":{"201":{"description":"The created chunk.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"bulkUpdateKnowledgeChunks","summary":"Bulk update chunks","description":"Enable, disable, or delete multiple chunks in one best-effort request. Unknown chunk IDs appear in `errors` without failing the request; `processed` counts matched chunks, not changes. Connector-synced chunks are read-only and return `403` with `error.details.code: \"CONNECTOR_MANAGED_RESOURCE_READ_ONLY\"`; change the source and re-sync, or exclude the document. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.chunks.bulk","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope, the operation to apply, and the chunks to apply it to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_BulkUpdateKnowledgeChunksRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","operation":"disable","chunkIds":["4c1f9e77-2b3a-4f8d-9e10-6a2c8d4b1e05"]}}}}}},"responses":{"200":{"description":"Outcome of the bulk chunk operation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2BulkKnowledgeChunksResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/documents/{documentId}/chunks/{chunkId}":{"get":{"operationId":"getKnowledgeChunk","summary":"Get chunk","description":"Get one chunk of a document, including the exact text that was embedded. Documents that have not finished processing return `409` with their current status. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.chunks.read","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"chunkId","in":"path","required":true,"description":"Unique chunk identifier.","schema":{"type":"string","minLength":1,"description":"Unique chunk identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"The requested chunk.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"patch":{"operationId":"updateKnowledgeChunk","summary":"Update chunk","description":"Correct chunk text or disable it from search. Changing `content` re-embeds immediately and recalculates document token and character counts; disabling retains the index. Connector-synced chunks are read-only and return `403` with `error.details.code: \"CONNECTOR_MANAGED_RESOURCE_READ_ONLY\"`; change the source and re-sync, or exclude the document. Documents that have not finished processing return `409` with their current status. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.chunks.update","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"chunkId","in":"path","required":true,"description":"Unique chunk identifier.","schema":{"type":"string","minLength":1,"description":"Unique chunk identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the fields to update. At least one is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeChunkRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","enabled":false}}}}}},"responses":{"200":{"description":"The updated chunk.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeChunk","summary":"Delete chunk","description":"Permanently remove one chunk and subtract it from document counts. Remaining `chunkIndex` values stay stable and may become non-contiguous. Connector-synced chunks are read-only and return `403` with `error.details.code: \"CONNECTOR_MANAGED_RESOURCE_READ_ONLY\"`; change the source and re-sync, or exclude the document. Documents that have not finished processing return `409` with their current status. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.chunks.delete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Unique knowledge document identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge document identifier."}},{"name":"chunkId","in":"path","required":true,"description":"Unique chunk identifier.","schema":{"type":"string","minLength":1,"description":"Unique chunk identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"Chunk deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDeleteResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/tags/{tagId}":{"patch":{"operationId":"updateKnowledgeTag","summary":"Update tag","description":"Rename a tag or change its slot-compatible `fieldType`. Renaming changes read and filter names without moving the slot or its values. Slots are fixed for a tag's lifetime; an incompatible type returns `400` and requires creating a new tag. A duplicate display name returns `409`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.tags.update","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tagId","in":"path","required":true,"description":"Unique tag definition identifier.","schema":{"type":"string","minLength":1,"description":"Unique tag definition identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}}],"requestBody":{"required":true,"description":"Workspace scope and the fields to update. At least one is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_UpdateKnowledgeTagRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","displayName":"topic"}}}}}},"responses":{"200":{"description":"The updated tag definition.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTagResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"413":{"$ref":"#/components/responses/Knowledge_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Knowledge_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}},"delete":{"operationId":"deleteKnowledgeTag","summary":"Delete tag","description":"Permanently delete a tag definition and its values from every document and chunk in the knowledge base. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"knowledge.tags.delete","x-oauth-scope":"api:write","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"tagId","in":"path","required":true,"description":"Unique tag definition identifier.","schema":{"type":"string","minLength":1,"description":"Unique tag definition identifier."}},{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"Tag deletion acknowledgement.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2DeleteKnowledgeTagResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"409":{"$ref":"#/components/responses/Knowledge_Conflict"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/tags/next-slot":{"get":{"operationId":"getNextKnowledgeTagSlot","summary":"Get next tag slot","description":"Get the next available slot and remaining capacity for a field type. This does not reserve a slot. Create tag selects a free slot when `tagSlot` is omitted. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.tags.read_next_slot","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},{"name":"fieldType","in":"query","required":true,"description":"Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3.","schema":{"type":"string","enum":["text","number","date","boolean"],"description":"Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3.","examples":["text"]}}],"responses":{"200":{"description":"Slot availability for the requested field type.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2NextKnowledgeTagSlotResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/knowledge/{knowledgeBaseId}/tags/usage":{"get":{"operationId":"listKnowledgeTagUsage","summary":"List tag usage","description":"Count the documents and chunks with a value for each defined tag. Returns one page; `nextCursor` is always null. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"knowledge.tags.read_usage","x-oauth-scope":"api:read","tags":["Knowledge Bases"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"knowledgeBaseId","in":"path","required":true,"description":"Unique knowledge base identifier.","schema":{"type":"string","minLength":1,"description":"Unique knowledge base identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the knowledge base.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}}],"responses":{"200":{"description":"Usage counts for every defined tag.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Knowledge_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTagUsageListResponse"}}}},"400":{"$ref":"#/components/responses/Knowledge_BadRequest"},"401":{"$ref":"#/components/responses/Knowledge_Unauthorized"},"403":{"$ref":"#/components/responses/Knowledge_Forbidden"},"404":{"$ref":"#/components/responses/Knowledge_NotFound"},"429":{"$ref":"#/components/responses/Knowledge_RateLimited"},"500":{"$ref":"#/components/responses/Knowledge_InternalError"},"503":{"$ref":"#/components/responses/Knowledge_ServiceUnavailable"}}}},"/api/v2/billing/status":{"get":{"operationId":"getBillingStatus","summary":"Get billing status","description":"Get the current plan, billing standing, credit allowance, and storage quota. Pooled `credits` and `storage` are visible only to callers who can manage the payer's billing; workspace API keys receive null for both. Use List billing logs for credit history.\n\nOAuth scope: `api:read`.","x-sim-operation":"billing.status.read","x-oauth-scope":"api:read","tags":["Billing"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":false,"description":"Workspace whose payer to report. A workspace API key is bound to its own workspace; a different or unknown ID returns `404 Workspace not found`. Omit for account billing when using a personal API key or OAuth token.","schema":{"description":"Workspace whose payer to report. A workspace API key is bound to its own workspace; a different or unknown ID returns `404 Workspace not found`. Omit for account billing when using a personal API key or OAuth token.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The current billing and storage status.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Billing_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Billing_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Billing_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2BillingStatusResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"workspaceId":null,"period":{"start":"2026-07-01T00:00:00.000Z","end":"2026-08-01T00:00:00.000Z"},"plan":"pro","status":"active","credits":{"used":512,"limit":20000,"remaining":19488},"storage":{"usedBytes":5242880,"limitBytes":1073741824,"percentUsed":0.48828125}}}}}}}},"400":{"$ref":"#/components/responses/Billing_BadRequest"},"401":{"$ref":"#/components/responses/Billing_Unauthorized"},"403":{"$ref":"#/components/responses/Billing_Forbidden"},"404":{"$ref":"#/components/responses/Billing_NotFound"},"429":{"$ref":"#/components/responses/Billing_RateLimited"},"500":{"$ref":"#/components/responses/Billing_InternalError"},"503":{"$ref":"#/components/responses/Billing_ServiceUnavailable"}}}},"/api/v2/billing/logs":{"get":{"operationId":"listBillingLogs","summary":"List billing logs","description":"List credit usage with source filtering and cursor pagination. The default `period` is `30d`; pagination covers only the selected time window. An inverted custom window returns `400`.\n\nOAuth scope: `api:read`.","x-sim-operation":"billing.logs.list","x-oauth-scope":"api:read","tags":["Billing"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"source","in":"query","required":false,"description":"Restrict results to one usage source.","schema":{"description":"Restrict results to one usage source.","type":"string","enum":["workflow","wand","sim-chat","mcp_copilot","mothership_block","knowledge-base","voice-input","enrichment","voice-output","api-tool"]}},{"name":"workspaceId","in":"query","required":false,"description":"Narrow the ledger to one workspace. An OAuth token or personal API key reports only its user's events; a workspace API key reports every member's events in its bound workspace. The response `scope` identifies which view was returned. A workspace key asking for another workspace receives the same `404 Workspace not found` as an unknown id.","schema":{"description":"Narrow the ledger to one workspace. An OAuth token or personal API key reports only its user's events; a workspace API key reports every member's events in its bound workspace. The response `scope` identifies which view was returned. A workspace key asking for another workspace receives the same `404 Workspace not found` as an unknown id.","type":"string","minLength":1,"maxLength":128}},{"name":"period","in":"query","required":false,"description":"Relative window, all history, or a custom date range. `startDate` and `endDate` are accepted only with `custom`; every other value computes its own window.","schema":{"default":"30d","description":"Relative window, all history, or a custom date range. `startDate` and `endDate` are accepted only with `custom`; every other value computes its own window.","type":"string","enum":["1d","7d","30d","all","custom"]}},{"name":"startDate","in":"query","required":false,"description":"Include events at or after this UTC ISO 8601 timestamp, for example `2026-08-06T00:00:00Z`. Required with `period=custom`. Date-only values, UTC offsets instead of `Z`, and year `0000` are rejected.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Include events at or after this UTC ISO 8601 timestamp, for example `2026-08-06T00:00:00Z`. Required with `period=custom`. Date-only values, UTC offsets instead of `Z`, and year `0000` are rejected."}},{"name":"endDate","in":"query","required":false,"description":"Include events at or before this UTC ISO 8601 timestamp, for example `2026-08-06T00:00:00Z`. Allowed only with `period=custom`; omission defaults to now. Date-only values, UTC offsets instead of `Z`, and year `0000` are rejected.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Include events at or before this UTC ISO 8601 timestamp, for example `2026-08-06T00:00:00Z`. Allowed only with `period=custom`; omission defaults to now. Date-only values, UTC offsets instead of `Z`, and year `0000` are rejected."}},{"name":"limit","in":"query","required":false,"description":"Maximum usage events per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum usage events per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of usage events.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Billing_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Billing_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Billing_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2BillingLogListResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"log_1","createdAt":"2026-07-29T18:04:11.000Z","source":"sim-chat","workspaceId":"ws_1","workflow":null,"runId":null,"creditCost":12}],"nextCursor":null,"scope":"workspace"}}}}}},"400":{"$ref":"#/components/responses/Billing_BadRequest"},"401":{"$ref":"#/components/responses/Billing_Unauthorized"},"403":{"$ref":"#/components/responses/Billing_Forbidden"},"404":{"$ref":"#/components/responses/Billing_NotFound"},"429":{"$ref":"#/components/responses/Billing_RateLimited"},"500":{"$ref":"#/components/responses/Billing_InternalError"},"503":{"$ref":"#/components/responses/Billing_ServiceUnavailable"}}}},"/api/v2/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List workspaces","description":"List active workspaces available to the calling credential. Personal API keys and OAuth tokens see accessible workspaces that permit user-held API credentials; a workspace API key sees only its bound workspace. Results use cursor pagination.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.list_public","x-oauth-scope":"api:read","tags":["Workspaces"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum workspaces to return per page. Must be a whole number from 1 to 100. Defaults to 25.","schema":{"default":25,"description":"Maximum workspaces to return per page. Must be a whole number from 1 to 100. Defaults to 25.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Metadata for workspaces available to the credential.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListWorkspacesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Engineering","color":"#33C482","logoUrl":null,"memberCount":14,"createdAt":"2026-01-15T10:30:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}":{"get":{"operationId":"getWorkspace","summary":"Get workspace","description":"Get metadata for a workspace the calling credential can access. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.read_public_detail","x-oauth-scope":"api:read","tags":["Workspaces"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Workspace to retrieve.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace to retrieve."}}],"responses":{"200":{"description":"Workspace metadata.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetWorkspaceResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Engineering","color":"#33C482","logoUrl":null,"memberCount":14,"createdAt":"2026-01-15T10:30:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/members":{"get":{"operationId":"listWorkspaceMembers","summary":"List workspace members","description":"List effective workspace members, ordered by email, including explicit grants and inherited organization Admin access. Use each member’s `userId` for member administration. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"workspaces.members.list_public","x-oauth-scope":"api:read","tags":["Workspaces"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Workspace to retrieve.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace to retrieve."}},{"name":"limit","in":"query","required":false,"description":"Maximum members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"An email-ordered page of effective workspace members.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListWorkspaceMembersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"userId":"user-123","email":"jane@example.com","name":"Jane Smith","image":null,"role":"admin","isExternal":false,"joinedAt":"2026-01-15T10:30:00.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/mcp-servers":{"get":{"operationId":"listMcpServers","summary":"List MCP servers","description":"List external MCP servers registered in the workspace. Request-header values and OAuth secrets are omitted. Connection metadata remains at registration defaults until List MCP server tools performs discovery. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"mcp_servers.list","x-oauth-scope":"api:read","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the MCP server.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the MCP server."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the server name.","schema":{"description":"Case-insensitive substring match against the server name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum MCP servers to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum MCP servers to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"MCP servers registered in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListMcpServersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":true,"connectionStatus":"connected","lastError":null,"toolCount":7,"lastToolsRefresh":"2026-06-20T14:02:11.000Z","lastConnected":"2026-06-20T14:02:11.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createMcpServer","summary":"Create MCP server","description":"Register an external MCP server without establishing a tool connection; registration may probe its authentication method. A duplicate URL returns `409`; use Update MCP server to change the registration. It stays disconnected until List MCP server tools succeeds. Requires workspace write access.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.create","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Configuration for a new MCP server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateMcpServerRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Docs server","url":"https://mcp.example.com/sse","authType":"headers","headers":{"Authorization":"Bearer YOUR_TOKEN"}}}}}}},"responses":{"201":{"description":"The MCP server was registered.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":true,"connectionStatus":"disconnected","lastError":null,"toolCount":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/mcp-servers/{mcpServerId}":{"get":{"operationId":"getMcpServer","summary":"Get MCP server","description":"Get a registered external MCP server. Request-header values and OAuth client secrets are omitted. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"mcp_servers.read","x-oauth-scope":"api:read","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"mcpServerId","in":"path","required":true,"description":"Unique MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique MCP server identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the MCP server.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the MCP server."}}],"responses":{"200":{"description":"The MCP server.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":true,"connectionStatus":"connected","lastError":null,"toolCount":7,"lastToolsRefresh":"2026-06-20T14:02:11.000Z","lastConnected":"2026-06-20T14:02:11.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateMcpServer","summary":"Update MCP server","description":"Update an external MCP server. Omitted fields remain unchanged unless a field specifies otherwise. Authentication changes revoke its stored OAuth grant and reset connection metadata; use List MCP server tools to reconnect. The endpoint URL is immutable. Requires workspace write access.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.update","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"mcpServerId","in":"path","required":true,"description":"Unique MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique MCP server identifier."}}],"requestBody":{"required":true,"description":"MCP server fields to change; omitted fields retain their stored values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateMcpServerRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","enabled":false}}}}}},"responses":{"200":{"description":"The updated MCP server.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":false,"connectionStatus":"connected","lastError":null,"toolCount":7,"lastToolsRefresh":"2026-06-20T14:02:11.000Z","lastConnected":"2026-06-20T14:02:11.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteMcpServer","summary":"Delete MCP server","description":"Remove an external MCP server and revoke its OAuth tokens. Workflow blocks retain references to its tools, but those tools can no longer be called. Requires workspace write access.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.delete","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"mcpServerId","in":"path","required":true,"description":"Unique MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique MCP server identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the MCP server.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the MCP server."}}],"responses":{"200":{"description":"The MCP server was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"mcp-3f7a9c21","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/mcp-servers/{mcpServerId}/tools":{"get":{"operationId":"listMcpServerTools","summary":"List MCP server tools","description":"Discover tools on an enabled external MCP server and update connection metadata. Discovery is bounded by 1,000 tools, 5 MiB, 50 upstream pages, and 60 seconds; limits or later-page failures can return an unmarked partial inventory. Results are unpaginated and may be cached; `refresh=true` requests fresh discovery. Invalid OAuth returns `409` with `MCP_SERVER_REAUTHORIZATION_REQUIRED`; reauthorize in the browser. Disabled servers and servers requiring a managed Credential Group connection return `409`; unavailable servers return `503`. Requires workspace read access. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.tools.discover","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"mcpServerId","in":"path","required":true,"description":"Unique MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique MCP server identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the MCP server.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the MCP server."}},{"name":"refresh","in":"query","required":false,"description":"Refresh tools using your credentials. Otherwise results may reuse another workspace member's recent discovery and omit newly added tools.","schema":{"description":"Refresh tools using your credentials. Otherwise results may reuse another workspace member's recent discovery and omit newly added tools.","type":"boolean"}}],"responses":{"200":{"description":"Tools discovered so far. Limits or later-page failures can leave the inventory incomplete; the response has no truncation indicator or pagination.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListMcpServerToolsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"name":"search_docs","description":"Search the internal documentation","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Search terms"}},"required":["query"]},"serverId":"mcp-3f7a9c21","serverName":"Docs server"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/skills":{"get":{"operationId":"listSkills","summary":"List skills","description":"List workspace and built-in skills with cursor pagination. Built-in skills are read-only. Skill bodies are omitted; use Get skill to read content. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"skills.list","x-oauth-scope":"api:read","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the skill.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the skill name.","schema":{"description":"Case-insensitive substring match against the skill name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum skills to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum skills to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Skills available in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListSkillsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"How support should handle refund requests","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createSkill","summary":"Create skill","description":"Create a workspace skill with a unique kebab-case name that is not reserved by a built-in skill. Requires workspace write access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"skills.create","x-oauth-scope":"api:write","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Definition of a new skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateSkillRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"refund-policy","description":"How support should handle refund requests","content":"# Refund policy\n\nAlways check the order date first."}}}}}},"responses":{"201":{"description":"The skill was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateSkillResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"How support should handle refund requests","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","content":"# Refund policy\n\nAlways check the order date first."}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/skills/{skillId}":{"get":{"operationId":"getSkill","summary":"Get skill","description":"Get a workspace or built-in skill, including its full instructions. Built-in skills are read-only. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"skills.read","x-oauth-scope":"api:read","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"skillId","in":"path","required":true,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`.","schema":{"type":"string","minLength":1,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the skill.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."}}],"responses":{"200":{"description":"The skill.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetSkillResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"How support should handle refund requests","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","content":"# Refund policy\n\nAlways check the order date first."}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateSkill","summary":"Update skill","description":"Update a workspace skill. Omitted fields remain unchanged. Requires skill editor or workspace Admin access; workspace write access alone does not grant editor access. Built-in skills cannot be changed. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"skills.update","x-oauth-scope":"api:write","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"skillId","in":"path","required":true,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`.","schema":{"type":"string","minLength":1,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."}}],"requestBody":{"required":true,"description":"Skill fields to change; at least one editable field is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateSkillRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","description":"Updated refund guidance"}}}}}},"responses":{"200":{"description":"The updated skill.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateSkillResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"Updated refund guidance","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","content":"# Refund policy\n\nAlways check the order date first."}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteSkill","summary":"Delete skill","description":"Delete a workspace skill. Requires skill editor or workspace Admin access. Built-in skills cannot be deleted. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"skills.delete","x-oauth-scope":"api:write","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"skillId","in":"path","required":true,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`.","schema":{"type":"string","minLength":1,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the skill.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."}}],"responses":{"200":{"description":"The skill was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteSkillResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/skills/{skillId}/editors":{"get":{"operationId":"listSkillEditors","summary":"List skill editors","description":"List explicit skill editors and workspace Admins with cursor pagination. Built-in skills return an empty list. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"skills.editors.list","x-oauth-scope":"api:read","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"skillId","in":"path","required":true,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`.","schema":{"type":"string","minLength":1,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the skill.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"email","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["email","name"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum skill editors to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum skill editors to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Users who can edit the skill.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListSkillEditorsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"email":"jane@example.com","name":"Jane Smith","image":null,"isWorkspaceAdmin":false}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"grantSkillEditor","summary":"Grant skill editor","description":"Grant skill editor access to a current workspace member by email. Requires an existing skill editor or workspace Admin. Workspace Admins already have derived access and cannot receive explicit grants. Existing grants return `200`; new grants return `201`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"skills.editors.grant","x-oauth-scope":"api:write","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"skillId","in":"path","required":true,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`.","schema":{"type":"string","minLength":1,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."}}],"requestBody":{"required":true,"description":"Workspace scope and email of the member to grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GrantSkillEditorRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","email":"jane@example.com"}}}}}},"responses":{"200":{"description":"The workspace member was already a skill editor.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GrantSkillEditorResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"email":"jane@example.com","name":"Jane Smith","image":null,"isWorkspaceAdmin":false}}}}}}},"201":{"description":"The skill editor grant was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GrantSkillEditorResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"email":"jane@example.com","name":"Jane Smith","image":null,"isWorkspaceAdmin":false}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"revokeSkillEditor","summary":"Revoke skill editor","description":"Revoke an explicit skill editor grant by email. Requires an existing skill editor or workspace Admin. Workspace Admins have derived access that cannot be revoked. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"skills.editors.revoke","x-oauth-scope":"api:write","tags":["Skills"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"skillId","in":"path","required":true,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`.","schema":{"type":"string","minLength":1,"description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the skill.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."}},{"name":"email","in":"query","required":true,"description":"Email address of a current workspace member.","schema":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email address of a current workspace member."}}],"responses":{"200":{"description":"The explicit editor grant was revoked.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_RevokeSkillEditorResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"email":"jane@example.com","revoked":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/custom-tools":{"get":{"operationId":"listCustomTools","summary":"List custom tools","description":"List code-backed custom tools in the workspace with cursor pagination. Each entry includes its declaration and implementation. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"custom_tools.list","x-oauth-scope":"api:read","tags":["Custom Tools"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the custom tool.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the custom tool."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the tool title.","schema":{"description":"Case-insensitive substring match against the tool title.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["title","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum custom tools to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum custom tools to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Custom tools defined in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListCustomToolsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createCustomTool","summary":"Create custom tool","description":"Create a code-backed custom tool. Its title must be unique within the workspace because tools resolve by title at call time. Requires workspace write access.\n\nOAuth scope: `api:write`.","x-sim-operation":"custom_tools.create","x-oauth-scope":"api:write","tags":["Custom Tools"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Definition and implementation of a new custom tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateCustomToolRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }"}}}}}},"responses":{"201":{"description":"The custom tool was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateCustomToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/custom-tools/{customToolId}":{"get":{"operationId":"getCustomTool","summary":"Get custom tool","description":"Get a custom tool’s declaration and code by identifier, scoped to its workspace. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"custom_tools.read","x-oauth-scope":"api:read","tags":["Custom Tools"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"customToolId","in":"path","required":true,"description":"Unique custom tool identifier.","schema":{"type":"string","minLength":1,"description":"Unique custom tool identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the custom tool.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the custom tool."}}],"responses":{"200":{"description":"The custom tool.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetCustomToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateCustomTool","summary":"Update custom tool","description":"Update a custom tool. Omitted fields remain unchanged; supplied schemas and code replace the stored versions. Titles must remain unique within the workspace. Requires workspace write access.\n\nOAuth scope: `api:write`.","x-sim-operation":"custom_tools.update","x-oauth-scope":"api:write","tags":["Custom Tools"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"customToolId","in":"path","required":true,"description":"Unique custom tool identifier.","schema":{"type":"string","minLength":1,"description":"Unique custom tool identifier."}}],"requestBody":{"required":true,"description":"Custom tool fields to change; at least one editable field is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateCustomToolRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","code":"return { ok: false }"}}}}}},"responses":{"200":{"description":"The updated custom tool.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateCustomToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: false }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteCustomTool","summary":"Delete custom tool","description":"Delete a custom tool. Agent blocks retain their configuration but can no longer call the deleted tool. Requires workspace write access.\n\nOAuth scope: `api:write`.","x-sim-operation":"custom_tools.delete","x-oauth-scope":"api:write","tags":["Custom Tools"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"customToolId","in":"path","required":true,"description":"Unique custom tool identifier.","schema":{"type":"string","minLength":1,"description":"Unique custom tool identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the custom tool.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the custom tool."}}],"responses":{"200":{"description":"The custom tool was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteCustomToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/sandboxes":{"get":{"operationId":"listSandboxes","summary":"List sandboxes","description":"List reusable dependency environments for Function blocks, including language packages, managed CLIs, and system packages. Requires workspace read access. Existing sandboxes remain visible after a plan downgrade.\n\nOAuth scope: `api:read`.","x-sim-operation":"sandboxes.list","x-oauth-scope":"api:read","tags":["Sandboxes"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the sandbox.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the sandbox."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the sandbox name.","schema":{"description":"Case-insensitive substring match against the sandbox name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum sandboxes to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum sandboxes to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Sandboxes defined in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListSandboxesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"ready","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":"2026-06-20T14:05:40.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createSandbox","summary":"Create sandbox","description":"Create a uniquely named dependency environment. Requires workspace Admin access and a configured remote Function runtime. With billing enabled, Max or Enterprise is required unless deployment entitlement overrides it; billing-disabled deployments require sandbox entitlement. Poll Get sandbox for `buildStatus`; `null` means no image build is needed. Invalid dependencies return `400` with field details. Creates and updates share a rate limit; respect `Retry-After`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"sandboxes.create","x-oauth-scope":"api:write","tags":["Sandboxes"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Name, language, and dependency set of a new sandbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateSandboxRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"systemPackages":["graphviz"]}}}}}},"responses":{"201":{"description":"The sandbox was created; a build is scheduled where the deployment prebuilds images.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateSandboxResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"pending","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":null,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/sandboxes/{sandboxId}":{"get":{"operationId":"getSandbox","summary":"Get sandbox","description":"Get a sandbox’s dependency configuration, current build state, and any build failure. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"sandboxes.read","x-oauth-scope":"api:read","tags":["Sandboxes"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"sandboxId","in":"path","required":true,"description":"Unique sandbox identifier.","schema":{"type":"string","minLength":1,"description":"Unique sandbox identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the sandbox.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the sandbox."}}],"responses":{"200":{"description":"The sandbox.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetSandboxResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"ready","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":"2026-06-20T14:05:40.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateSandbox","summary":"Update sandbox","description":"Update a sandbox; omitted fields stay unchanged and supplied lists replace their contents. Dependency changes may start a build; resending a failed specification retries it. `buildStatus: null` means no image build is needed. Requires workspace Admin access and a configured remote Function runtime. With billing enabled, Max or Enterprise is required unless deployment entitlement overrides it; billing-disabled deployments require sandbox entitlement. Creates and updates share a rate limit; respect `Retry-After`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"sandboxes.update","x-oauth-scope":"api:write","tags":["Sandboxes"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"sandboxId","in":"path","required":true,"description":"Unique sandbox identifier.","schema":{"type":"string","minLength":1,"description":"Unique sandbox identifier."}}],"requestBody":{"required":true,"description":"Sandbox fields to change; at least one editable field is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateSandboxRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","dependencies":["pandas==2.2.2","requests","pyarrow"]}}}}}},"responses":{"200":{"description":"The updated sandbox.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateSandboxResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests","pyarrow"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"pending","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":null,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteSandbox","summary":"Delete sandbox","description":"Delete a sandbox. Function blocks using it fail until reconfigured. Requires workspace Admin access and sandbox entitlement: with billing enabled, Max or Enterprise is required unless deployment entitlement overrides it; billing-disabled deployments require sandbox entitlement. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"sandboxes.delete","x-oauth-scope":"api:write","tags":["Sandboxes"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"sandboxId","in":"path","required":true,"description":"Unique sandbox identifier.","schema":{"type":"string","minLength":1,"description":"Unique sandbox identifier."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace that owns the sandbox.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the sandbox."}}],"responses":{"200":{"description":"The sandbox was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteSandboxResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"V1StGXR8Z5jdHi6BmyT","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/credentials":{"get":{"operationId":"listCredentials","summary":"List credentials","description":"List OAuth and service-account connections visible to the caller. Requires workspace read access. Stored tokens, keys, and service-account payloads are omitted.\n\nOAuth scope: `api:read`.","x-sim-operation":"credentials.connections.list","x-oauth-scope":"api:read","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose credentials should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose credentials should be listed."}},{"name":"type","in":"query","required":false,"description":"Restrict results to this credential type.","schema":{"description":"Restrict results to this credential type.","type":"string","enum":["oauth","service_account"]}},{"name":"providerId","in":"query","required":false,"description":"Restrict results to credentials for this integration provider.","schema":{"description":"Restrict results to credentials for this integration provider.","type":"string","minLength":1}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the credential display name.","schema":{"description":"Case-insensitive substring match against the credential display name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["displayName","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum credentials to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum credentials to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Credentials visible to the caller.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListCredentialsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createServiceAccountCredential","summary":"Create service-account credential","description":"Verify and store a service-account credential. Use the fields from List credential providers, encoded as a JSON object string in `credentials`. Requires workspace write access. A matching source returns the existing credential with `200`; creation returns `201`. Stored secrets are omitted from the response. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"credentials.service_accounts.create","x-oauth-scope":"api:write","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Provider identifier, optional display metadata, and a write-only JSON object string containing the fields declared by provider discovery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateServiceAccountCredentialRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","type":"service_account","providerId":"zoom-service-account","displayName":"Zoom automation","credentials":"{\"clientId\":\"YOUR_CLIENT_ID\",\"clientSecret\":\"YOUR_CLIENT_SECRET\",\"orgId\":\"YOUR_ACCOUNT_ID\"}"}}}}}},"responses":{"200":{"description":"An existing credential matched the verified source.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateServiceAccountCredentialResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"201":{"description":"The service-account credential was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateServiceAccountCredentialResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/credentials/providers":{"get":{"operationId":"listCredentialProviders","summary":"List credential providers","description":"List OAuth and service-account connection methods and their availability. OAuth options provide provider IDs for browser connections; service-account methods declare required fields and write-only secrets. Supports provider-name search. Returns one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.","x-sim-operation":"credentials.providers.list","x-oauth-scope":"api:read","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace used to evaluate credential-provider availability and integration policy.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace used to evaluate credential-provider availability and integration policy."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the credential provider name.","schema":{"description":"Case-insensitive substring match against the credential provider name.","type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Credential provider catalog with caller-specific availability.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListCredentialProvidersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"type":"oauth","serviceId":"salesforce","name":"Salesforce","description":"Connect to Salesforce CRM data and operations.","providerFamily":"salesforce","available":true,"supportsReconnect":true,"fields":[],"authorizationOptions":[{"providerId":"salesforce","label":"Production"},{"providerId":"salesforce-sandbox","label":"Sandbox"}]},{"type":"service_account","serviceId":"zoom-service-account","providerId":"zoom-service-account","name":"Zoom server-to-server app","description":"Connect Zoom with a server-to-server app.","providerFamily":"zoom","available":true,"docsUrl":"https://docs.sim.ai/integrations/zoom-service-account","requiresClientGeneratedCredentialId":false,"fields":[{"id":"clientId","label":"Client ID","placeholder":"Paste the client ID","required":true,"secret":false,"multiline":false},{"id":"clientSecret","label":"Client secret","placeholder":"Paste the client secret","required":true,"secret":true,"multiline":false},{"id":"orgId","label":"Account ID","placeholder":"Paste the account ID","required":true,"secret":false,"multiline":false}]}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/credentials/connections":{"post":{"operationId":"createCredentialConnection","summary":"Create credential connection","description":"Create a short-lived browser URL to connect an OAuth provider or reconnect a credential. Requires workspace write access; reconnecting also requires credential Admin access. Open the URL, sign in as the acting user, complete provider authorization, then refresh List credentials. QuickBooks requires caller-managed `oauthClientConfig` for either flow. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"credentials.connections.create","x-oauth-scope":"api:write","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"Provide workspaceId for every flow. For a new connection, send providerId and displayName; for a reconnect, send credentialId and retain the existing name. QuickBooks also requires oauthClientConfig for either flow; omit it for other providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateCredentialConnectionBody"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","providerId":"slack","displayName":"Support Slack"}},"example2":{"summary":"Request example 2","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","credentialId":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}},"example3":{"summary":"Request example 3","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","providerId":"quickbooks","displayName":"Accounting","oauthClientConfig":{"clientId":"YOUR_INTUIT_CLIENT_ID","clientSecret":"YOUR_INTUIT_CLIENT_SECRET","environment":"sandbox","webhookVerifierToken":"YOUR_WEBHOOK_VERIFIER_TOKEN"}}}}}}},"responses":{"200":{"description":"A short-lived browser authorization URL.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateCredentialConnectionResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"authorizationUrl":"https://www.sim.ai/api/auth/oauth2/authorize?draftId=draft-123","expiresAt":"2026-06-20T14:17:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/credentials/{credentialId}":{"delete":{"operationId":"deleteCredential","summary":"Disconnect credential","description":"Disconnect an OAuth or service-account credential and clear its stored workflow, deployment, paused-run, knowledge-connector, and webhook references. Requires credential Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"credentials.delete","x-oauth-scope":"api:write","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"credentialId","in":"path","required":true,"description":"Credential to disconnect.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Credential to disconnect."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace expected to own the credential.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace expected to own the credential."}}],"responses":{"200":{"description":"The credential was disconnected.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteCredentialResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateCredential","summary":"Update credential","description":"Rename an OAuth or service-account credential, change its description, or rotate a service-account secret. Omitted metadata remains unchanged. Rotation requires the provider’s required secret fields to be resubmitted; it replaces the verified secret while retaining the credential ID. Requires credential Admin access. Provider rejection keeps the old secret and returns `400` with `providerErrorCode`; outages return `503`. Secret fields sent for an OAuth credential return `400`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"credentials.update","x-oauth-scope":"api:write","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"credentialId","in":"path","required":true,"description":"Credential to update.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Credential to update."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace expected to own the credential.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace expected to own the credential."}}],"requestBody":{"required":true,"description":"Metadata fields to change, or the complete required fields for a service-account secret rotation. Use List credential providers for the selected provider’s fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateCredentialRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"displayName":"Billing automation"}},"example2":{"summary":"Request example 2","value":{"clientId":"YOUR_CLIENT_ID","clientSecret":"YOUR_ROTATED_CLIENT_SECRET","orgId":"YOUR_ACCOUNT_ID"}}}}}},"responses":{"200":{"description":"The updated credential without secret material.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateCredentialResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/secrets":{"get":{"operationId":"listSecrets","summary":"List secrets","description":"List workspace secrets visible to the caller and caller-owned personal secrets. Only workspace secrets marked `unredacted` can include values; every other entry contains metadata only. Requires workspace read access. Personal secrets belong to the caller across workspaces. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"secrets.list","x-oauth-scope":"api:read","tags":["Secrets"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose secret metadata should be listed.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose secret metadata should be listed."}},{"name":"scope","in":"query","required":false,"description":"Restrict results to one ownership scope.","schema":{"description":"Restrict results to one ownership scope.","type":"string","enum":["workspace","personal"]}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the secret name.","schema":{"description":"Case-insensitive substring match against the secret name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum secrets to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum secrets to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"Secret metadata visible to the caller.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListSecretsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"name":"STRIPE_API_KEY","scope":"workspace","description":"Production billing key — rotate quarterly.","unredacted":false,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"},{"name":"STAGING_BASE_URL","scope":"workspace","description":"Staging environment base URL.","unredacted":true,"role":"member","createdAt":"2026-06-03T11:30:00.000Z","updatedAt":"2026-06-21T08:45:09.000Z","value":"https://staging.example.com"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/secrets/{name}":{"put":{"operationId":"setSecret","summary":"Set secret","description":"Create or replace a workspace or caller-owned personal secret. New workspace secrets require workspace write access; existing ones require workspace Admin or secret Admin access. Omit `value` to update an existing workspace secret’s metadata; a missing secret returns `404`. Personal secrets always require `value`. This operation returns metadata only; List secrets can reveal permitted workspace values marked `unredacted`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"secrets.set","x-oauth-scope":"api:write","tags":["Secrets"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"name","in":"path","required":true,"description":"Secret to create or replace.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_]+$","description":"Secret to create or replace."}}],"requestBody":{"required":true,"description":"Ownership scope and write-only value for the secret. A workspace secret may instead send description or unredacted alone, without a value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SetSecretRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","scope":"workspace","value":"YOUR_SECRET_VALUE"}},"example2":{"summary":"Request example 2","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","scope":"workspace","unredacted":false}}}}}},"responses":{"200":{"description":"The existing secret value was replaced, or its metadata was updated in place.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SetSecretResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"name":"STRIPE_API_KEY","scope":"workspace","description":"Production billing key — rotate quarterly.","unredacted":false,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"201":{"description":"The secret was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SetSecretResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"name":"STRIPE_API_KEY","scope":"workspace","description":"Production billing key — rotate quarterly.","unredacted":false,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteSecret","summary":"Delete secret","description":"Delete a workspace or caller-owned personal secret without returning its value. Workspace secrets require workspace Admin or secret Admin access. Deleting a personal secret removes it for the caller across all workspaces. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"secrets.delete","x-oauth-scope":"api:write","tags":["Secrets"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"name","in":"path","required":true,"description":"Secret to delete.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_]+$","description":"Secret to delete."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace the request is authorized against. A workspace secret is deleted from it; a personal secret is deleted for the caller in all of their workspaces.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace the request is authorized against. A workspace secret is deleted from it; a personal secret is deleted for the caller in all of their workspaces."}},{"name":"scope","in":"query","required":true,"description":"Whether the secret belongs to the workspace or to the caller. A personal secret belongs to the caller across every workspace, not to one workspace.","schema":{"type":"string","enum":["workspace","personal"],"description":"Whether the secret belongs to the workspace or to the caller. A personal secret belongs to the caller across every workspace, not to one workspace."}}],"responses":{"200":{"description":"The secret was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteSecretResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"name":"STRIPE_API_KEY","scope":"workspace","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/meta":{"get":{"operationId":"getApiMeta","summary":"Get API status","description":"Get the calling credential’s type and expiry. Requires a valid API key or OAuth access token. `v2Enabled` is true whenever this endpoint is served; the response does not enumerate resource permissions.\n\nOAuth scope: `api:read`.","x-sim-operation":"meta.capabilities.read","x-oauth-scope":"api:read","tags":["Meta"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"responses":{"200":{"description":"Availability and lifecycle facts about the calling credential.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetApiMetaResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"v2Enabled":true,"keyType":"personal","expiresAt":null}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workflow-mcp-servers":{"get":{"operationId":"listWorkflowMcpServers","summary":"List workflow MCP servers","description":"List MCP servers that expose deployed workflows to external clients. Use List MCP servers for external servers Sim calls. Requires workspace read access. Tool names share a 2,000-name page limit; when `toolNamesTruncated` is true, `toolCount` and `toolNames` may be incomplete. Use List workflow MCP tools for a server’s bounded inventory. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"mcp_servers.workflow_deployments.list","x-oauth-scope":"api:read","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose workflow MCP servers to list.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose workflow MCP servers to list."}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum workflow-MCP servers to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum workflow-MCP servers to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of workflow MCP servers.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListWorkflowMcpServersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":false,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z","toolCount":1,"toolNames":["triage_ticket"]}],"nextCursor":null,"toolNamesTruncated":false}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createWorkflowMcpServer","summary":"Create workflow MCP server","description":"Create an MCP server exposing deployed workflows as tools. Every supplied workflow must already be deployed. With `isPublic: true`, anyone holding the server URL can execute its workflows without a Sim API key. Requires workspace Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.workflow_deployments.create_server","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"requestBody":{"required":true,"description":"A new workflow MCP server and deployed workflows to expose as tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateWorkflowMcpServerRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","name":"Support agents","workflowIds":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}}}}}},"responses":{"201":{"description":"The workflow MCP server.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateWorkflowMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":false,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workflow-mcp-servers/{serverId}":{"get":{"operationId":"getWorkflowMcpServer","summary":"Get workflow MCP server","description":"Get a workflow MCP server’s metadata and client endpoint. Use List workflow MCP tools for its inventory. Requires workspace read access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"mcp_servers.workflow_deployments.read_server","x-oauth-scope":"api:read","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"serverId","in":"path","required":true,"description":"Unique workflow-MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow-MCP server identifier."}}],"responses":{"200":{"description":"The MCP server.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetWorkflowMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":false,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateWorkflowMcpServer","summary":"Update workflow MCP server","description":"Update a workflow MCP server’s name, description, or public access. Omitted fields stay unchanged; `description: null` clears the description. With `isPublic: true`, anyone holding its URL can execute its tools without a Sim API key. Deploy or undeploy tools separately. Requires workspace Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.workflow_deployments.update_server","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"serverId","in":"path","required":true,"description":"Unique workflow-MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow-MCP server identifier."}}],"requestBody":{"required":true,"description":"Server fields to change. Omitted fields remain unchanged; `description: null` clears the description.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateWorkflowMcpServerRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"isPublic":true}}}}}},"responses":{"200":{"description":"The updated MCP server.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateWorkflowMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":true,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteWorkflowMcpServer","summary":"Delete workflow MCP server","description":"Delete a workflow MCP server and stop serving its tools. Its workflows remain deployed and executable through the workflow API. Requires workspace Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.workflow_deployments.delete_server","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"serverId","in":"path","required":true,"description":"Unique workflow-MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow-MCP server identifier."}}],"responses":{"200":{"description":"The workflow MCP server was deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteWorkflowMcpServerResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workflow-mcp-servers/{serverId}/tools":{"get":{"operationId":"listWorkflowMcpTools","summary":"List workflow MCP tools","description":"List tool registrations ordered by name, including the `workflowId` used to remove each registration. Undeploying a workflow makes its registrations `inactive`; redeploying reactivates them. Results are capped at 2,000 tools: `nextCursor` is always null, and `truncated` marks an incomplete inventory that cannot be paginated. Requires workspace read access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"mcp_servers.workflow_deployments.list_tools","x-oauth-scope":"api:read","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"serverId","in":"path","required":true,"description":"Unique workflow-MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow-MCP server identifier."}}],"responses":{"200":{"description":"Tool registrations on this server, including inactive registrations.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListWorkflowMcpToolsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"wfmcptool_01J8ZK3QW4M6X2R9T7B5C0V3","serverId":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","toolName":"triage_ticket","toolDescription":"Execute Ticket triage workflow","mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","apiEndpoint":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/execute","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z","status":"active"}],"nextCursor":null,"truncated":false}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"deployWorkflowMcpTool","summary":"Deploy workflow as MCP tool","description":"Deploy a workflow as an MCP tool using its deployed input schema. The workflow must already be deployed. Each server has at most one tool per workflow; repeating the call replaces the tool and returns `200` with `updated: true`. Requires workspace Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.workflow_deployments.deploy_tool","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"serverId","in":"path","required":true,"description":"Unique workflow-MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow-MCP server identifier."}}],"requestBody":{"required":true,"description":"The deployed workflow and tool metadata presented to MCP clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeployWorkflowMcpToolRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","toolName":"triage_ticket"}}}}}},"responses":{"200":{"description":"The deployed MCP tool registration.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeployWorkflowMcpToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wfmcptool_01J8ZK3QW4M6X2R9T7B5C0V3","serverId":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","toolName":"triage_ticket","toolDescription":"Execute Ticket triage workflow","mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","apiEndpoint":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/execute","updated":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workflow-mcp-servers/{serverId}/tools/{workflowId}":{"delete":{"operationId":"undeployWorkflowMcpTool","summary":"Undeploy workflow MCP tool","description":"Remove an MCP tool registration by its workflow ID. The workflow’s API deployment remains active. Requires workspace Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"mcp_servers.workflow_deployments.undeploy_tool","x-oauth-scope":"api:write","tags":["MCP Servers"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"serverId","in":"path","required":true,"description":"Unique workflow-MCP server identifier.","schema":{"type":"string","minLength":1,"description":"Unique workflow-MCP server identifier."}},{"name":"workflowId","in":"path","required":true,"description":"Workflow registered as an MCP tool on this server.","schema":{"type":"string","minLength":1,"description":"Workflow registered as an MCP tool on this server."}}],"responses":{"200":{"description":"The tool was removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UndeployWorkflowMcpToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"wfmcptool_01J8ZK3QW4M6X2R9T7B5C0V3","serverId":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/blocks":{"get":{"operationId":"listBlocks","summary":"List blocks","description":"List built-in and workspace-deployed blocks visible to the caller. Integration allowlists and preview visibility restrict results. Use `capability=trigger` for workflow starters and Get block or Get tool to resolve operation and tool IDs.\n\nOAuth scope: `api:read`.","x-sim-operation":"catalog.blocks.list","x-oauth-scope":"api:read","tags":["Catalog"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the block id, name, and description.","schema":{"description":"Case-insensitive substring match against the block id, name, and description.","type":"string","minLength":1,"maxLength":200}},{"name":"category","in":"query","required":false,"description":"Restrict to one toolbar category.","schema":{"description":"Restrict to one toolbar category.","type":"string","enum":["blocks","tools","triggers"]}},{"name":"capability","in":"query","required":false,"description":"Restrict to blocks that can start a workflow — the `triggers` category, blocks declaring `triggerAllowed`, and blocks with trigger-mode fields.","schema":{"description":"Restrict to blocks that can start a workflow — the `triggers` category, blocks declaring `triggerAllowed`, and blocks with trigger-mode fields.","type":"string","enum":["trigger"]}},{"name":"source","in":"query","required":false,"description":"Restrict to shipped blocks or to this workspace’s deployed custom blocks.","schema":{"description":"Restrict to shipped blocks or to this workspace’s deployed custom blocks.","type":"string","enum":["builtin","custom"]}},{"name":"includeSunset","in":"query","required":false,"description":"Include `legacy` and `deprecated` blocks. Off by default: a sunset block keeps executing where it is already placed, but it is not offered for new authoring. Each returned entry carries `sunset.replacedBy`, the block to build with instead.","schema":{"description":"Include `legacy` and `deprecated` blocks. Off by default: a sunset block keeps executing where it is already placed, but it is not offered for new authoring. Each returned entry carries `sunset.replacedBy`, the block to build with instead.","type":"boolean"}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"id","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["id","name","category"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum blocks to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum blocks to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of blocks available in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListBlocksResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"slack","name":"Slack","description":"Send messages and read channels in Slack.","category":"tools","integrationType":"communication","source":"builtin","authMode":"oauth","triggerAllowed":true,"triggerCapable":true,"triggerIds":["slack_webhook"],"toolIds":["slack_message","slack_canvas_read"],"operationIds":["send","read"],"preview":false,"docsLink":"https://docs.sim.ai/tools/slack","tags":["messaging"]}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/blocks/{blockId}":{"get":{"operationId":"getBlock","summary":"Get block","description":"Get a block's fields, conditions, operations, tool schemas, and triggers. Unversioned types resolve to the newest visible version; the returned `id` identifies that version. Hidden or missing blocks return `404`.\n\nOAuth scope: `api:read`.","x-sim-operation":"catalog.blocks.read","x-oauth-scope":"api:read","tags":["Catalog"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"blockId","in":"path","required":true,"description":"Block type identifier. An unversioned base type resolves to the newest visible version. The response echoes the resolved ID.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Block type identifier. An unversioned base type resolves to the newest visible version. The response echoes the resolved ID."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains."}}],"responses":{"200":{"description":"The block.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetBlockResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"slack","name":"Slack","description":"Send messages and read channels in Slack.","category":"tools","integrationType":"communication","source":"builtin","authMode":"oauth","triggerAllowed":true,"triggerCapable":true,"triggerIds":["slack_webhook"],"toolIds":["slack_message","slack_canvas_read"],"operationIds":["send","read"],"preview":false,"docsLink":"https://docs.sim.ai/tools/slack","tags":["messaging"],"inputSchema":[{"id":"operation","type":"dropdown","title":"Operation","required":true,"options":[{"id":"send","label":"Send message"},{"id":"read","label":"Read messages"}]}],"operationInputSchema":{"send":[{"id":"text","type":"long-input","title":"Message","required":true}]},"inputDefinitions":{"channel":{"type":"string","description":"Channel to post into."}},"operations":{"send":{"toolId":"slack_message","toolName":"Slack Send Message","description":"Send a message to a Slack channel.","inputs":{"text":{"type":"string","required":true,"description":"Message body."}},"outputs":{"ts":{"type":"string","description":"Message timestamp."}},"inputSchema":[{"id":"text","type":"long-input","title":"Message","required":true}]}},"tools":[{"id":"slack_message","name":"Slack Send Message","description":"Send a message to a Slack channel.","version":"1.0.0","hostedApiKey":"none","oauth":{"required":true,"provider":"slack","requiredScopes":["chat:write"]},"params":{"text":{"type":"string","required":true,"description":"Message body."}},"outputs":{"ts":{"type":"string","description":"Message timestamp."}}}],"triggers":[{"id":"slack_webhook","outputs":{"text":{"type":"string","description":"Message text."}},"configFields":{"channels":{"type":"short-input","required":false,"title":"Channels"}}}],"outputs":{"ts":{"type":"string","description":"Message timestamp."}}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/tools":{"get":{"operationId":"listTools","summary":"List tools","description":"List built-in tools exposed by blocks visible to the caller. Use List MCP server tools for an external server's tools and List custom tools for workspace code-backed tools.\n\nOAuth scope: `api:read`.","x-sim-operation":"catalog.tools.list","x-oauth-scope":"api:read","tags":["Catalog"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the tool id, name, and description.","schema":{"description":"Case-insensitive substring match against the tool id, name, and description.","type":"string","minLength":1,"maxLength":200}},{"name":"hostedApiKey","in":"query","required":false,"description":"Restrict to tools by how their API key is supplied.","schema":{"description":"Restrict to tools by how their API key is supplied.","type":"string","enum":["always","conditional","none"]}},{"name":"oauthProvider","in":"query","required":false,"description":"Restrict to tools that authenticate against this OAuth service.","schema":{"description":"Restrict to tools that authenticate against this OAuth service.","type":"string","minLength":1,"maxLength":255}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"id","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["id","name"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum tools to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum tools to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of built-in tools available in the workspace.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListToolsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"slack_message","name":"Slack Send Message","description":"Send a message to a Slack channel.","version":"1.0.0","hostedApiKey":"none","oauth":{"required":true,"provider":"slack","requiredScopes":["chat:write"]}}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/tools/{toolId}":{"get":{"operationId":"getTool","summary":"Get tool","description":"Get a built-in tool’s parameters and outputs. An exact visible ID is retained; an unversioned name resolves to the newest visible family version. The returned `id` identifies that tool. Hidden or missing tools return `404`. Requires workspace read access.\n\nOAuth scope: `api:read`.","x-sim-operation":"catalog.tools.read","x-oauth-scope":"api:read","tags":["Catalog"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"toolId","in":"path","required":true,"description":"Tool identifier. An exact visible ID is retained; an unversioned name resolves to the newest visible family version. The response echoes the resolved ID.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Tool identifier. An exact visible ID is retained; an unversioned name resolves to the newest visible family version. The response echoes the resolved ID."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what this catalog contains."}}],"responses":{"200":{"description":"The tool.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"slack_message","name":"Slack Send Message","description":"Send a message to a Slack channel.","version":"1.0.0","hostedApiKey":"none","oauth":{"required":true,"provider":"slack","requiredScopes":["chat:write"]},"params":{"channel":{"type":"string","required":true,"description":"Channel ID to post into."},"text":{"type":"string","required":true,"description":"Message body."}},"outputs":{"ts":{"type":"string","description":"Message timestamp."}}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/tools/{toolId}/execute":{"post":{"operationId":"executeTool","summary":"Run tool","description":"Run a built-in tool using published parameter IDs. Requires workspace read access. Sim resolves `credentialId`, hosted keys, and whole-value `{{VAR_NAME}}` references in `user-only` parameters; other values pass through unchanged. Send connected credentials as top-level `credentialId`, not inside `input`. Third-party refusal returns `200` with `status: \"failed\"`; API failures use the error envelope. Hidden or missing tools return `404`; disallowed integrations return `403` with `error.details.code: INTEGRATION_NOT_ALLOWED`. Hosted-key usage is billed to the workspace. A call that would use a hosted key returns `402` when the workspace exceeds usage or billing limits. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"tools.execute","x-oauth-scope":"api:write","tags":["Catalog"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"toolId","in":"path","required":true,"description":"Tool identifier. An exact visible ID is retained; an unversioned name resolves to the newest visible family version. The response echoes the resolved ID.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Tool identifier. An exact visible ID is retained; an unversioned name resolves to the newest visible family version. The response echoes the resolved ID."}}],"requestBody":{"required":true,"description":"Workspace, accepted tool arguments, and optional connected credential. Hidden fields and credential aliases inside input are rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ExecuteToolRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","input":{"channel":"C0123456789","text":"Deploy finished."},"credentialId":"cred_01J8ZK3QW4M6X2R9T7B5C0V2"}}}}}},"responses":{"200":{"description":"The outcome of the tool call.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ExecuteToolResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"toolId":"slack_message","status":"succeeded","output":{"ts":"1718191234.004500"},"error":null}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"402":{"$ref":"#/components/responses/Resources_UsageLimitExceeded"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/connector-types":{"get":{"operationId":"listConnectorTypes","summary":"List connector types","description":"List connector types from the deployment’s knowledge-base connector registry. Requires workspace read access and Knowledge Base access; workspace integration allowlists and revealed preview blocks do not filter this catalog. Results default to 25 summaries per page. `detail=full` adds configuration fields. Fields with `multi: true` accept `string[]`. For picker/manual-entry pairs, send one value under `canonicalParamId`, not the field’s `id`.\n\nOAuth scope: `api:read`.","x-sim-operation":"catalog.connector_types.list","x-oauth-scope":"api:read","tags":["Catalog"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"description":"Workspace used to authorize Knowledge Base access to the deployment’s connector-type registry. Workspace integration allowlists and revealed preview blocks do not filter this catalog.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace used to authorize Knowledge Base access to the deployment’s connector-type registry. Workspace integration allowlists and revealed preview blocks do not filter this catalog."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the connector name.","schema":{"description":"Case-insensitive substring match against the connector name.","type":"string","minLength":1,"maxLength":200}},{"name":"detail","in":"query","required":false,"description":"Projection of each item. `summary` (the default) carries the identifier, name, description, and auth mode; `full` adds the version, the complete auth settings, the `sourceConfig` field schema, incremental-sync support, and tag definitions.","schema":{"default":"summary","description":"Projection of each item. `summary` (the default) carries the identifier, name, description, and auth mode; `full` adds the version, the complete auth settings, the `sourceConfig` field schema, incremental-sync support, and tag definitions.","type":"string","enum":["summary","full"]}},{"name":"limit","in":"query","required":false,"description":"Maximum connector types to return per page. Must be a whole number from 1 to 100. Defaults to 25.","schema":{"default":25,"description":"Maximum connector types to return per page. Must be a whole number from 1 to 100. Defaults to 25.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"One page of the connector-type catalog.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListConnectorTypesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"connectorType":"google_drive","name":"Google Drive","description":"Sync documents from Google Drive","auth":{"mode":"oauth"}}],"nextCursor":null}},"example2":{"summary":"Response example 2","value":{"data":[{"connectorType":"google_drive","name":"Google Drive","description":"Sync documents from Google Drive","version":"1.0.0","auth":{"mode":"oauth","provider":"google-drive","requiredScopes":["https://www.googleapis.com/auth/drive"]},"configFields":[{"id":"adminEmail","title":"Crawl as","type":"short-input","placeholder":"admin@yourcompany.com","required":false,"description":"The Google Workspace user this service account acts as when fetching content for connected members."},{"id":"userEmails","title":"Users","type":"short-input","placeholder":"All active Google Workspace users","required":false,"description":"Optional primary email addresses, separated by commas (up to 100). Leave blank to index all active users across this Google Workspace customer.","multi":true},{"id":"openSharing","title":"Openly shared files","type":"dropdown","placeholder":"Keep out of search","required":false,"description":"Files shared beyond named people and groups. Kept out of search by default, because a domain-wide or public share is more often an accident than an intention. Never applies to link-only shares, which stay unsearchable.","options":[{"label":"Keep out of search","id":"none"},{"label":"Anyone in the domain can find","id":"domain"},{"label":"Anyone can find","id":"anyone"}]},{"id":"folderSelector","title":"Folders","type":"selector","placeholder":"Select one or more folders (optional)","required":false,"description":"Includes files in each selected folder and its accessible subfolders.","selectorKey":"google.drive","mimeType":"application/vnd.google-apps.folder","mode":"basic","canonicalParamId":"folderId","multi":true},{"id":"folderId","title":"Folder IDs","type":"short-input","placeholder":"e.g. 1aBcDeFg…, 2cDeFgHi… (comma-separated for multiple)","required":false,"description":"Includes files in each selected folder and its accessible subfolders.","mode":"advanced","canonicalParamId":"folderId","multi":true},{"id":"fileType","title":"File Type","type":"dropdown","required":false,"options":[{"label":"All supported files","id":"all"},{"label":"Google Docs only","id":"documents"},{"label":"Google Sheets only","id":"spreadsheets"},{"label":"Google Slides only","id":"presentations"},{"label":"Plain text files only","id":"text"}]},{"id":"maxFiles","title":"Max Files","type":"short-input","placeholder":"e.g. 500 (default: unlimited)","required":false}],"supportsIncrementalSync":false,"tagDefinitions":[{"id":"owners","displayName":"Owner","fieldType":"text"},{"id":"fileType","displayName":"File Type","fieldType":"text"},{"id":"lastModified","displayName":"Last Modified","fieldType":"date"},{"id":"starred","displayName":"Starred","fieldType":"boolean"}]}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/permission-groups":{"get":{"operationId":"listPermissionGroups","summary":"List permission groups","description":"List permission groups in an organization with cursor pagination. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"permission_groups.list","x-oauth-scope":"api:read","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the group name.","schema":{"description":"Case-insensitive substring match against the group name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"createdAt","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt","updatedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum permission groups to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum permission groups to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of permission groups with resolved settings.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListPermissionGroupsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createPermissionGroup","summary":"Create permission group","description":"Create a permission group. A non-default group requires workspaces and initially governs everyone in them. Creating a default group demotes the previous default to an inactive group until it is assigned workspaces. Overlapping all-member scopes conflict. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"permission_groups.create","x-oauth-scope":"api:write","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}}],"requestBody":{"required":true,"description":"Group name, initial restrictions, and default or workspace-specific scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreatePermissionGroupRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"name":"Restricted","workspaceIds":["workspace-123"]}}}}}},"responses":{"201":{"description":"The created group, its resolved settings, and workspace scope.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreatePermissionGroupResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/permission-groups/{groupId}":{"get":{"operationId":"getPermissionGroup","summary":"Get permission group","description":"Get a permission group and its resolved settings. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"permission_groups.read","x-oauth-scope":"api:read","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}}],"responses":{"200":{"description":"The group, its resolved settings, and workspace scope.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetPermissionGroupResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updatePermissionGroup","summary":"Update permission group","description":"Update a permission group. Omitted fields remain unchanged; config keys are patched and supplied arrays replace their lists. Promoting a group to default demotes the previous default; demoting without workspaceIds leaves it inactive. Overlapping member or all-member scopes conflict. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"permission_groups.update","x-oauth-scope":"api:write","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}}],"requestBody":{"required":true,"description":"Group fields and restriction keys to change; supplied lists replace their contents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdatePermissionGroupRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"description":"Restricted workspace access"}}}}}},"responses":{"200":{"description":"The updated group with resolved settings and workspace scope.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdatePermissionGroupResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deletePermissionGroup","summary":"Delete permission group","description":"Permanently delete a permission group and its membership assignments. Members then inherit any other applicable restrictions. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"permission_groups.delete","x-oauth-scope":"api:write","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}}],"responses":{"200":{"description":"Acknowledgement that the group and its assignments were deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeletePermissionGroupResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"group-123","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/permission-groups/{groupId}/members":{"get":{"operationId":"listPermissionGroupMembers","summary":"List permission group members","description":"List explicit membership assignments in a permission group with cursor pagination. An empty inherit group applies to everyone in its workspaces. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"permission_groups.members.list","x-oauth-scope":"api:read","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"assignedAt","description":"Field used to sort the result.","type":"string","enum":["assignedAt","userId"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum group members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum group members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of explicit group membership assignments.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListPermissionGroupMembersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"assignment-123","userId":"user-123","assignedAt":"2026-06-01T09:00:00.000Z","userName":"Example Member","userEmail":"member@example.com","userImage":null}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"addPermissionGroupMember","summary":"Add permission group member","description":"Assign an organization member to a permission group. An existing assignment or membership in another group targeting the same workspace returns a conflict. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"permission_groups.members.add","x-oauth-scope":"api:write","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}}],"requestBody":{"required":true,"description":"The organization member to assign to this group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_AddPermissionGroupMemberRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"userId":"user-123"}}}}}},"responses":{"201":{"description":"The new explicit membership assignment.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_AddPermissionGroupMemberResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"assignment-123","permissionGroupId":"group-123","organizationId":"org-123","userId":"user-123","assignedBy":"admin-123","assignedAt":"2026-06-01T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/permission-groups/{groupId}/members/{userId}":{"delete":{"operationId":"removePermissionGroupMember","summary":"Remove permission group member","description":"Remove a member by user identifier. Removing the last member from an inherit group makes it govern everyone in its workspaces; a conflicting all-member group prevents the removal. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"permission_groups.members.remove","x-oauth-scope":"api:write","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}},{"name":"userId","in":"path","required":true,"description":"User identifier of the member to remove.","schema":{"type":"string","minLength":1,"description":"User identifier of the member to remove."}}],"responses":{"200":{"description":"Acknowledgement that the explicit assignment was removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_RemovePermissionGroupMemberResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"userId":"user-123","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/permission-groups/{groupId}/members/bulk":{"post":{"operationId":"bulkAddPermissionGroupMembers","summary":"Bulk add permission group members","description":"Assign up to 1000 selected organization members, or the entire organization roster, atomically. Existing assignments are skipped and users outside the organization are ignored. Any overlapping membership conflict rejects the entire batch. Requires organization Admin or owner access and active Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"permission_groups.members.bulk_add","x-oauth-scope":"api:write","tags":["Permission Groups"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the permission groups.","schema":{"type":"string","minLength":1,"description":"Organization that owns the permission groups."}},{"name":"groupId","in":"path","required":true,"description":"Permission group identifier.","schema":{"type":"string","minLength":1,"description":"Permission group identifier."}}],"requestBody":{"required":true,"description":"Selected organization members or the entire current organization roster.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_BulkAddPermissionGroupMembersRequest"},"examples":{"example1":{"summary":"Request example 1","value":{"userIds":["user-123"]}}}}}},"responses":{"200":{"description":"Counts of added members and existing assignments skipped.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_BulkAddPermissionGroupMembersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"added":1,"skipped":0}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations":{"get":{"operationId":"listOrganizations","summary":"List organizations","description":"List organizations the acting user belongs to. Organizations that disallow the calling credential are omitted. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the organization name.","schema":{"description":"Case-insensitive substring match against the organization name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","createdAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum organizations to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum organizations to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of organizations and the acting user’s role in each.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"org-123","name":"Example Organization","slug":"example","logo":null,"role":"admin","createdAt":"2026-06-01T09:00:00.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}":{"get":{"operationId":"getOrganization","summary":"Get organization","description":"Get organization metadata and the acting user’s organization role. Requires organization membership. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.read","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}}],"responses":{"200":{"description":"Organization metadata and the acting user’s role.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetOrganizationResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"org-123","name":"Example Organization","slug":"example","logo":null,"role":"admin","createdAt":"2026-06-01T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/workspaces":{"get":{"operationId":"listOrganizationWorkspaces","summary":"List organization workspaces","description":"List active workspaces owned by the organization. Requires organization Admin access; does not require Access Control. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.workspaces.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the workspace name.","schema":{"description":"Case-insensitive substring match against the workspace name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","id"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum workspaces to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum workspaces to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of active workspaces owned by the organization.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationWorkspacesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"workspace-123","name":"Engineering"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/members":{"get":{"operationId":"listOrganizationMembers","summary":"List organization members","description":"List organization members by name or email. Ordinary members must have access to the member directory; organization administrators retain access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.members.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against member name or email.","schema":{"description":"Case-insensitive substring match against member name or email.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","email","joinedAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of organization members and their organization roles.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationMembersResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"userId":"user-123","name":"Example Member","email":"member@example.com","role":"member","joinedAt":"2026-06-01T09:00:00.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/members/{userId}":{"patch":{"operationId":"updateOrganizationMember","summary":"Update organization member","description":"Change a member’s organization role. Requires organization Admin access. The owner’s role and memberships managed by an identity provider cannot be changed here. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organizations.members.update","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"userId","in":"path","required":true,"description":"User identifier of the organization member.","schema":{"type":"string","minLength":1,"description":"User identifier of the organization member."}}],"requestBody":{"required":true,"description":"The new organization role for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateOrganizationMemberBody"},"examples":{"example1":{"summary":"Request example 1","value":{"role":"admin"}}}}}},"responses":{"200":{"description":"The member with the updated organization role.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateOrganizationMemberResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"userId":"user-123","name":"Example Member","email":"member@example.com","role":"admin","joinedAt":"2026-06-01T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"removeOrganizationMember","summary":"Remove organization member","description":"Remove a member and revoke their access to organization workspaces. Administrators may remove members; members may remove themselves. The organization owner cannot be removed. Owned organization resources are reassigned and the departing member’s sessions end. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organizations.members.remove","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"userId","in":"path","required":true,"description":"User identifier of the organization member.","schema":{"type":"string","minLength":1,"description":"User identifier of the organization member."}}],"responses":{"200":{"description":"Acknowledgement that organization access was removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_RemoveOrganizationMemberResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"userId":"user-123","deleted":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/invitations":{"get":{"operationId":"listOrganizationInvitations","summary":"List organization invitations","description":"List invitations owned by the organization, including invitations with workspace grants. Requires organization Admin access. Expired invitations are reported without modifying them. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.invitations.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the invitee email.","schema":{"description":"Case-insensitive substring match against the invitee email.","type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"description":"Filter by current invitation status. Omit to include all statuses.","schema":{"description":"Filter by current invitation status. Omit to include all statuses.","type":"string","enum":["pending","accepted","rejected","cancelled","expired"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["email","createdAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum invitations to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum invitations to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of invitations, including their current status.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationInvitationsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createOrganizationInvitation","summary":"Create organization invitation","description":"Email an invitation to join the organization as a member or Admin. Requires organization Admin access and invitations enabled; an eligible plan and available seat are required when billing is enabled. It grants no workspace-specific permissions. Existing organization membership or an unexpired pending invitation for the email returns `409`. Use Resend organization invitation to send a pending invitation again. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organizations.invitations.create","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}}],"requestBody":{"required":true,"description":"Invitee email and organization role to offer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateOrganizationInvitationBody"},"examples":{"example1":{"summary":"Request example 1","value":{"email":"member@example.com","role":"member"}}}}}},"responses":{"201":{"description":"The pending organization invitation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateOrganizationInvitationResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/invitations/{invitationId}":{"get":{"operationId":"getOrganizationInvitation","summary":"Get organization invitation","description":"Get an invitation owned by the organization. Requires organization Admin access. Use List organization invitation workspaces to inspect its workspace grants. The response excludes the acceptance token. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.invitations.read","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"invitationId","in":"path","required":true,"description":"Invitation identifier.","schema":{"type":"string","minLength":1,"description":"Invitation identifier."}}],"responses":{"200":{"description":"Invitation metadata without its acceptance token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetOrganizationInvitationResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"revokeOrganizationInvitation","summary":"Revoke organization invitation","description":"Cancel an unexpired pending invitation and all its workspace grants so it can no longer be accepted. Requires organization Admin access. This does not remove a person who already accepted; use Remove organization member for that. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"invitations.revoke","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"invitationId","in":"path","required":true,"description":"Invitation identifier.","schema":{"type":"string","minLength":1,"description":"Invitation identifier."}}],"responses":{"200":{"description":"Acknowledgement that the pending invitation was cancelled.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_RevokeOrganizationInvitationResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"invitation-123","status":"cancelled"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/invitations/{invitationId}/workspaces":{"get":{"operationId":"listOrganizationInvitationWorkspaces","summary":"List organization invitation workspaces","description":"List workspace grants attached to an invitation of any status. Includes archived workspaces still owned by the organization; workspaces moved to another organization are omitted. Requires organization Admin access. These grants describe the invitation, not the invitee's current access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.invitations.workspaces.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"invitationId","in":"path","required":true,"description":"Invitation identifier.","schema":{"type":"string","minLength":1,"description":"Invitation identifier."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the workspace name.","schema":{"description":"Case-insensitive substring match against the workspace name.","type":"string","minLength":1,"maxLength":200}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"name","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["name","id"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum workspaces to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum workspaces to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of workspace grants attached to the invitation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationInvitationWorkspacesResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"workspace-123","name":"Engineering","permission":"write","archivedAt":null}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/invitations/{invitationId}/resend":{"post":{"operationId":"resendOrganizationInvitation","summary":"Resend organization invitation","description":"Email an unexpired pending invitation again, renew its expiry, and replace its previous acceptance link. Requires organization Admin access and current invitation eligibility. Retrying sends another email; inspect the invitation after a delivery failure before retrying. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"invitations.resend","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"invitationId","in":"path","required":true,"description":"Invitation identifier.","schema":{"type":"string","minLength":1,"description":"Invitation identifier."}}],"requestBody":{"required":false,"description":"An empty JSON object; the pending invitation supplies the recipient and role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ResendOrganizationInvitationBody"},"examples":{"example1":{"summary":"Request example 1","value":{}}}}}},"responses":{"200":{"description":"The pending invitation with its renewed expiry.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ResendOrganizationInvitationResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/sso/providers":{"get":{"operationId":"listSsoProviders","summary":"List SSO providers","description":"List identity providers owned by the organization. Requires organization Admin access. OIDC client secrets are redacted and SAML private keys are omitted. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization.sso.providers.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"limit","in":"query","required":false,"description":"Maximum identity providers to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum identity providers to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"providerId","description":"Field used to sort the result.","type":"string","enum":["providerId","domain"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of identity providers with redacted configuration.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListSsoProvidersResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"saveSsoProvider","summary":"Save SSO provider","description":"Create or update an organization identity provider’s configuration on a verified domain. Requires organization Admin access and SSO entitlement. Existing providers return 200; creation returns 201. Omission behavior is field-specific; OIDC’s redacted secret marker preserves the saved secret. Identity changes with linked accounts conflict. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organization.sso.providers.save","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}}],"requestBody":{"required":true,"description":"Provider protocol, verified domain, and identity-provider configuration. Omission behavior is field-specific.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SaveSsoProviderBody"}}}},"responses":{"200":{"description":"The saved provider ID, protocol, and whether it was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SaveSsoProviderResponse"}}}},"201":{"description":"The saved provider ID, protocol, and whether it was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SaveSsoProviderResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/sso/providers/{providerId}":{"get":{"operationId":"getSsoProvider","summary":"Get SSO provider","description":"Get an identity provider owned by the organization. Requires organization Admin access. OIDC client secrets are redacted and SAML private keys are omitted. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization.sso.providers.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"providerId","in":"path","required":true,"description":"Identity provider identifier.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Identity provider identifier."}}],"responses":{"200":{"description":"The identity provider with redacted configuration.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetSsoProviderResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"delete":{"operationId":"deleteSsoProvider","summary":"Delete SSO provider","description":"Remove an identity provider and clear its primary selection. Requires organization Admin access. Existing accounts, memberships, and sessions remain. Domain sign-in falls back to another verified provider if one remains; use Get SSO policy to inspect whether SSO is still enforced. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organization.sso.providers.delete","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"providerId","in":"path","required":true,"description":"Identity provider identifier.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Identity provider identifier."}}],"responses":{"200":{"description":"Acknowledgement that the identity provider was removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DeleteSsoProviderResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/sso/providers/{providerId}/primary":{"post":{"operationId":"setPrimarySsoProvider","summary":"Set primary SSO provider","description":"Make a verified organization provider handle sign-in for its domain. Requires organization Admin access. Other providers remain available for testing and later switching. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organization.sso.set_primary_provider","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"providerId","in":"path","required":true,"description":"Identity provider identifier.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Identity provider identifier."}}],"requestBody":{"required":false,"description":"An empty JSON object; the path identifies the provider to make primary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SetPrimarySsoProviderBody"}}}},"responses":{"200":{"description":"The provider selected for its verified domain.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_SetPrimarySsoProviderResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/sso/policy":{"get":{"operationId":"getSsoPolicy","summary":"Get SSO policy","description":"Get the stored organization SSO requirement and whether it is currently enforced. Requires organization membership. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization.sso.read_requirement","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}}],"responses":{"200":{"description":"The stored SSO requirement and its effective enforcement state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetSsoPolicyResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateSsoPolicy","summary":"Update SSO policy","description":"Require or stop requiring SSO on future sign-ins. Requires organization Admin access. Enabling requires SSO entitlement and a verified provider; disabling remains available after entitlement is lost. Existing sessions remain active. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organization.sso.set_requirement","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}}],"requestBody":{"required":true,"description":"Whether future sign-ins must use SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateSsoPolicyBody"}}}},"responses":{"200":{"description":"The saved SSO requirement and its effective enforcement state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateSsoPolicyResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/domains":{"get":{"operationId":"listOrganizationDomains","summary":"List organization domains","description":"List the organization’s domain claims with cursor pagination. Requires organization membership. Pending DNS challenge values are returned only to administrators using their own credentials. Organizations without Enterprise domain entitlement return an empty list. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organizations.domains.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"limit","in":"query","required":false,"description":"Maximum domain claims to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum domain claims to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"domain","description":"Field used to sort the result.","type":"string","enum":["domain"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of domain claims; pending challenges are limited to Admins.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationDomainsResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"addOrganizationDomain","summary":"Add organization domain","description":"Claim a domain and receive its DNS TXT challenge. Requires organization Admin access and, when billing is enabled, Enterprise domain entitlement. An organization can claim at most 25 domains. Existing claims return `200`; new claims return `201`. A domain verified by another organization returns `409`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organizations.domains.add","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}}],"requestBody":{"required":true,"description":"The domain to claim and verify.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_AddOrganizationDomainBody"}}}},"responses":{"200":{"description":"The domain claim and its pending DNS challenge, when applicable.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_AddOrganizationDomainResponse"}}}},"201":{"description":"The domain claim and its pending DNS challenge, when applicable.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_AddOrganizationDomainResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/domains/{domainId}/verify":{"post":{"operationId":"verifyOrganizationDomain","summary":"Verify organization domain","description":"Verify domain ownership through its DNS TXT challenge and grant domain trust to matching organization providers. Requires organization Admin access and, when billing is enabled, Enterprise domain entitlement. Billing-disabled self-hosted deployments may configure operator verification. An already-verified domain is returned unchanged. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organizations.domains.verify","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"domainId","in":"path","required":true,"description":"Domain claim owned by this organization.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Domain claim owned by this organization."}}],"requestBody":{"required":false,"description":"An empty JSON object; verification uses the claim’s current DNS challenge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_VerifyOrganizationDomainBody"}}}},"responses":{"200":{"description":"The domain claim after ownership verification.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_VerifyOrganizationDomainResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/domains/{domainId}":{"delete":{"operationId":"removeOrganizationDomain","summary":"Remove organization domain","description":"Remove a domain claim and revoke verified sign-in authority from matching organization providers. Requires organization Admin access and, when billing is enabled, Enterprise domain entitlement. Existing accounts and memberships remain. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organizations.domains.remove","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization whose single sign-on settings and verified domains are managed.","schema":{"type":"string","minLength":1,"description":"Organization whose single sign-on settings and verified domains are managed."}},{"name":"domainId","in":"path","required":true,"description":"Domain claim owned by this organization.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Domain claim owned by this organization."}}],"responses":{"200":{"description":"Acknowledgement that the domain claim was removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_RemoveOrganizationDomainResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/credentials/{credentialId}/members":{"get":{"operationId":"listCredentialMembers","summary":"List credential members","description":"List explicit credential grants, including revoked grants, and inherited workspace Admin access. Personal API keys and OAuth access tokens can list grants for OAuth or service-account credentials. Requires workspace read access and the `integrations.manage` capability. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"credentials.members.list","x-oauth-scope":"api:read","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"credentialId","in":"path","required":true,"description":"Credential whose sharing grants are managed.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Credential whose sharing grants are managed."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace expected to own the credential.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace expected to own the credential."}},{"name":"limit","in":"query","required":false,"description":"Maximum credential members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum credential members to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","schema":{"default":"email","description":"Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`.","type":"string","enum":["email","name"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of explicit and inherited credential grants.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListCredentialMembersResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"upsertCredentialMember","summary":"Upsert credential member","description":"Grant or change a current workspace member’s credential role. Requires credential Admin access and the `integrations.manage` capability. Revoked grants become active again; inherited workspace Admins cannot be demoted. A new grant returns `201`; an existing grant returns `200`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"credentials.members.upsert","x-oauth-scope":"api:write","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"credentialId","in":"path","required":true,"description":"Credential whose sharing grants are managed.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Credential whose sharing grants are managed."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace expected to own the credential.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace expected to own the credential."}}],"requestBody":{"required":true,"description":"The current workspace member and credential role to grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpsertCredentialMemberBody"}}}},"responses":{"200":{"description":"The saved credential role and whether a grant was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpsertCredentialMemberResponse"}}}},"201":{"description":"The saved credential role and whether a grant was created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpsertCredentialMemberResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/credentials/{credentialId}/members/{userId}":{"delete":{"operationId":"removeCredentialMember","summary":"Remove credential member","description":"Revoke an active explicit credential grant. Requires credential Admin access and the `integrations.manage` capability. Inherited workspace Admins cannot be removed; an absent or already-revoked grant returns `404`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"credentials.members.remove","x-oauth-scope":"api:write","tags":["Credentials"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"credentialId","in":"path","required":true,"description":"Credential whose sharing grants are managed.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"Credential whose sharing grants are managed."}},{"name":"userId","in":"path","required":true,"description":"User whose explicit grant will be revoked.","schema":{"type":"string","minLength":1,"maxLength":255,"description":"User whose explicit grant will be revoked."}},{"name":"workspaceId","in":"query","required":true,"description":"Workspace expected to own the credential.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace expected to own the credential."}}],"responses":{"200":{"description":"Acknowledgement that the explicit credential grant was revoked.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_RemoveCredentialMemberResponse"}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/permission-config":{"get":{"operationId":"getWorkspacePermissionConfig","summary":"Get workspace permission config","description":"Get the acting user's governing permission group and configuration for a workspace they can access. This describes permission-group restrictions, not the user's workspace role. Group and config are null when no group governs the caller; entitled indicates whether organization permission governance is active. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"permission_groups.read_user_config","x-oauth-scope":"api:read","tags":["Workspaces"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Unique workspace identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."}}],"responses":{"200":{"description":"The caller’s effective permission-group configuration.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetWorkspacePermissionConfigResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"permissionGroupId":null,"groupName":null,"config":null,"entitled":false,"organizationId":null,"isOrgAdmin":false}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/invitations":{"post":{"operationId":"createWorkspaceInvitations","summary":"Create workspace invitations","description":"Invite people to a workspace or grant access immediately to existing organization members. Requires workspace Admin access and current invitation eligibility; invitations offering organization Admin membership also require organization Admin access. Recipients are processed independently: inspect `failed` even after HTTP `200`, and inspect invitation status before retrying a delivery failure. Existing access is preserved. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"workspace_invitations.send_batch","x-oauth-scope":"api:write","tags":["Workspaces"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Unique workspace identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."}}],"requestBody":{"required":true,"description":"Recipients and the access to grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateWorkspaceInvitationsBody"},"examples":{"example1":{"summary":"Request example 1","value":{"emails":["member@example.com"],"permission":"write","membership":"member"}}}}}},"responses":{"200":{"description":"Per-recipient invitation and direct-grant outcomes.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateWorkspaceInvitationsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"success":true,"successful":["member@example.com"],"added":[],"failed":[],"invitations":[{"id":"invitation-123","email":"member@example.com","workspaceIds":["workspace-123"],"permission":"write","membershipIntent":"internal"}]}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/members/{userId}/usage-limit":{"get":{"operationId":"getOrganizationMemberUsageLimit","summary":"Get organization member credit limit","description":"Read a person’s credit cap and credits consumed in the organization billing period. Hosted deployments only. The `userId` identifies an organization member or external collaborator with workspace access in this organization; it is not a membership record ID. Null means no per-person cap, while organization limits still apply. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization_member_usage_limits.read","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"userId","in":"path","required":true,"description":"User ID of an organization member or external collaborator with workspace access in this organization. Use List Organization Members or List Workspace Members to find it.","schema":{"type":"string","minLength":1,"description":"User ID of an organization member or external collaborator with workspace access in this organization. Use List Organization Members or List Workspace Members to find it."}}],"responses":{"200":{"description":"The person’s current credit cap and billing-period consumption.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetOrganizationMemberUsageLimitResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"creditsUsed":200,"creditLimit":10000,"billingInterval":"month"}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateOrganizationMemberUsageLimit","summary":"Update organization member credit limit","description":"Set or clear a person’s credit cap. Hosted deployments only. The `userId` must identify an organization member or external collaborator with workspace access in this organization. The cap is a nonnegative whole number of credits, not dollars: `0` prevents further credit-consuming usage; `null` removes the per-person cap. Organization limits continue to apply. Retrying the same value is safe. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"organization_member_usage_limits.update","x-oauth-scope":"api:write","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"userId","in":"path","required":true,"description":"User ID of an organization member or external collaborator with workspace access in this organization. Use List Organization Members or List Workspace Members to find it.","schema":{"type":"string","minLength":1,"description":"User ID of an organization member or external collaborator with workspace access in this organization. Use List Organization Members or List Workspace Members to find it."}}],"requestBody":{"required":true,"description":"Credit cap in whole credits; null clears the cap.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateOrganizationMemberUsageLimitBody"},"examples":{"example1":{"summary":"Request example 1","value":{"creditLimit":10000}},"example2":{"summary":"Request example 2","value":{"creditLimit":null}}}}}},"responses":{"200":{"description":"The saved credit cap, or null when the cap was cleared.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateOrganizationMemberUsageLimitResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"creditLimit":10000}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/usage/summary":{"get":{"operationId":"getOrganizationUsageSummary","summary":"Get organization usage summary","description":"Read pooled credits, a usage series, and an exact previous-period comparison when available. Requires organization Admin access and Usage Monitoring: Enterprise when billing is enabled, or deployment enablement when billing is disabled. Defaults to 30 days. Custom dates include both dates in the selected timezone and cannot exceed 92 days. Billing windows exceeding 366 days are rejected. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization_usage.summary.read","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"preset","in":"query","required":false,"description":"Reporting window. Custom requires startDate and endDate and is capped at 92 days; other presets reject those bounds. Resolved billing windows are capped at 366 days.","schema":{"default":"30d","description":"Reporting window. Custom requires startDate and endDate and is capped at 92 days; other presets reject those bounds. Resolved billing windows are capped at 366 days.","type":"string","enum":["current-period","previous-period","7d","30d","custom"]}},{"name":"startDate","in":"query","required":false,"description":"First calendar date included, in the selected timezone. Requires preset=custom.","schema":{"description":"First calendar date included, in the selected timezone. Requires preset=custom.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"endDate","in":"query","required":false,"description":"Last calendar date included, in the selected timezone. Requires preset=custom.","schema":{"description":"Last calendar date included, in the selected timezone. Requires preset=custom.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"timezone","in":"query","required":false,"description":"IANA timezone for calendar boundaries; defaults to UTC.","schema":{"default":"UTC","description":"IANA timezone for calendar boundaries; defaults to UTC.","type":"string","minLength":1}},{"name":"workspaceId","in":"query","required":false,"description":"Restrict usage to one workspace owned by the organization.","schema":{"description":"Restrict usage to one workspace owned by the organization.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Reporting bounds, pooled credits, and chronological usage buckets.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetOrganizationUsageSummaryResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"window":{"start":"2026-06-01T00:00:00.000Z","end":"2026-07-01T00:00:00.000Z","source":"range"},"bucket":"day","totals":{"credits":200},"previousTotals":null,"series":[{"timestamp":"2026-06-01T00:00:00.000Z","credits":200,"events":1}]}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/usage/breakdown":{"get":{"operationId":"getOrganizationUsageBreakdown","summary":"Get organization usage breakdown","description":"Read ranked usage by member, workspace, workflow, model, BYOK provider, or source. Requires organization Admin access and Usage Monitoring. `other` summarizes groups omitted by the limit. BYOK ranks tokens; other dimensions rank cost. More than 10,000 underlying groups returns `413`; narrow the window or workspace. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization_usage.breakdown.read","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"preset","in":"query","required":false,"description":"Reporting window. Custom requires startDate and endDate and is capped at 92 days; other presets reject those bounds. Resolved billing windows are capped at 366 days.","schema":{"default":"30d","description":"Reporting window. Custom requires startDate and endDate and is capped at 92 days; other presets reject those bounds. Resolved billing windows are capped at 366 days.","type":"string","enum":["current-period","previous-period","7d","30d","custom"]}},{"name":"startDate","in":"query","required":false,"description":"First calendar date included, in the selected timezone. Requires preset=custom.","schema":{"description":"First calendar date included, in the selected timezone. Requires preset=custom.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"endDate","in":"query","required":false,"description":"Last calendar date included, in the selected timezone. Requires preset=custom.","schema":{"description":"Last calendar date included, in the selected timezone. Requires preset=custom.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"timezone","in":"query","required":false,"description":"IANA timezone for calendar boundaries; defaults to UTC.","schema":{"default":"UTC","description":"IANA timezone for calendar boundaries; defaults to UTC.","type":"string","minLength":1}},{"name":"workspaceId","in":"query","required":false,"description":"Restrict usage to one workspace owned by the organization.","schema":{"description":"Restrict usage to one workspace owned by the organization.","type":"string","minLength":1,"maxLength":128}},{"name":"dimension","in":"query","required":true,"description":"Usage grouping dimension.","schema":{"type":"string","enum":["member","workspace","workflow","model","byok","source"],"description":"Usage grouping dimension."}},{"name":"limit","in":"query","required":false,"description":"Maximum ranked groups to return. Remaining usage is summarized in other. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum ranked groups to return. Remaining usage is summarized in other. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Ranked usage groups and the combined remainder.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetOrganizationUsageBreakdownResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"dimension":"member","rows":[{"id":"user-123","label":"Example Member","credits":200,"events":1,"share":1}],"other":{"credits":0,"events":0,"rowCount":0,"tokens":0},"totalCredits":200}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/usage/events":{"get":{"operationId":"listOrganizationUsageEvents","summary":"List organization usage events","description":"List usage events, including zero-cost activity. Requires organization Admin access and Usage Monitoring. Defaults to 30 days. Cursors retain the initial reporting window; keep filters and sort unchanged while paging. `sim-chat` covers both chat surfaces. Per-event rounding can yield `credits: 0` with `hasCost: true`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"organization_usage.events.list","x-oauth-scope":"api:read","tags":["Organizations"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier.","schema":{"type":"string","minLength":1,"description":"Organization identifier."}},{"name":"preset","in":"query","required":false,"description":"Reporting window. Custom requires startDate and endDate and is capped at 92 days; other presets reject those bounds. Resolved billing windows are capped at 366 days.","schema":{"default":"30d","description":"Reporting window. Custom requires startDate and endDate and is capped at 92 days; other presets reject those bounds. Resolved billing windows are capped at 366 days.","type":"string","enum":["current-period","previous-period","7d","30d","custom"]}},{"name":"startDate","in":"query","required":false,"description":"First calendar date included, in the selected timezone. Requires preset=custom.","schema":{"description":"First calendar date included, in the selected timezone. Requires preset=custom.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"endDate","in":"query","required":false,"description":"Last calendar date included, in the selected timezone. Requires preset=custom.","schema":{"description":"Last calendar date included, in the selected timezone. Requires preset=custom.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"timezone","in":"query","required":false,"description":"IANA timezone for calendar boundaries; defaults to UTC.","schema":{"default":"UTC","description":"IANA timezone for calendar boundaries; defaults to UTC.","type":"string","minLength":1}},{"name":"source","in":"query","required":false,"description":"Restrict events to one product surface.","schema":{"description":"Restrict events to one product surface.","type":"string","enum":["workflow","wand","sim-chat","mcp_copilot","mothership_block","knowledge-base","voice-input","enrichment","voice-output","api-tool"]}},{"name":"limit","in":"query","required":false,"description":"Maximum usage events per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum usage events per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["createdAt"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of usage events, including zero-cost activity.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationUsageEventsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"event-123","createdAt":"2026-06-01T09:00:00.000Z","source":"sim-chat","description":"Model usage","workflowName":null,"credits":200,"hasCost":true}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/access-requests/discovery":{"get":{"operationId":"discoverWorkspaceAccessRequests","summary":"Discover workspace access requests","description":"Discover the acting user’s access to features, integrations, models, tools, authentication methods, and member credit limits. Returns an empty list while requests are disabled. Requires access to the workspace; external collaborators use their workspace grant. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.discover","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Workspace in which the acting user requests access.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which the acting user requests access."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the access item label.","schema":{"description":"Case-insensitive substring match against the access item label.","type":"string","minLength":1,"maxLength":200}},{"name":"targetKind","in":"query","required":false,"description":"Category of access to discover.","schema":{"description":"Category of access to discover.","type":"string","enum":["feature","integration","provider","model","tool","knowledge_connector","file_share_auth","chat_deploy_auth","usage_limit"]}},{"name":"state","in":"query","required":false,"description":"Filter by the acting user’s current access. Requestable items can be submitted for review.","schema":{"description":"Filter by the acting user’s current access. Requestable items can be submitted for review.","type":"string","enum":["allowed","requestable","unavailable"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"label","description":"Field used to sort the result.","type":"string","enum":["label"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum access items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum access items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of access targets and the acting user’s current access state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DiscoverWorkspaceAccessRequestsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"target":{"kind":"feature","configKey":"hideTablesTab"},"label":"Tables","state":"requestable","reason":null,"pendingRequestId":null}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/access-requests":{"get":{"operationId":"listMyWorkspaceAccessRequests","summary":"List my workspace access requests","description":"List only the acting user’s requests in this workspace, including resolved history and organization-wide member credit-limit requests. History remains available while requests are disabled. Requires access to the workspace; external collaborators use their workspace grant. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.list_mine","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Workspace in which the acting user requests access.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which the acting user requests access."}},{"name":"status","in":"query","required":false,"description":"Filter by request status; omit to include all statuses.","schema":{"description":"Filter by request status; omit to include all statuses.","type":"string","enum":["pending","fulfilled","declined","cancelled","closed"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["createdAt","targetLabel"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum access requests to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum access requests to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of the acting user’s workspace and member-credit requests.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListMyWorkspaceAccessRequestsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"post":{"operationId":"createWorkspaceAccessRequest","summary":"Create workspace access request","description":"Request access using a target from Discover workspace access requests. Requires access to an organization-owned workspace with requests enabled; external collaborators use their workspace grant. Each requester can have 100 pending requests and submit 100 in 24 hours within the organization. Matching pending requests are reused; an existing request may be closed if access is already available. Permission approvals change the governing group for all affected members. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"access_requests.create","x-oauth-scope":"api:write","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Workspace in which the acting user requests access.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which the acting user requests access."}}],"requestBody":{"required":true,"description":"A discovered access target and an optional reason for the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateWorkspaceAccessRequestBody"},"examples":{"example1":{"summary":"Request example 1","value":{"target":{"kind":"feature","configKey":"hideTablesTab"},"reason":"Maintain team data"}}}}}},"responses":{"200":{"description":"The new request, matching pending request, or existing request closed because access became available.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateWorkspaceAccessRequestResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/workspaces/{workspaceId}/access-requests/{requestId}/cancel":{"post":{"operationId":"cancelWorkspaceAccessRequest","summary":"Cancel workspace access request","description":"Cancel the acting user’s pending request in this scope, including an organization-wide member credit-limit request. Already resolved requests are returned unchanged. Cancellation remains available while requests are disabled. Requires access to the workspace; external collaborators use their workspace grant. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"access_requests.cancel","x-oauth-scope":"api:write","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Workspace in which the acting user requests access.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which the acting user requests access."}},{"name":"requestId","in":"path","required":true,"description":"Access request identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."}}],"responses":{"200":{"description":"The cancelled request, or the unchanged request if already resolved.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CancelWorkspaceAccessRequestResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"cancelled","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":"2026-06-01T10:00:00.000Z","groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests/discovery":{"get":{"operationId":"discoverOrganizationAccessRequests","summary":"Discover organization access requests","description":"Discover the acting user’s access to features, integrations, models, tools, authentication methods, and member credit limits. Returns an empty list while requests are disabled. Requires organization membership. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.discover","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the access item label.","schema":{"description":"Case-insensitive substring match against the access item label.","type":"string","minLength":1,"maxLength":200}},{"name":"targetKind","in":"query","required":false,"description":"Category of access to discover.","schema":{"description":"Category of access to discover.","type":"string","enum":["feature","integration","provider","model","tool","knowledge_connector","file_share_auth","chat_deploy_auth","usage_limit"]}},{"name":"state","in":"query","required":false,"description":"Filter by the acting user’s current access. Requestable items can be submitted for review.","schema":{"description":"Filter by the acting user’s current access. Requestable items can be submitted for review.","type":"string","enum":["allowed","requestable","unavailable"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"label","description":"Field used to sort the result.","type":"string","enum":["label"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"asc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum access items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum access items to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of access targets and the acting user’s current access state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_DiscoverOrganizationAccessRequestsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"target":{"kind":"feature","configKey":"hideTablesTab"},"label":"Tables","state":"requestable","reason":null,"pendingRequestId":null}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests/mine":{"get":{"operationId":"listMyOrganizationAccessRequests","summary":"List my organization access requests","description":"List the acting user’s organization-level requests and member credit-limit requests, including resolved history. For workspace-scoped requests, use List my workspace access requests. History remains available while requests are disabled. Requires organization membership. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.list_mine","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}},{"name":"status","in":"query","required":false,"description":"Filter by request status; omit to include all statuses.","schema":{"description":"Filter by request status; omit to include all statuses.","type":"string","enum":["pending","fulfilled","declined","cancelled","closed"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["createdAt","targetLabel"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum access requests to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum access requests to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}}],"responses":{"200":{"description":"A page of the acting user’s organization and member-credit requests.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListMyOrganizationAccessRequestsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"request-123","organizationId":"org-123","workspaceId":null,"target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests":{"post":{"operationId":"createOrganizationAccessRequest","summary":"Create organization access request","description":"Request access using a target from Discover organization access requests. Requires organization membership and requests enabled. Each requester can have 100 pending requests and submit 100 in 24 hours within the organization. Matching pending requests are reused; an existing request may be closed if access is already available. Permission approvals change the governing group for all affected members. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"access_requests.create","x-oauth-scope":"api:write","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}}],"requestBody":{"required":true,"description":"A discovered access target and an optional reason for the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateOrganizationAccessRequestBody"},"examples":{"example1":{"summary":"Request example 1","value":{"target":{"kind":"feature","configKey":"hideTablesTab"},"reason":"Maintain team data"}}}}}},"responses":{"200":{"description":"The new request, matching pending request, or existing request closed because access became available.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CreateOrganizationAccessRequestResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"request-123","organizationId":"org-123","workspaceId":null,"target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"get":{"operationId":"listOrganizationAccessRequests","summary":"List organization access requests","description":"List requests across the organization for administrator review. Includes requests from organization members and external workspace collaborators; history remains available while requests are disabled. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.list_organization","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}},{"name":"status","in":"query","required":false,"description":"Filter by request status; omit to include all statuses.","schema":{"description":"Filter by request status; omit to include all statuses.","type":"string","enum":["pending","fulfilled","declined","cancelled","closed"]}},{"name":"sortBy","in":"query","required":false,"description":"Field used to sort the result.","schema":{"default":"createdAt","description":"Field used to sort the result.","type":"string","enum":["createdAt","targetLabel"]}},{"name":"sortOrder","in":"query","required":false,"description":"Sort direction.","schema":{"default":"desc","description":"Sort direction.","type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"description":"Maximum access requests to return per page. Must be a whole number from 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Maximum access requests to return per page. Must be a whole number from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","schema":{"description":"Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor.","type":"string","minLength":1}},{"name":"search","in":"query","required":false,"description":"Case-insensitive substring match against the target label or requester name or email.","schema":{"description":"Case-insensitive substring match against the target label or requester name or email.","type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"A page of requests across the organization for Admin review.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ListOrganizationAccessRequestsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":[{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}],"nextCursor":null}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests/{requestId}/cancel":{"post":{"operationId":"cancelOrganizationAccessRequest","summary":"Cancel organization access request","description":"Cancel the acting user’s pending request in this scope, including an organization-wide member credit-limit request. Already resolved requests are returned unchanged. Cancellation remains available while requests are disabled. Requires organization membership. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"access_requests.cancel","x-oauth-scope":"api:write","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}},{"name":"requestId","in":"path","required":true,"description":"Access request identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."}}],"responses":{"200":{"description":"The cancelled request, or the unchanged request if already resolved.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_CancelOrganizationAccessRequestResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"request-123","organizationId":"org-123","workspaceId":null,"target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"cancelled","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":"2026-06-01T10:00:00.000Z","groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests/{requestId}/preview":{"get":{"operationId":"previewOrganizationAccessRequest","summary":"Preview organization access request","description":"Preview the current permission changes, affected group and audience, or member credit cap. Review `canApply`, `changes`, `impact`, and `fingerprint` before resolving. Permission changes affect the entire governing group, not only the requester. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.preview","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}},{"name":"requestId","in":"path","required":true,"description":"Access request identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."}}],"responses":{"200":{"description":"The proposed group or credit-cap change, affected audience, and fingerprint.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_PreviewOrganizationAccessRequestResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"resolutionKind":"permission","request":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}},"group":{"id":"group-123","name":"Engineering"},"changes":[{"configKey":"hideTablesTab","label":"Tables","before":true,"after":false}],"impact":{"memberCount":2,"workspaceCount":1,"workspaceNames":["Engineering"],"truncated":false},"fingerprint":"current-preview-fingerprint","canApply":true,"unavailableReason":null,"currentLimitCredits":null,"newLimitCredits":null}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests/{requestId}/resolve":{"post":{"operationId":"resolveOrganizationAccessRequest","summary":"Resolve organization access request","description":"Apply a reviewed request or decline it with a reason. Applying requires the preview fingerprint; changed policy or membership returns a conflict. Credit requests also require a higher `newLimitCredits`. Already resolved requests are returned unchanged. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"access_requests.resolve","x-oauth-scope":"api:write","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}},{"name":"requestId","in":"path","required":true,"description":"Access request identifier.","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."}}],"requestBody":{"required":true,"description":"Apply the reviewed fingerprint, with a higher credit cap when applicable, or decline with a reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ResolveOrganizationAccessRequestBody"},"examples":{"example1":{"summary":"Request example 1","value":{"action":"apply","expectedFingerprint":"current-preview-fingerprint"}}}}}},"responses":{"200":{"description":"The applied or declined request, or its unchanged resolved state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_ResolveOrganizationAccessRequestResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"fulfilled","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":"2026-06-01T10:00:00.000Z","groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}},"/api/v2/organizations/{organizationId}/access-requests/settings":{"get":{"operationId":"getOrganizationAccessRequestSettings","summary":"Get organization access request settings","description":"Get whether the organization allows new access requests and approvals. This preference does not enable features unavailable in the deployment or subscription. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.","x-sim-operation":"access_requests.get_settings","x-oauth-scope":"api:read","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:read"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}}],"responses":{"200":{"description":"Whether new requests and approvals are allowed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_GetOrganizationAccessRequestSettingsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"allowRequests":true}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}},"patch":{"operationId":"updateOrganizationAccessRequestSettings","summary":"Update organization access request settings","description":"Allow or pause new access requests and approvals. Pausing preserves history, cancellation, and decline, and does not revoke previously granted access. Requires organization Admin access. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.","x-sim-operation":"access_requests.update_settings","x-oauth-scope":"api:write","tags":["Access Requests"],"security":[{"apiKey":[]},{"oauthBearer":["api:write"]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization that owns the access requests.","schema":{"type":"string","minLength":1,"description":"Organization that owns the access requests."}}],"requestBody":{"required":true,"description":"Whether new requests and approvals are allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateOrganizationAccessRequestSettingsBody"},"examples":{"example1":{"summary":"Request example 1","value":{"allowRequests":false}}}}}},"responses":{"200":{"description":"The saved setting for new requests and approvals.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Resources_X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Resources_X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Resources_X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_UpdateOrganizationAccessRequestSettingsResponse"},"examples":{"example1":{"summary":"Response example 1","value":{"data":{"allowRequests":false}}}}}}},"400":{"$ref":"#/components/responses/Resources_BadRequest"},"401":{"$ref":"#/components/responses/Resources_Unauthorized"},"403":{"$ref":"#/components/responses/Resources_Forbidden"},"404":{"$ref":"#/components/responses/Resources_NotFound"},"409":{"$ref":"#/components/responses/Resources_Conflict"},"413":{"$ref":"#/components/responses/Resources_PayloadTooLarge"},"415":{"$ref":"#/components/responses/Resources_UnsupportedMediaType"},"429":{"$ref":"#/components/responses/Resources_RateLimited"},"500":{"$ref":"#/components/responses/Resources_InternalError"},"503":{"$ref":"#/components/responses/Resources_ServiceUnavailable"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description."},"oauthBearer":{"type":"oauth2","description":"A Sim OAuth access token obtained by a registered client through the authorization-code flow with PKCE (S256), sent as `Authorization: Bearer`. Each operation declares the scope it requires: api:read permits reads and searches; api:write also permits changes and execution and implies api:read. Scope requirements follow the application operation, independent of HTTP method or workspace role.","flows":{"authorizationCode":{"authorizationUrl":"https://www.sim.ai/api/auth/oauth2/authorize","tokenUrl":"https://www.sim.ai/api/auth/oauth2/token","refreshUrl":"https://www.sim.ai/api/auth/oauth2/token","scopes":{"api:read":"Read your workspaces, workflows, files, tables, and logs","api:write":"Read, create, change, run, and delete resources in your workspaces","offline_access":"Stay signed in without asking again"}}}}},"headers":{"Workflows_Content-Type":{"description":"MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable.","schema":{"type":"string","title":"Content type","description":"MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable."}},"Workflows_Content-Disposition":{"description":"Attachment disposition containing sanitized and RFC 5987 encoded filenames.","schema":{"type":"string","title":"Content disposition","description":"Attachment disposition containing sanitized and RFC 5987 encoded filenames."}},"Workflows_Content-Length":{"description":"File size in bytes.","schema":{"type":"string","pattern":"^(0|[1-9]\\d*)$","title":"Content length","description":"File size in bytes."}},"Workflows_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"Workflows_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"Workflows_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"Workflows_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"Workflows_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}},"Logs_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"Logs_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"Logs_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"Logs_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"Logs_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}},"FilesAudit_Content-Type":{"description":"MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable.","schema":{"type":"string","title":"Content type","description":"MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable."}},"FilesAudit_Content-Disposition":{"description":"Attachment disposition containing sanitized and RFC 5987 encoded filenames.","schema":{"type":"string","title":"Content disposition","description":"Attachment disposition containing sanitized and RFC 5987 encoded filenames."}},"FilesAudit_Content-Length":{"description":"File size in bytes.","schema":{"type":"string","pattern":"^(0|[1-9]\\d*)$","title":"Content length","description":"File size in bytes."}},"FilesAudit_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"FilesAudit_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"FilesAudit_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"FilesAudit_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"FilesAudit_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}},"Tables_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"Tables_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"Tables_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"Tables_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"Tables_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}},"Knowledge_Content-Type":{"description":"MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable.","schema":{"type":"string","title":"Content type","description":"MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable."}},"Knowledge_Content-Disposition":{"description":"Attachment disposition containing sanitized and RFC 5987 encoded filenames.","schema":{"type":"string","title":"Content disposition","description":"Attachment disposition containing sanitized and RFC 5987 encoded filenames."}},"Knowledge_Content-Length":{"description":"File size in bytes.","schema":{"type":"string","pattern":"^(0|[1-9]\\d*)$","title":"Content length","description":"File size in bytes."}},"Knowledge_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"Knowledge_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"Knowledge_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"Knowledge_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"Knowledge_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}},"Billing_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"Billing_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"Billing_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"Billing_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"Billing_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}},"Resources_X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit","description":"Maximum requests allowed in the current window."}},"Resources_X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Rate limit remaining","description":"Requests remaining in the current window."}},"Resources_X-RateLimit-Reset":{"description":"ISO 8601 timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","title":"Rate limit reset","description":"ISO 8601 timestamp when the current rate-limit window resets."}},"Resources_Retry-After":{"description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Retry after","description":"Seconds to wait before retrying, sent on `429` and `503`. Add jitter rather than retrying at exactly this offset."}},"Resources_X-Run-Id":{"description":"Identifier assigned to the workflow run.","schema":{"type":"string","minLength":1,"title":"Run identifier","description":"Identifier assigned to the workflow run."}}},"responses":{"Workflows_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"Workflows_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"Workflows_UsageLimitExceeded":{"description":"The workspace has exceeded its usage or billing limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"USAGE_LIMIT_EXCEEDED","message":"Usage limit exceeded. Please upgrade your plan to continue."}}}}},"Workflows_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"Workflows_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"Workflows_Conflict":{"description":"The request conflicts with current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"CONFLICT","message":"The request conflicts with current resource state"}}}}},"Workflows_RunIdConflict":{"description":"The run cannot be started, for one of two causes named by `error.details.code`: `RUN_ID_CONFLICT` when the supplied `X-Run-Id` is already claimed, and `CALL_CHAIN_DEPTH_EXCEEDED` when the incoming `X-Sim-Via` chain has reached the maximum workflow-to-workflow call depth.","headers":{"X-Run-Id":{"$ref":"#/components/headers/Workflows_X-Run-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"CONFLICT","message":"Run ID has already been used","details":{"code":"RUN_ID_CONFLICT","runId":"0f7c1a2e-9b3d-4c58-8a21-6d4e5f7a9b01"}}}}}},"Workflows_PayloadTooLarge":{"description":"The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Request body is too large"}}}}},"Workflows_UnsupportedMediaType":{"description":"The request uses an unsupported media type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Request body must be sent as application/json"}}}}},"Workflows_Locked":{"description":"The resource is temporarily locked or unavailable; retry the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"LOCKED","message":"Workflow is locked"}}}}},"Workflows_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/Workflows_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"Workflows_ClientClosedRequest":{"description":"The client closed the connection before the response was produced. An abort can leave the run going, so `error.details.runId` carries the run id — reconcile against the runs resource rather than starting another run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"CLIENT_CLOSED_REQUEST","message":"Client cancelled request","details":{"runId":"0f7c1a2e-9b3d-4c58-8a21-6d4e5f7a9b01"}}}}}},"Workflows_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"Workflows_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/Workflows_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}},"Logs_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"Logs_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"Logs_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"Logs_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"Logs_PayloadTooLarge":{"description":"The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Request body is too large"}}}}},"Logs_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/Logs_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"Logs_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"Logs_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/Logs_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}},"FilesAudit_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"FilesAudit_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"FilesAudit_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"FilesAudit_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"FilesAudit_Conflict":{"description":"The request conflicts with current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"CONFLICT","message":"The request conflicts with the current resource state"}}}}},"FilesAudit_PayloadTooLarge":{"description":"The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Request body is too large"}}}}},"FilesAudit_UnsupportedMediaType":{"description":"The request uses an unsupported media type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Request body must be sent as application/json"}}}}},"FilesAudit_Locked":{"description":"The resource is temporarily locked or unavailable; retry the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"LOCKED","message":"The file or its search index is temporarily locked; retry the request"}}}}},"FilesAudit_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/FilesAudit_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"FilesAudit_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"FilesAudit_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/FilesAudit_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesAudit_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}},"Tables_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"Tables_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"Tables_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"Tables_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"Tables_Conflict":{"description":"The request conflicts with current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"CONFLICT","message":"The request conflicts with current table state"}}}}},"Tables_PayloadTooLarge":{"description":"The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Request body is too large"}}}}},"Tables_UnsupportedMediaType":{"description":"The request uses an unsupported media type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Request body must be sent as application/json"}}}}},"Tables_Locked":{"description":"The resource is temporarily locked or unavailable; retry the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"LOCKED","message":"A table lock prevents this operation.","details":{"lock":"insert"}}}}}},"Tables_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/Tables_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"Tables_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"Tables_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/Tables_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tables_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}},"Knowledge_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"Knowledge_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"Knowledge_UsageLimitExceeded":{"description":"The workspace has exceeded its usage or billing limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"USAGE_LIMIT_EXCEEDED","message":"Usage limit exceeded. Please upgrade your plan to continue."}}}}},"Knowledge_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"Knowledge_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"Knowledge_Conflict":{"description":"The request conflicts with current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"CONFLICT","message":"The request conflicts with current knowledge resource state"}}}}},"Knowledge_PayloadTooLarge":{"description":"The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Request body is too large"}}}}},"Knowledge_UnsupportedMediaType":{"description":"The request uses an unsupported media type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Request body must be sent as application/json"}}}}},"Knowledge_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/Knowledge_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"Knowledge_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"Knowledge_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/Knowledge_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}},"Billing_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"Billing_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"Billing_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"Billing_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"Billing_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/Billing_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"Billing_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"Billing_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/Billing_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}},"Resources_BadRequest":{"description":"The request is invalid. This includes a query parameter sent with no value (`?limit=`, `?search=`), which is rejected rather than read as zero, empty, or the parameter default — omit the parameter instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request"}}}}},"Resources_Unauthorized":{"description":"The API credential is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}},"Resources_UsageLimitExceeded":{"description":"The workspace has exceeded its usage or billing limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"USAGE_LIMIT_EXCEEDED","message":"Usage limit exceeded. Please upgrade your plan to continue."}}}}},"Resources_Forbidden":{"description":"The caller lacks the rights this operation requires. When the cause is one a caller can act on, `error.details.code` names it. A resource in a workspace the caller cannot reach at all answers `404` instead, so absence and denial are indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient workspace permissions","details":{"code":"INSUFFICIENT_WORKSPACE_ROLE"}}}}}},"Resources_NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"NOT_FOUND","message":"Not found"}}}}},"Resources_Conflict":{"description":"The request conflicts with current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"CONFLICT","message":"The request conflicts with the current state of the resource"}}}}},"Resources_PayloadTooLarge":{"description":"The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Request body is too large"}}}}},"Resources_UnsupportedMediaType":{"description":"The request uses an unsupported media type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Request body must be sent as application/json"}}}}},"Resources_RateLimited":{"description":"The caller exceeded the request rate limit.","headers":{"Retry-After":{"$ref":"#/components/headers/Resources_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"RATE_LIMITED","message":"API rate limit exceeded","details":{"retryAfter":"2026-01-01T00:00:30.000Z"}}}}}},"Resources_InternalError":{"description":"An unexpected server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}},"Resources_ServiceUnavailable":{"description":"A required service is temporarily unavailable. When present, `Retry-After` gives the minimum seconds to wait; add jitter before retrying. Check operation-specific guidance before repeating a change after an uncertain response.","headers":{"Retry-After":{"$ref":"#/components/headers/Resources_Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources_V2Error"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Service temporarily unavailable"}}}}}},"schemas":{"Workflows_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Workflows_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"Workflows_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"Workflows_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/Workflows_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"Workflows_FolderPathInput":{"title":"Folder path input","description":"Folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"Workflows_WorkflowListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Workflow name.","examples":["Customer support triage"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description, or null when none is set."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path; `/` is the workspace root.","maxLength":4096,"examples":["/Operations"]},"workspaceId":{"type":"string","description":"Workspace that owns the workflow."},"isDeployed":{"type":"boolean","description":"Whether the workflow has an active deployment."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 activation timestamp, or null when not deployed.","format":"date-time"},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Settled runs — completed, failed, or cancelled — counted as each one finishes; a paused run is counted once it settles. The counter is never reduced when a run ages out of log retention, so it can exceed the results returned by List workflow runs."},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp of the latest settled run, whatever its outcome, or null when the workflow has never run.","format":"date-time"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was last updated.","format":"date-time"}},"required":["id","webUrl","name","description","folderPath","workspaceId","isDeployed","deployedAt","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Workflow summary","description":"Summary of a workflow and its deployment and run state."},"Workflows_WorkflowListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowListItem"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Workflow list response","description":"A cursor-paginated page of workflow summaries.","examples":[{"data":[{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}],"nextCursor":null}]},"Workflows_SeededWorkflowBlock":{"type":"object","properties":{"id":{"type":"string","description":"Block identifier."},"type":{"type":"string","description":"Registered block type."},"name":{"type":"string","description":"Block display name."}},"required":["id","type","name"],"additionalProperties":false,"title":"Seeded workflow block","description":"A block the platform placed in a newly created workflow."},"Workflows_CreateWorkflowResult":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Workflow name.","examples":["Customer support triage"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description, or null when none is set."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path; `/` is the workspace root.","maxLength":4096,"examples":["/Operations"]},"workspaceId":{"type":"string","description":"Workspace that owns the workflow."},"isDeployed":{"type":"boolean","description":"Whether the workflow has an active deployment."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 activation timestamp, or null when not deployed.","format":"date-time"},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Settled runs — completed, failed, or cancelled — counted as each one finishes; a paused run is counted once it settles. The counter is never reduced when a run ages out of log retention, so it can exceed the results returned by List workflow runs."},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp of the latest settled run, whatever its outcome, or null when the workflow has never run.","format":"date-time"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was last updated.","format":"date-time"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_SeededWorkflowBlock"},"description":"Blocks seeded into the new workflow. Contains the start block; attach edges to its `id`."}},"required":["id","webUrl","name","description","folderPath","workspaceId","isDeployed","deployedAt","runCount","lastRunAt","createdAt","updatedAt","blocks"],"additionalProperties":false,"title":"Create workflow result","description":"The created workflow and the blocks it was seeded with."},"Workflows_CreateWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_CreateWorkflowResult"}},"required":["data"],"additionalProperties":false,"title":"Create workflow response","description":"The created workflow and the blocks it was seeded with.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":false,"deployedAt":null,"runCount":0,"lastRunAt":null,"createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z","blocks":[{"id":"start-1","type":"starter","name":"Start"}]}}]},"Workflows_CreateWorkflowRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the workflow."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Workflow name."},"description":{"description":"Optional workflow description.","anyOf":[{"type":"string","maxLength":50000},{"type":"null"}]},"folderPath":{"$ref":"#/components/schemas/Workflows_FolderPathInput"}},"required":["workspaceId","name"],"additionalProperties":false,"title":"Create workflow request","description":"Name, description, workspace, and optional folder for a new workflow."},"Workflows_WorkflowBlock":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Block identifier, unique within the workflow."},"type":{"type":"string","description":"Registered block type."},"name":{"type":"string","description":"Block display name; must be unique within the workflow."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Canvas x coordinate."},"y":{"type":"number","description":"Canvas y coordinate."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas coordinates of a block."},"subBlocks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Sub-block identifier."},"type":{"type":"string","minLength":1,"description":"Sub-block input type."},"value":{"description":"Configured value; shape depends on the sub-block type."}},"required":["id","type","value"],"additionalProperties":false,"description":"One configurable input on a block."},"description":"Configured inputs keyed by sub-block id."},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Declared shape of one output; depends on the block type."},"description":"Declared output shape keyed by output name."},"enabled":{"type":"boolean","description":"Whether the block runs."},"horizontalHandles":{"description":"Whether edge handles render horizontally.","type":"boolean"},"height":{"description":"Rendered block height.","type":"number"},"advancedMode":{"description":"Whether the block is edited in advanced mode.","type":"boolean"},"errorEnabled":{"description":"Whether the block exposes an error branch.","type":"boolean"},"retry":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the block retries on failure."},"maxTries":{"type":"integer","minimum":2,"maximum":5,"description":"Total attempts, including the first."},"waitBetweenTriesMs":{"type":"integer","minimum":0,"maximum":5000,"description":"Delay between attempts, in milliseconds."}},"required":["enabled","maxTries","waitBetweenTriesMs"],"additionalProperties":false,"description":"Per-block retry configuration."},"triggerMode":{"description":"Whether the block acts as the workflow trigger.","type":"boolean"},"data":{"type":"object","properties":{"parentId":{"description":"Identifier of the containing loop or parallel.","type":"string"},"extent":{"description":"Constrains the block to its parent bounds.","type":"string","const":"parent"},"width":{"description":"Rendered container width.","type":"number"},"height":{"description":"Rendered container height.","type":"number"},"collection":{"description":"Items a forEach loop or collection parallel iterates."},"count":{"description":"Iteration count for a `for` loop or count parallel.","type":"number"},"loopType":{"description":"Loop container kind.","type":"string","enum":["for","forEach","while","doWhile"]},"whileCondition":{"description":"Condition expression for a `while` loop.","type":"string"},"doWhileCondition":{"description":"Condition expression for a `doWhile` loop.","type":"string"},"parallelType":{"description":"Parallel container kind.","type":"string","enum":["collection","count"]},"batchSize":{"description":"Maximum concurrent branches of a parallel.","type":"number"},"type":{"description":"Container subtype.","type":"string"},"canonicalModes":{"description":"Per-field editing mode, keyed by canonical parameter id.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["basic","advanced"]}}},"additionalProperties":false,"description":"Container and layout metadata carried by a block."},"locked":{"description":"Whether the block is locked against edits.","type":"boolean"}},"required":["id","type","name","position","subBlocks","outputs","enabled"],"additionalProperties":false,"title":"Workflow block","description":"One node of a workflow graph and its configuration."},"Workflows_WorkflowEdge":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Edge identifier, unique within the workflow."},"source":{"type":"string","minLength":1,"description":"Source block id."},"target":{"type":"string","minLength":1,"description":"Target block id."},"sourceHandle":{"description":"Source port, or null for the block default.","anyOf":[{"type":"string"},{"type":"null"}]},"targetHandle":{"description":"Target port, or null for the block default.","anyOf":[{"type":"string"},{"type":"null"}]},"type":{"description":"Edge renderer type.","type":"string"}},"required":["id","source","target"],"additionalProperties":false,"title":"Workflow edge","description":"A directed connection between two blocks."},"Workflows_WorkflowLoop":{"type":"object","properties":{"id":{"type":"string","description":"Loop container identifier; equal to the loop block id."},"nodes":{"type":"array","items":{"type":"string"},"description":"Block ids inside the loop."},"iterations":{"type":"number","description":"Resolved iteration count."},"loopType":{"type":"string","enum":["for","forEach","while","doWhile"],"description":"Loop kind."},"forEachItems":{"description":"Items a forEach loop iterates, or the expression producing them.","anyOf":[{"type":"array","items":{"description":"One item the loop iterates."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One item the loop iterates."}},{"type":"string"}]},"whileCondition":{"description":"Condition expression for a `while` loop.","type":"string"},"doWhileCondition":{"description":"Condition expression for a `doWhile` loop.","type":"string"},"enabled":{"description":"Whether the loop runs.","type":"boolean"},"locked":{"description":"Whether the loop is locked against edits.","type":"boolean"}},"required":["id","nodes","iterations","loopType"],"additionalProperties":false,"title":"Workflow loop","description":"A loop container derived from the workflow blocks."},"Workflows_WorkflowParallel":{"type":"object","properties":{"id":{"type":"string","description":"Parallel container identifier; equal to the parallel block id."},"nodes":{"type":"array","items":{"type":"string"},"description":"Block ids inside the parallel."},"distribution":{"description":"Items distributed across branches, or the expression producing them.","anyOf":[{"type":"array","items":{"description":"One item distributed to a branch."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One item distributed to a branch."}},{"type":"string"}]},"count":{"description":"Fixed branch count.","type":"number"},"parallelType":{"description":"Parallel kind.","type":"string","enum":["count","collection"]},"batchSize":{"description":"Maximum concurrent branches.","type":"number"},"enabled":{"description":"Whether the parallel runs.","type":"boolean"},"locked":{"description":"Whether the parallel is locked against edits.","type":"boolean"}},"required":["id","nodes"],"additionalProperties":false,"title":"Workflow parallel","description":"A parallel container derived from the workflow blocks."},"Workflows_WorkflowVariable":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Variable identifier."},"name":{"type":"string","description":"Variable name, referenced from block inputs."},"type":{"default":"string","description":"Declared variable type.","type":"string","enum":["string","number","boolean","object","array","plain"]},"value":{"description":"Variable value; free-form and validated per `type` at use time."}},"required":["id","name","type","value"],"additionalProperties":false,"title":"Workflow variable","description":"A workflow-scoped variable."},"Workflows_WorkflowGraph":{"type":"object","properties":{"blocks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowBlock"},"description":"Blocks keyed by block id."},"edges":{"maxItems":10000,"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowEdge"},"description":"Directed connections between blocks."},"loops":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowLoop"},"description":"Loop containers keyed by container id; always present, `{}` when there are none."},"parallels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowParallel"},"description":"Parallel containers keyed by container id; always present, `{}` when there are none."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowVariable"},"description":"Workflow variables keyed by variable id; always present, `{}` when there are none."}},"required":["blocks","edges","loops","parallels","variables"],"additionalProperties":false,"title":"Workflow graph","description":"The editable draft graph of a workflow: blocks, edges, derived loop and parallel containers, and variables."},"Workflows_WorkflowStateResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowGraph"}},"required":["data"],"additionalProperties":false,"title":"Workflow state response","description":"The editable draft graph of a workflow.","examples":[{"data":{"blocks":{},"edges":[],"loops":{},"parallels":{},"variables":{}}}]},"Workflows_WorkflowLintReport":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."}},"required":["blockId","blockName","blockType"],"additionalProperties":false},"description":"Blocks with no incoming edge. A trigger block is naturally a source; anything else here is unreachable."},"sinks":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."}},"required":["blockId","blockName","blockType"],"additionalProperties":false},"description":"Blocks with no outgoing edge."},"orphanBlocks":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."}},"required":["blockId","blockName","blockType"],"additionalProperties":false},"description":"Blocks with neither an incoming nor an outgoing edge."},"emptyOutgoingPorts":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."},"handle":{"type":"string","description":"Source handle with nothing connected to it."},"label":{"type":"string","description":"Human-readable name of the port."}},"required":["blockId","blockName","blockType","handle","label"],"additionalProperties":false},"description":"Branch and container ports that lead nowhere."},"invalidBranchPorts":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."},"sourceHandle":{"type":"string","description":"Source handle that does not match the block."},"reason":{"type":"string","description":"Why the handle is not valid for this block."}},"required":["blockId","blockName","blockType","sourceHandle","reason"],"additionalProperties":false},"description":"Condition and router edges whose source handle names no real branch."},"invalidConnectionTargets":{"type":"array","items":{"type":"object","properties":{"sourceBlockId":{"type":"string","description":"Block the edge leaves."},"sourceBlockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the source block."},"sourceHandle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Handle the edge leaves from."},"targetBlockId":{"type":"string","description":"Block the edge points at."},"reason":{"type":"string","description":"Why the target is not a legal destination."}},"required":["sourceBlockId","sourceBlockName","sourceHandle","targetBlockId","reason"],"additionalProperties":false},"description":"Edges pointing at a block that cannot legally receive them."},"fieldIssues":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."},"missingRequiredFields":{"type":"array","items":{"type":"string"},"description":"Required sub-block fields that resolve empty in the active mode."},"inactiveModeValues":{"type":"array","items":{"type":"object","properties":{"canonicalId":{"type":"string","description":"Canonical parameter the two sub-block modes share."},"activeMemberId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sub-block the runtime reads, where the value should live."},"inactiveMemberId":{"type":"string","description":"Sub-block holding the stranded value, which the runtime ignores."},"kind":{"type":"string","enum":["credential","resource","other"],"description":"What kind of value is stranded."}},"required":["canonicalId","activeMemberId","inactiveMemberId","kind"],"additionalProperties":false},"description":"Values stranded on the inactive member of a canonical pair."}},"required":["blockId","blockName","blockType","missingRequiredFields","inactiveModeValues"],"additionalProperties":false},"description":"Per-block configuration problems. The most actionable part of the report for a headless graph builder: a block missing a required field will fail at run time."},"unresolvedReferences":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."},"field":{"type":"string","description":"Sub-block field holding the reference."},"value":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The reference, or references, that did not resolve."},"kind":{"type":"string","enum":["credential","resource","custom-tool","mcp-tool","skill","block-output"],"description":"What kind of entity the reference was expected to name."},"reason":{"type":"string","description":"Why the reference does not resolve."}},"required":["blockId","blockName","blockType","field","value","kind","reason"],"additionalProperties":false},"description":"Credential, resource, tool, and skill references that do not resolve; `block-output` references that will not work as written: a block that does not exist, or an output field the block does not have (reason `unknown-field`); and text outputs written unquoted in a JSON field (reason `unquoted-json-string`), which leave the field invalid JSON at run time unless the text is itself JSON. These values are still persisted; they are reported, not dropped."},"tableFieldIssues":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Block the finding is about."},"blockName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the block, when it has one."},"blockType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registered type of the block, when it has one."},"field":{"type":"string","description":"The filter or sort field that names no column."},"tableName":{"type":"string","description":"Display name of the table the block is bound to."}},"required":["blockId","blockName","blockType","field","tableName"],"additionalProperties":false},"description":"Table block `filter` and `order` fields checked against the bound table's live schema that name no column (nor the implicit `id`, `createdAt`, `updatedAt`). Such a run fails inside the block's error edge. A filter holding a `<block.output>` reference, or one that is not JSON, is not checked."},"notes":{"type":"array","items":{"type":"string"},"description":"Advisory notes about the report itself."}},"required":["sources","sinks","orphanBlocks","emptyOutgoingPorts","invalidBranchPorts","invalidConnectionTargets","fieldIssues","unresolvedReferences","tableFieldIssues","notes"],"additionalProperties":false,"title":"Workflow lint report","description":"Advisory findings about a saved graph. Findings never block a write or a deploy; they tell a caller what will misbehave at run time."},"Workflows_ReplaceWorkflowStateResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the workflow whose draft graph was written."},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal notes about blocks and edges that were normalized or dropped before persistence. Empty when there was nothing to report."},"needsRedeployment":{"type":"boolean","description":"Whether the live deployment differs from the draft. A graph write never changes what the deployed endpoint serves; deploy to publish it. On a dry run, this describes the state before the proposed write."},"lint":{"$ref":"#/components/schemas/Workflows_WorkflowLintReport"},"dryRun":{"type":"boolean","description":"Whether this request only validated. `true` means nothing was persisted; the findings describe what a committed write of the same body would produce."}},"required":["id","warnings","needsRedeployment","lint","dryRun"],"additionalProperties":false,"title":"Replace workflow state result","description":"Outcome of replacing a workflow draft graph, with its advisory findings."},"Workflows_ReplaceWorkflowStateResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_ReplaceWorkflowStateResult"}},"required":["data"],"additionalProperties":false,"title":"Replace workflow state response","description":"Outcome of replacing a workflow draft graph.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","warnings":[],"needsRedeployment":true,"dryRun":false,"lint":{"sources":[],"sinks":[],"orphanBlocks":[],"emptyOutgoingPorts":[],"invalidBranchPorts":[],"invalidConnectionTargets":[],"fieldIssues":[],"unresolvedReferences":[],"tableFieldIssues":[],"notes":[]}}}]},"Workflows_WorkflowBlockInput":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Block identifier, unique within the workflow."},"type":{"type":"string","minLength":1,"description":"Registered block type."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Block display name; must be unique within the workflow."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Canvas x coordinate."},"y":{"type":"number","description":"Canvas y coordinate."}},"required":["x","y"],"description":"Canvas coordinates of a block."},"subBlocks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Sub-block identifier."},"type":{"type":"string","minLength":1,"description":"Sub-block input type."},"value":{"description":"Configured value; shape depends on the sub-block type."}},"required":["id","type","value"],"description":"One configurable input on a block."},"description":"Configured inputs keyed by sub-block id."},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Declared shape of one output; depends on the block type."},"description":"Declared output shape keyed by output name."},"enabled":{"type":"boolean","description":"Whether the block runs."},"horizontalHandles":{"description":"Whether edge handles render horizontally.","type":"boolean"},"height":{"description":"Rendered block height.","type":"number"},"advancedMode":{"description":"Whether the block is edited in advanced mode.","type":"boolean"},"errorEnabled":{"description":"Whether the block exposes an error branch.","type":"boolean"},"retry":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the block retries on failure."},"maxTries":{"type":"integer","minimum":2,"maximum":5,"description":"Total attempts, including the first."},"waitBetweenTriesMs":{"type":"integer","minimum":0,"maximum":5000,"description":"Delay between attempts, in milliseconds."}},"required":["enabled","maxTries","waitBetweenTriesMs"],"description":"Per-block retry configuration."},"triggerMode":{"description":"Whether the block acts as the workflow trigger.","type":"boolean"},"data":{"type":"object","properties":{"parentId":{"description":"Identifier of the containing loop or parallel.","type":"string"},"extent":{"description":"Constrains the block to its parent bounds.","type":"string","const":"parent"},"width":{"description":"Rendered container width.","type":"number"},"height":{"description":"Rendered container height.","type":"number"},"collection":{"description":"Items a forEach loop or collection parallel iterates."},"count":{"description":"Iteration count for a `for` loop or count parallel.","type":"number"},"loopType":{"description":"Loop container kind.","type":"string","enum":["for","forEach","while","doWhile"]},"whileCondition":{"description":"Condition expression for a `while` loop.","type":"string"},"doWhileCondition":{"description":"Condition expression for a `doWhile` loop.","type":"string"},"parallelType":{"description":"Parallel container kind.","type":"string","enum":["collection","count"]},"batchSize":{"description":"Maximum concurrent branches of a parallel.","type":"number"},"type":{"description":"Container subtype.","type":"string"},"canonicalModes":{"description":"Per-field editing mode, keyed by canonical parameter id.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["basic","advanced"]}}},"description":"Container and layout metadata carried by a block."},"locked":{"description":"Whether the block is locked against edits.","type":"boolean"}},"required":["id","type","name","position","subBlocks","outputs","enabled"],"title":"Workflow block","description":"One node of a workflow graph and its configuration."},"Workflows_WorkflowEdgeInput":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Edge identifier, unique within the workflow."},"source":{"type":"string","minLength":1,"description":"Source block id."},"target":{"type":"string","minLength":1,"description":"Target block id."},"sourceHandle":{"description":"Source port, or null for the block default.","anyOf":[{"type":"string"},{"type":"null"}]},"targetHandle":{"description":"Target port, or null for the block default.","anyOf":[{"type":"string"},{"type":"null"}]},"type":{"description":"Edge renderer type.","type":"string"}},"required":["id","source","target"],"title":"Workflow edge","description":"A directed connection between two blocks."},"Workflows_WorkflowLoopInput":{"type":"object","properties":{"id":{"type":"string","description":"Loop container identifier; equal to the loop block id."},"nodes":{"type":"array","items":{"type":"string"},"description":"Block ids inside the loop."},"iterations":{"type":"number","description":"Resolved iteration count."},"loopType":{"type":"string","enum":["for","forEach","while","doWhile"],"description":"Loop kind."},"forEachItems":{"description":"Items a forEach loop iterates, or the expression producing them.","anyOf":[{"type":"array","items":{"description":"One item the loop iterates."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One item the loop iterates."}},{"type":"string"}]},"whileCondition":{"description":"Condition expression for a `while` loop.","type":"string"},"doWhileCondition":{"description":"Condition expression for a `doWhile` loop.","type":"string"},"enabled":{"description":"Whether the loop runs.","type":"boolean"},"locked":{"description":"Whether the loop is locked against edits.","type":"boolean"}},"required":["id","nodes","iterations","loopType"],"title":"Workflow loop","description":"A loop container derived from the workflow blocks."},"Workflows_WorkflowParallelInput":{"type":"object","properties":{"id":{"type":"string","description":"Parallel container identifier; equal to the parallel block id."},"nodes":{"type":"array","items":{"type":"string"},"description":"Block ids inside the parallel."},"distribution":{"description":"Items distributed across branches, or the expression producing them.","anyOf":[{"type":"array","items":{"description":"One item distributed to a branch."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One item distributed to a branch."}},{"type":"string"}]},"count":{"description":"Fixed branch count.","type":"number"},"parallelType":{"description":"Parallel kind.","type":"string","enum":["count","collection"]},"batchSize":{"description":"Maximum concurrent branches.","type":"number"},"enabled":{"description":"Whether the parallel runs.","type":"boolean"},"locked":{"description":"Whether the parallel is locked against edits.","type":"boolean"}},"required":["id","nodes"],"title":"Workflow parallel","description":"A parallel container derived from the workflow blocks."},"Workflows_WorkflowVariableInput":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Variable identifier."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Variable name, referenced from block inputs."},"type":{"type":"string","enum":["string","number","boolean","object","array","plain"],"description":"Declared variable type."},"value":{"description":"Variable value; free-form and validated per `type` at use time."}},"required":["id","name","type","value"],"title":"Workflow variable","description":"A workflow-scoped variable."},"Workflows_ReplaceWorkflowStateRequest":{"type":"object","properties":{"blocks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowBlockInput"},"description":"Blocks keyed by block id."},"edges":{"maxItems":10000,"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowEdgeInput"},"description":"Directed connections between blocks."},"loops":{"description":"Ignored on write: loop containers are recomputed from `blocks`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowLoopInput"}},"parallels":{"description":"Ignored on write: parallel containers are recomputed from `blocks`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowParallelInput"}},"variables":{"description":"Replacement variable set. Omit to leave the stored variables untouched.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Workflows_WorkflowVariableInput"}}},"required":["blocks","edges"],"additionalProperties":false,"title":"Replace workflow state request","description":"A complete replacement draft graph for a workflow.","examples":[{"blocks":{},"edges":[]}]},"Workflows_WorkflowSkippedItem":{"type":"object","properties":{"type":{"type":"string","enum":["block_not_found","invalid_block_type","block_not_allowed","model_not_allowed","block_locked","tool_not_allowed","invalid_edge_target","invalid_edge_source","invalid_edge_scope","invalid_source_handle","invalid_target_handle","invalid_subblock_field","missing_required_params","invalid_subflow_parent","nested_subflow_not_allowed","duplicate_block_name","reserved_block_name","retry_not_supported","duplicate_trigger","duplicate_single_instance_block","disabled_ancestor"],"description":"Machine-readable reason the engine declined an operation."},"operationType":{"type":"string","description":"The `operation_type` that was declined."},"blockId":{"type":"string","description":"Block the declined operation targeted."},"reason":{"type":"string","description":"Human-readable explanation."},"details":{"description":"Additional context for the reason; keys depend on `type`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One piece of engine-supplied context for the reason."}}},"required":["type","operationType","blockId","reason"],"additionalProperties":false,"title":"Workflow skipped item","description":"One operation the edit engine did not apply."},"Workflows_WorkflowInputValidationError":{"type":"object","properties":{"blockId":{"type":"string","description":"Block whose input was rejected."},"blockType":{"type":"string","description":"Type of the block whose input was rejected."},"field":{"type":"string","description":"Sub-block field that was rejected."},"error":{"type":"string","description":"Why the value was rejected."}},"required":["blockId","blockType","field","error"],"additionalProperties":false,"title":"Workflow input validation error","description":"One block input that was dropped rather than persisted."},"Workflows_ApplyWorkflowOperationsResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the workflow whose draft graph was written."},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal notes about blocks and edges that were normalized or dropped before persistence. Empty when there was nothing to report."},"needsRedeployment":{"type":"boolean","description":"Whether the live deployment differs from the draft. A graph write never changes what the deployed endpoint serves; deploy to publish it. On a dry run, this describes the state before the proposed write."},"applied":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Operations the engine applied."},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowSkippedItem"},"description":"Operations the engine declined. Empty when everything applied."},"deferred":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowSkippedItem"},"description":"Edges waiting for target blocks. They apply automatically when their targets exist, in this batch or a later one. Do not resubmit them."},"inputValidationErrors":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowInputValidationError"},"description":"Block inputs that were dropped rather than persisted, and only those. The rest of the operation still applied. References that merely fail to resolve stay persisted and are reported in `lint.unresolvedReferences` instead."},"mintedBlockIds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","description":"The id the block was actually given."},"description":"Assigned IDs keyed by requested `block_id`, including only changed IDs. `add` and `insert_into_subflow` replace non-UUID labels with minted UUIDs. References within the batch are remapped automatically; later requests must use the minted IDs. Supply UUIDs to preserve your chosen IDs. Empty on dry runs, which return provisional IDs in `previewBlockIds` instead."},"previewBlockIds":{"description":"Dry run only: the provisional id the evaluation assigned to each block whose `block_id` was not already a UUID, keyed by the `block_id` you asked for. These are not the ids a committed apply produces — the real apply mints new ones — so never wire a later request against them. Wire edges by `block_id` within one batch, or by the `mintedBlockIds` the real apply returns.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","description":"The provisional id the dry run assigned."}},"lint":{"$ref":"#/components/schemas/Workflows_WorkflowLintReport"},"dryRun":{"type":"boolean","description":"Whether this request only evaluated. `true` means nothing was persisted; the outcome describes what a committed apply of the same body would produce."}},"required":["id","warnings","needsRedeployment","applied","skipped","deferred","inputValidationErrors","mintedBlockIds","lint","dryRun"],"additionalProperties":false,"title":"Apply workflow operations result","description":"Outcome of a batch of semantic edits against a workflow graph."},"Workflows_ApplyWorkflowOperationsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_ApplyWorkflowOperationsResult"}},"required":["data"],"additionalProperties":false,"title":"Apply workflow operations response","description":"Outcome of a batch of semantic edits.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","applied":1,"skipped":[],"deferred":[],"inputValidationErrors":[],"mintedBlockIds":{"agent-1":"a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77"},"lint":{"sources":[],"sinks":[],"orphanBlocks":[],"emptyOutgoingPorts":[],"invalidBranchPorts":[],"invalidConnectionTargets":[],"fieldIssues":[{"blockId":"a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77","blockName":"Triage","blockType":"agent","missingRequiredFields":["systemPrompt"],"inactiveModeValues":[]}],"unresolvedReferences":[],"tableFieldIssues":[],"notes":[]},"warnings":[],"needsRedeployment":true,"dryRun":false}}]},"Workflows_WorkflowEditOperation":{"oneOf":[{"type":"object","properties":{"operation_type":{"type":"string","const":"add","description":"Create a new block."},"block_id":{"type":"string","minLength":1,"description":"Block the operation targets. For `add`, the id the new block will be given."},"params":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"Registered block type."},"name":{"type":"string","minLength":1,"description":"Block display name."},"inputs":{"allOf":[{"type":"object","properties":{"tools":{"description":"Agent tools configuration. Applies to a `tool-input` field; other block inputs remain catalog-defined.","$ref":"#/components/schemas/Workflows_AgentToolInput"}},"additionalProperties":{"description":"One block-specific input whose accepted shape is published by the block catalog."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One block-specific input whose accepted shape is published by the block catalog."}}],"description":"Block configuration keyed by sub-block id."}},"required":["type","name"],"additionalProperties":{"description":"One block-specific input or connection descriptor."},"description":"Block `type`, `name`, and optional `inputs`, `connections`, `retry`, `triggerMode`, or `advancedMode`. `inputs` maps sub-block ids directly to values, never through `subBlocks`. Keep `retry`, `triggerMode`, and `advancedMode` beside `inputs`. `connections` maps source handles to target ids, `{ block, handle }`, or arrays; `success` aliases `source`."}},"required":["operation_type","block_id","params"],"additionalProperties":false},{"type":"object","properties":{"operation_type":{"type":"string","const":"edit","description":"Change an existing block: its inputs, name, or connections."},"block_id":{"type":"string","minLength":1,"description":"Block the operation targets. For `add`, the id the new block will be given."},"params":{"allOf":[{"type":"object","properties":{"inputs":{"allOf":[{"type":"object","properties":{"tools":{"description":"Agent tools configuration. Applies to a `tool-input` field; other block inputs remain catalog-defined.","$ref":"#/components/schemas/Workflows_AgentToolInput"}},"additionalProperties":{"description":"One block-specific input whose accepted shape is published by the block catalog."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One block-specific input whose accepted shape is published by the block catalog."}}],"description":"Block configuration keyed by sub-block id."}},"additionalProperties":{"description":"One operation parameter; see the description for the accepted keys."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One operation parameter; see the description for the accepted keys."}}],"description":"Patch only supplied fields: `inputs`, `name`, `connections`, `removeEdges`, `nestedNodes`, `retry`, `triggerMode`, and `advancedMode`. `inputs` maps sub-block ids directly to values, never through `subBlocks`. Keep `retry`, `triggerMode`, and `advancedMode` beside `inputs`. `connections` maps source handles to target ids, `{ block, handle }`, or arrays; `success` aliases `source`. Re-sending `connections` replaces outgoing edges; use `removeEdges` to delete selected edges."}},"required":["operation_type","block_id","params"],"additionalProperties":false},{"type":"object","properties":{"operation_type":{"type":"string","const":"delete","description":"Remove a block and every edge touching it."},"block_id":{"type":"string","minLength":1,"description":"Block the operation targets. For `add`, the id the new block will be given."}},"required":["operation_type","block_id"],"additionalProperties":false},{"type":"object","properties":{"operation_type":{"type":"string","const":"insert_into_subflow","description":"Create a block inside a loop or parallel container."},"block_id":{"type":"string","minLength":1,"description":"Block the operation targets. For `add`, the id the new block will be given."},"params":{"type":"object","properties":{"subflowId":{"type":"string","minLength":1,"description":"Loop or parallel container to insert the block into."},"type":{"type":"string","minLength":1,"description":"Registered block type."},"name":{"type":"string","minLength":1,"description":"Block display name."},"inputs":{"allOf":[{"type":"object","properties":{"tools":{"description":"Agent tools configuration. Applies to a `tool-input` field; other block inputs remain catalog-defined.","$ref":"#/components/schemas/Workflows_AgentToolInput"}},"additionalProperties":{"description":"One block-specific input whose accepted shape is published by the block catalog."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One block-specific input whose accepted shape is published by the block catalog."}}],"description":"Block configuration keyed by sub-block id."}},"required":["subflowId","type","name"],"additionalProperties":{"description":"One block-specific input or connection descriptor."},"description":"Container, block `type`, `name`, and the same optional fields as `add`. `inputs` maps sub-block ids directly to values, never through `subBlocks`. Keep `retry`, `triggerMode`, and `advancedMode` beside `inputs`. `connections` maps source handles to target ids, `{ block, handle }`, or arrays; `success` aliases `source`."}},"required":["operation_type","block_id","params"],"additionalProperties":false},{"type":"object","properties":{"operation_type":{"type":"string","const":"extract_from_subflow","description":"Move a block out of its loop or parallel container."},"block_id":{"type":"string","minLength":1,"description":"Block the operation targets. For `add`, the id the new block will be given."},"params":{"type":"object","properties":{"subflowId":{"type":"string","minLength":1,"description":"Loop or parallel container the block moves into or out of."}},"required":["subflowId"],"additionalProperties":{"description":"One block-specific input."},"description":"Container identifier, plus any block-specific inputs."}},"required":["operation_type","block_id","params"],"additionalProperties":false}],"title":"Workflow edit operation","description":"One semantic edit against a workflow graph."},"Workflows_AgentToolInput":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Workflows_AgentTool"},"description":"The complete value stored in an Agent block’s `tools` input.","title":"Agent tools input"},"Workflows_AgentTool":{"oneOf":[{"$ref":"#/components/schemas/Workflows_AgentIntegrationTool"},{"$ref":"#/components/schemas/Workflows_AgentCustomTool"},{"$ref":"#/components/schemas/Workflows_AgentMcpTool"},{"$ref":"#/components/schemas/Workflows_AgentMcpServerAdvanced"}],"title":"Agent tool","description":"A catalog integration operation, workspace custom tool, or MCP tool available to an Agent."},"Workflows_AgentIntegrationTool":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":255,"pattern":"^(?!(?:custom-tool|mcp|mcp-server-advanced)$).+$","description":"Catalog block id, such as `cloudwatch` or `slack`. Use the block id, never an underlying tool id."},"operation":{"description":"Operation ID from Get Block. Required when the block exposes multiple operations; it may differ from the tool ID.","type":"string","minLength":1,"maxLength":255},"usageControl":{"type":"string","enum":["auto","force","none"],"description":"Selector Permission Mode: `auto` lets the model decide, `force` requires a call, and `none` disables it. Supply this property and omit `usageControlExpression` to select or switch to Selector mode; do not send null or set `canonicalModes` or block-level `advancedMode`. With neither property, the default is `auto`."},"usageControlExpression":{"type":"string","maxLength":2048,"description":"Variable Permission Mode: a reference such as `<start.toolMode>` or a literal such as `none`, resolving to `auto`, `force`, or `none` at execution time. Supply this property and omit `usageControl` to select or switch to Variable mode; do not send null or set `canonicalModes` or block-level `advancedMode`."},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One tool parameter value."},"description":"Parameters fixed by the workflow author. Parameters left out remain available for the model to supply when the tool declares them."}},"required":["type"],"additionalProperties":{"description":"Forward-compatible integration tool metadata preserved by the workflow editor."},"title":"Agent integration tool","description":"A catalog integration operation the Agent may call. Resolve valid block and operation ids through the block catalog.","examples":[{"type":"cloudwatch","operation":"describe_alarm_history","usageControl":"auto","params":{}}]},"Workflows_AgentCustomTool":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"custom-tool","description":"Custom-tool discriminator."},"customToolId":{"type":"string","minLength":1,"maxLength":255,"description":"Custom tool ID from List Custom Tools."},"usageControl":{"type":"string","enum":["auto","force","none"],"description":"Selector Permission Mode: `auto` lets the model decide, `force` requires a call, and `none` disables it. Supply this property and omit `usageControlExpression` to select or switch to Selector mode; do not send null or set `canonicalModes` or block-level `advancedMode`. With neither property, the default is `auto`."},"usageControlExpression":{"type":"string","maxLength":2048,"description":"Variable Permission Mode: a reference such as `<start.toolMode>` or a literal such as `none`, resolving to `auto`, `force`, or `none` at execution time. Supply this property and omit `usageControl` to select or switch to Variable mode; do not send null or set `canonicalModes` or block-level `advancedMode`."}},"required":["type","customToolId"],"additionalProperties":{"description":"Forward-compatible custom tool metadata preserved by the workflow editor."}},{"type":"object","properties":{"type":{"type":"string","const":"custom-tool","description":"Custom-tool discriminator."},"schema":{"type":"object","properties":{"type":{"description":"Function declaration discriminator.","type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Function name presented to the model."},"description":{"description":"What the inline custom tool does.","type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One JSON Schema keyword on the function parameters."},"description":"JSON Schema describing the function arguments."}},"required":["name","parameters"],"additionalProperties":{"description":"Additional function declaration metadata."},"description":"OpenAI-style function definition."}},"required":["function"],"additionalProperties":{"description":"Additional custom tool declaration metadata."},"description":"Inline OpenAI-style function declaration."},"code":{"type":"string","description":"Inline tool implementation executed by the Function runtime."},"usageControl":{"type":"string","enum":["auto","force","none"],"description":"Selector Permission Mode: `auto` lets the model decide, `force` requires a call, and `none` disables it. Supply this property and omit `usageControlExpression` to select or switch to Selector mode; do not send null or set `canonicalModes` or block-level `advancedMode`. With neither property, the default is `auto`."},"usageControlExpression":{"type":"string","maxLength":2048,"description":"Variable Permission Mode: a reference such as `<start.toolMode>` or a literal such as `none`, resolving to `auto`, `force`, or `none` at execution time. Supply this property and omit `usageControl` to select or switch to Variable mode; do not send null or set `canonicalModes` or block-level `advancedMode`."}},"required":["type","schema","code"],"additionalProperties":{"description":"Forward-compatible custom tool metadata preserved by the workflow editor."}}],"title":"Agent custom tool","description":"A workspace custom tool. Prefer `customToolId`; inline declarations are also accepted.","examples":[{"type":"custom-tool","customToolId":"cst_01J9X2ABCDEF","usageControl":"auto"}]},"Workflows_AgentMcpTool":{"type":"object","properties":{"type":{"type":"string","const":"mcp","description":"MCP-tool discriminator."},"params":{"allOf":[{"type":"object","properties":{"serverId":{"type":"string","minLength":1,"maxLength":128,"description":"MCP server id returned by `GET /api/v2/mcp-servers`."},"toolName":{"type":"string","minLength":1,"maxLength":256,"description":"Tool name returned by the MCP server’s tools endpoint."}},"required":["serverId","toolName"],"additionalProperties":{"description":"One parameter fixed by the workflow author."}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One parameter fixed by the workflow author."}}],"description":"MCP server and tool identity plus any tool arguments fixed by the workflow author."},"usageControl":{"type":"string","enum":["auto","force","none"],"description":"Selector Permission Mode: `auto` lets the model decide, `force` requires a call, and `none` disables it. Supply this property and omit `usageControlExpression` to select or switch to Selector mode; do not send null or set `canonicalModes` or block-level `advancedMode`. With neither property, the default is `auto`."},"usageControlExpression":{"type":"string","maxLength":2048,"description":"Variable Permission Mode: a reference such as `<start.toolMode>` or a literal such as `none`, resolving to `auto`, `force`, or `none` at execution time. Supply this property and omit `usageControl` to select or switch to Variable mode; do not send null or set `canonicalModes` or block-level `advancedMode`."}},"required":["type","params"],"additionalProperties":{"description":"Forward-compatible MCP tool metadata preserved by the workflow editor."},"title":"Agent MCP tool","description":"One tool discovered from a workspace MCP server.","examples":[{"type":"mcp","params":{"serverId":"mcp_01J9X2ABCDEF","toolName":"search_docs"},"usageControl":"auto"}]},"Workflows_AgentMcpServerAdvanced":{"type":"object","properties":{"type":{"type":"string","const":"mcp-server-advanced","description":"Server-wide MCP binding discriminator."},"operationPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all","description":"Allow all operations available to the authorized credential."}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"allow","description":"Allow only the selected exact operations."},"operations":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"description":"Exact MCP tool name on the resolved connection, without a Sim server prefix."},"description":"Allowed exact MCP tool names; an empty list grants no access."}},"required":["mode","operations"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"deny","description":"Exclude the selected exact operations."},"operations":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"description":"Exact MCP tool name on the resolved connection, without a Sim server prefix."},"description":"Denied exact MCP tool names; an empty list allows otherwise permitted tools."}},"required":["mode","operations"],"additionalProperties":false}],"description":"Saved workflow operation restrictions that can only narrow authorized credential access."},"params":{"type":"object","properties":{"serverId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace MCP server ID or explicit credential-group managed MCP connection ID."}},"required":["serverId"],"additionalProperties":false,"description":"Executable server or connection identity for authorized operation discovery and execution."},"usageControl":{"type":"string","enum":["auto","force","none"],"description":"Selector Permission Mode: `auto` lets the model decide, `force` requires a call, and `none` disables it. Supply this property and omit `usageControlExpression` to select or switch to Selector mode; do not send null or set `canonicalModes` or block-level `advancedMode`. With neither property, the default is `auto`."},"usageControlExpression":{"type":"string","maxLength":2048,"description":"Variable Permission Mode: a reference such as `<start.toolMode>` or a literal such as `none`, resolving to `auto`, `force`, or `none` at execution time. Supply this property and omit `usageControl` to select or switch to Variable mode; do not send null or set `canonicalModes` or block-level `advancedMode`."}},"required":["type","params"],"additionalProperties":{"description":"Forward-compatible MCP server metadata preserved by the workflow editor."},"title":"Agent MCP server (advanced)","description":"Dynamically discovered operations permitted by the authorized credential and saved block policy.","examples":[{"type":"mcp-server-advanced","params":{"serverId":"mcp_01J9X2ABCDEF"},"usageControl":"auto"}]},"Workflows_ApplyWorkflowOperationsRequest":{"type":"object","properties":{"operations":{"minItems":1,"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowEditOperation"},"description":"Edits to apply, in a single batch."},"atomic":{"default":false,"description":"Fail the whole batch when any operation is declined or any block input would be dropped. The default applies what it can and reports the rest in `skipped` and `inputValidationErrors`; `true` writes nothing and answers `409` instead.","type":"boolean"},"layout":{"default":"targeted","description":"Whether to reposition blocks the batch touched. `targeted` (default) nudges only the affected subgraph; `none` leaves every position exactly as supplied.","type":"string","enum":["targeted","none"]},"setBlockEnabled":{"description":"Blocks to enable or disable, applied after `operations`. Disabling a loop or parallel cascades to its unlocked descendants; enabling a block whose container is disabled is declined.","maxItems":200,"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","minLength":1,"description":"Block the operation targets. For `add`, the id the new block will be given."},"enabled":{"type":"boolean","description":"Whether the block should run."}},"required":["block_id","enabled"],"additionalProperties":false}}},"required":["operations"],"additionalProperties":false,"title":"Apply workflow operations request","description":"A batch of semantic edits against a workflow graph.","examples":[{"operations":[{"operation_type":"add","block_id":"agent-1","params":{"type":"agent","name":"Triage","inputs":{"tools":[{"type":"cloudwatch","operation":"describe_alarm_history","usageControl":"auto","params":{}}]}}}]}]},"Workflows_ApplyWorkflowVariablesResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the workflow whose variables were updated."},"variableCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of variables after the batch."},"changed":{"type":"boolean","description":"Whether anything actually changed. A no-op batch answers `200` with `false`."}},"required":["id","variableCount","changed"],"additionalProperties":false,"title":"Apply workflow variables result","description":"Outcome of a workflow variable update."},"Workflows_ApplyWorkflowVariablesResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_ApplyWorkflowVariablesResult"}},"required":["data"],"additionalProperties":false,"title":"Apply workflow variables response","description":"Outcome of a workflow variable update.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","variableCount":3,"changed":true}}]},"Workflows_ApplyWorkflowVariablesRequest":{"type":"object","properties":{"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"operation":{"type":"string","const":"add","description":"Create a variable with this name."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Variable name."},"type":{"type":"string","enum":["string","number","boolean","object","array","plain"],"description":"Declared variable type."},"value":{"description":"Variable value, coerced to `type`."}},"required":["operation","name","type","value"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"edit","description":"Replace the value, and optionally the type, of an existing variable."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the variable to update."},"type":{"description":"Replacement type; the stored type is kept when omitted.","type":"string","enum":["string","number","boolean","object","array","plain"]},"value":{"description":"Replacement value, coerced to the effective type."}},"required":["operation","name","value"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"delete","description":"Remove the variable with this name."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the variable to remove."}},"required":["operation","name"],"additionalProperties":false}],"description":"One variable change."},"description":"Variable changes to apply, in order."}},"required":["operations"],"additionalProperties":false,"title":"Apply workflow variables request","description":"Additions, edits, and deletions against a workflow’s variables."},"Workflows_DuplicateWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowListItem"}},"required":["data"],"additionalProperties":false,"title":"Duplicate workflow response","description":"The created copy.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage (copy)","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":false,"deployedAt":null,"runCount":0,"lastRunAt":null,"createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}}]},"Workflows_DuplicateWorkflowRequest":{"type":"object","properties":{"name":{"description":"Name for the copy. Defaults to the source name, deduplicated within the folder.","type":"string","minLength":1,"maxLength":255},"folderPath":{"description":"Destination folder path. Defaults to the source workflow's folder.","$ref":"#/components/schemas/Workflows_FolderPathInput"}},"additionalProperties":false,"title":"Duplicate workflow request","description":"Optional name and destination folder for the copy."},"Workflows_RestoreWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowListItem"}},"required":["data"],"additionalProperties":false,"title":"Restore workflow response","description":"The restored workflow.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}}]},"Workflows_MoveWorkflowsResult":{"type":"object","properties":{"moved":{"type":"array","items":{"type":"string"},"description":"Workflows that were relocated."},"failed":{"type":"array","items":{"type":"string"},"description":"Workflows that were not relocated — absent from the workspace, archived, or locked. Best-effort by design: the rest of the batch still moved."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical destination folder path.","maxLength":4096}},"required":["moved","failed","folderPath"],"additionalProperties":false,"title":"Move workflows result","description":"Which workflows moved and which did not."},"Workflows_MoveWorkflowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_MoveWorkflowsResult"}},"required":["data"],"additionalProperties":false,"title":"Move workflows response","description":"Which workflows moved and which did not.","examples":[{"data":{"moved":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"],"failed":[],"folderPath":"/Operations"}}]},"Workflows_MoveWorkflowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace holding every workflow in the batch."},"workflowIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Workflows to move. Duplicates are collapsed."},"folderPath":{"description":"Destination folder path; `/` moves the workflows to the workspace root.","$ref":"#/components/schemas/Workflows_FolderPathInput"}},"required":["workspaceId","workflowIds","folderPath"],"additionalProperties":false,"title":"Move workflows request","description":"Workflows to relocate and the folder to relocate them into."},"Workflows_WorkflowInputField":{"type":"object","properties":{"name":{"type":"string","description":"Input field name."},"type":{"type":"string","description":"Input field type."},"description":{"description":"Optional input field description.","type":"string"}},"required":["name","type"],"additionalProperties":false,"title":"Workflow input field","description":"An input field from an input-definition trigger in the saved draft."},"Workflows_WorkflowDetail":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Workflow name.","examples":["Customer support triage"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description, or null when none is set."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path; `/` is the workspace root.","maxLength":4096,"examples":["/Operations"]},"workspaceId":{"type":"string","description":"Workspace that owns the workflow."},"isDeployed":{"type":"boolean","description":"Whether the workflow has an active deployment."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 activation timestamp, or null when not deployed.","format":"date-time"},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Settled runs — completed, failed, or cancelled — counted as each one finishes; a paused run is counted once it settles. The counter is never reduced when a run ages out of log retention, so it can exceed the results returned by List workflow runs."},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp of the latest settled run, whatever its outcome, or null when the workflow has never run.","format":"date-time"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was last updated.","format":"date-time"},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Structured workflow variable value."},"description":"Workflow-scoped variables keyed by variable identifier."},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowInputField"},"description":"Input fields from the saved draft's input-definition trigger; they may differ from the live deployment."}},"required":["id","webUrl","name","description","folderPath","workspaceId","isDeployed","deployedAt","runCount","lastRunAt","createdAt","updatedAt","variables","inputs"],"additionalProperties":false,"title":"Workflow detail","description":"Workflow metadata, variables, and saved draft trigger input fields."},"Workflows_WorkflowDetailResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowDetail"}},"required":["data"],"additionalProperties":false,"title":"Workflow detail response","description":"Detailed workflow metadata, variables, and trigger inputs.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z","variables":{},"inputs":[]}}]},"Workflows_UpdateWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowListItem"}},"required":["data"],"additionalProperties":false,"title":"Update workflow response","description":"The updated workflow summary.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/w/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","folderPath":"/Operations","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isDeployed":true,"deployedAt":"2026-06-12T10:30:00.000Z","runCount":42,"lastRunAt":"2026-08-09T18:04:11.000Z","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z"}}]},"Workflows_UpdateWorkflowRequest":{"type":"object","properties":{"name":{"description":"Replacement workflow name.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement workflow description; null clears it.","anyOf":[{"type":"string","maxLength":50000},{"type":"null"}]},"folderPath":{"description":"Destination folder path; `/` moves the workflow to the workspace root.","$ref":"#/components/schemas/Workflows_FolderPathInput"}},"additionalProperties":false,"title":"Update workflow request","description":"Fields to update on an existing workflow."},"Workflows_DeleteWorkflowResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the archived workflow."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the workflow is no longer live."},"archived":{"type":"boolean","const":true,"description":"Whether the workflow was archived. Restore workflow recovers it and the schedules, webhooks, MCP tools, and chats archived with it."}},"required":["id","deleted","archived"],"additionalProperties":false,"title":"Delete workflow result","description":"Confirmation that a workflow was archived."},"Workflows_DeleteWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_DeleteWorkflowResult"}},"required":["data"],"additionalProperties":false,"title":"Delete workflow response","description":"Confirmation that the workflow was archived.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deleted":true,"archived":true}}]},"Workflows_WorkflowVersion":{"type":"object","properties":{"id":{"type":"string","description":"Unique deployment-version identifier."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Monotonically increasing deployment version number."},"name":{"description":"Optional deployment-version label.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"description":"Optional deployment-version release note.","anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean","description":"Whether this version is currently serving executions."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when this version was created.","format":"date-time"},"deployedBy":{"description":"Display name of the user who created the deployment, when available.","anyOf":[{"type":"string"},{"type":"null"}]},"latestOperationStatus":{"description":"Latest lifecycle-operation status for this version.","anyOf":[{"type":"string","enum":["preparing","activating","active","failed","superseded"]},{"type":"null"}]}},"required":["id","version","isActive","createdAt"],"additionalProperties":false,"title":"Workflow version","description":"A saved deployment version of a workflow."},"Workflows_WorkflowVersionListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowVersion"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Workflow version list response","description":"A cursor-paginated page of deployment versions.","examples":[{"data":[{"id":"version_3","version":3,"name":"Escalation routing","description":"Adds the priority escalation branch.","isActive":true,"createdAt":"2026-06-12T10:30:00.000Z","deployedBy":"Jane Smith","latestOperationStatus":"active"}],"nextCursor":null}]},"Workflows_WorkflowVersionComparison":{"type":"object","properties":{"workflowId":{"type":"string","description":"Workflow compared."},"base":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Base deployment version."},"target":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Target deployment version."},"diff":{"type":"object","properties":{"addedBlocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable block identifier."},"type":{"type":"string","description":"Block type."},"name":{"description":"Block name.","type":"string"}},"required":["id","type"],"additionalProperties":false},"description":"Blocks present only in the target."},"removedBlocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable block identifier."},"type":{"type":"string","description":"Block type."},"name":{"description":"Block name.","type":"string"}},"required":["id","type"],"additionalProperties":false},"description":"Blocks present only in the base."},"modifiedBlocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable block identifier."},"type":{"type":"string","description":"Block type."},"name":{"description":"Block name.","type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Changed field identifier."},"oldValue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"unset","description":"The field has no configured value."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"The value is withheld by the credential policy."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"value","description":"The field value is included."},"value":{"description":"The complete user-authored field value."}},"required":["kind","value"],"additionalProperties":false}],"description":"Base version value."},"newValue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"unset","description":"The field has no configured value."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"The value is withheld by the credential policy."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"value","description":"The field value is included."},"value":{"description":"The complete user-authored field value."}},"required":["kind","value"],"additionalProperties":false}],"description":"Target version value."},"scope":{"type":"string","enum":["block","subblock"],"description":"Whether the field is a block setting or a subblock input."}},"required":["field","oldValue","newValue","scope"],"additionalProperties":false},"description":"Changed field values."}},"required":["id","type","changes"],"additionalProperties":false},"description":"Blocks with changed fields."},"edgeChanges":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number added."},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number removed."},"addedDetails":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"Stable source block identifier."},"target":{"type":"string","description":"Stable target block identifier."},"sourceHandle":{"description":"Source port identifier; omitted for the default port.","type":"string"},"targetHandle":{"description":"Target port identifier; omitted for the default port.","type":"string"},"sourceName":{"type":"string","description":"Source block name."},"targetName":{"type":"string","description":"Target block name."}},"required":["source","target","sourceName","targetName"],"additionalProperties":false},"description":"Added connections."},"removedDetails":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"Stable source block identifier."},"target":{"type":"string","description":"Stable target block identifier."},"sourceHandle":{"description":"Source port identifier; omitted for the default port.","type":"string"},"targetHandle":{"description":"Target port identifier; omitted for the default port.","type":"string"},"sourceName":{"type":"string","description":"Source block name."},"targetName":{"type":"string","description":"Target block name."}},"required":["source","target","sourceName","targetName"],"additionalProperties":false},"description":"Removed connections."}},"required":["added","removed","addedDetails","removedDetails"],"additionalProperties":false,"description":"Connection changes."},"loopChanges":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number added."},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number removed."},"modified":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number modified."}},"required":["added","removed","modified"],"additionalProperties":false,"description":"Loop change counts."},"parallelChanges":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number added."},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number removed."},"modified":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number modified."}},"required":["added","removed","modified"],"additionalProperties":false,"description":"Parallel change counts."},"containerChanges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Container block ID."},"kind":{"type":"string","enum":["loop","parallel"],"description":"Container type."},"name":{"description":"Container name.","type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Changed field identifier."},"oldValue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"unset","description":"The field has no configured value."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"The value is withheld by the credential policy."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"value","description":"The field value is included."},"value":{"description":"The complete user-authored field value."}},"required":["kind","value"],"additionalProperties":false}],"description":"Base version value."},"newValue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"unset","description":"The field has no configured value."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"The value is withheld by the credential policy."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"value","description":"The field value is included."},"value":{"description":"The complete user-authored field value."}},"required":["kind","value"],"additionalProperties":false}],"description":"Target version value."}},"required":["field","oldValue","newValue"],"additionalProperties":false},"description":"Changed field values."},"nodesAdded":{"type":"array","items":{"type":"string"},"description":"Added member block IDs."},"nodesRemoved":{"type":"array","items":{"type":"string"},"description":"Removed member block IDs."}},"required":["id","kind","changes","nodesAdded","nodesRemoved"],"additionalProperties":false},"description":"Container configuration and membership changes."},"variableChanges":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number added."},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number removed."},"modified":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number modified."},"addedNames":{"type":"array","items":{"type":"string"},"description":"Names of added variables."},"removedNames":{"type":"array","items":{"type":"string"},"description":"Names of removed variables."},"modifiedNames":{"type":"array","items":{"type":"string"},"description":"Names of modified variables."}},"required":["added","removed","modified","addedNames","removedNames","modifiedNames"],"additionalProperties":false,"description":"Variable change counts and names."},"hasChanges":{"type":"boolean","description":"Whether any semantic change was found."}},"required":["addedBlocks","removedBlocks","modifiedBlocks","edgeChanges","loopChanges","parallelChanges","containerChanges","variableChanges","hasChanges"],"additionalProperties":false,"description":"Changes from base to target."}},"required":["workflowId","base","target","diff"],"additionalProperties":false,"title":"Workflow version comparison","description":"Semantic changes from base to target within one workflow. Credential-bearing fields are redacted; changes to them are still reported. Canvas layout is excluded."},"Workflows_WorkflowVersionComparisonResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowVersionComparison"}},"required":["data"],"additionalProperties":false,"title":"Workflow version comparison response","description":"Changes from base to target, with credential values withheld.","examples":[{"data":{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","base":1,"target":2,"diff":{"addedBlocks":[],"removedBlocks":[],"modifiedBlocks":[],"edgeChanges":{"added":0,"removed":0,"addedDetails":[],"removedDetails":[]},"loopChanges":{"added":0,"removed":0,"modified":0},"parallelChanges":{"added":0,"removed":0,"modified":0},"containerChanges":[],"variableChanges":{"added":0,"removed":0,"modified":0,"addedNames":[],"removedNames":[],"modifiedNames":[]},"hasChanges":false}}}]},"Workflows_DeployedWorkflowState":{"title":"Deployed workflow state","description":"Workflow graph snapshot pinned by a deployment version.","type":"object","additionalProperties":true},"Workflows_WorkflowVersionDetail":{"type":"object","properties":{"id":{"type":"string","description":"Unique deployment-version identifier."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Monotonically increasing deployment version number."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version label, or null when unset."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version release note, or null when unset."},"isActive":{"type":"boolean","description":"Whether this version is currently serving executions."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when this version was created.","format":"date-time"},"state":{"description":"Graph pinned by this version, with registered credential fields and opaque table/tool values cleared. Environment references and ordinary workflow variables remain included; inspect other configuration before sharing.","$ref":"#/components/schemas/Workflows_DeployedWorkflowState"}},"required":["id","version","name","description","isActive","createdAt","state"],"additionalProperties":false,"title":"Workflow version detail","description":"A deployment version together with the workflow state it pins."},"Workflows_WorkflowVersionDetailResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowVersionDetail"}},"required":["data"],"additionalProperties":false,"title":"Workflow version detail response","description":"The deployment version and its pinned workflow graph.","examples":[{"data":{"id":"version_3","version":3,"name":"Escalation routing","description":"Adds the priority escalation branch.","isActive":true,"createdAt":"2026-06-12T10:30:00.000Z","state":{"blocks":{},"edges":[]}}}]},"Workflows_WorkflowVersionMetadata":{"type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Monotonically increasing deployment version number."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version label, or null when unset."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version release note, or null when unset."}},"required":["version","name","description"],"additionalProperties":false,"title":"Workflow version metadata","description":"Mutable label and release note of a deployment version."},"Workflows_UpdateWorkflowVersionResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowVersionMetadata"}},"required":["data"],"additionalProperties":false,"title":"Update workflow version response","description":"The deployment version metadata after the update.","examples":[{"data":{"version":3,"name":"Escalation routing","description":"Adds the priority escalation branch."}}]},"Workflows_UpdateWorkflowVersionRequest":{"type":"object","properties":{"name":{"description":"New label for the deployment version.","type":"string","minLength":1,"maxLength":100},"description":{"description":"New release note for the deployment version, or null to clear it.","anyOf":[{"type":"string","maxLength":50000},{"type":"null"}]}},"additionalProperties":false,"title":"Update workflow version request","description":"Merge-patch body for the mutable metadata of a deployment version.","examples":[{"name":"Escalation routing","description":"Adds the priority escalation branch."}]},"Workflows_ActiveDeploymentSummary":{"type":"object","properties":{"deploymentVersionId":{"type":"string","description":"Identifier of the active deployment version."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Numeric active deployment version."},"deployedAt":{"type":"string","description":"ISO 8601 timestamp when this version became active.","format":"date-time"}},"required":["deploymentVersionId","version","deployedAt"],"additionalProperties":false,"title":"Active deployment","description":"Summary of the workflow version currently serving API executions."},"Workflows_DeploymentOperationSummary":{"type":"object","properties":{"id":{"type":"string","description":"Unique deployment operation identifier."},"deploymentVersionId":{"type":"string","description":"Deployment version targeted by this operation."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Numeric deployment version."},"action":{"type":"string","enum":["deploy","activate"],"description":"Operation being performed on the deployment version."},"status":{"type":"string","enum":["preparing","activating","active","failed","superseded"],"description":"Current deployment lifecycle status."},"isCurrent":{"default":true,"description":"Whether this operation still describes the current deployment attempt.","type":"boolean"},"readiness":{"$ref":"#/components/schemas/Workflows_DeploymentReadiness"},"requestedAt":{"type":"string","description":"ISO 8601 timestamp when the deployment operation was requested.","format":"date-time"},"activatedAt":{"description":"ISO 8601 activation timestamp, or null before activation completes.","format":"date-time","anyOf":[{"type":"string"},{"type":"null"}]},"error":{"description":"Deployment failure details, or null when no failure occurred.","anyOf":[{"$ref":"#/components/schemas/Workflows_DeploymentOperationError"},{"type":"null"}]}},"required":["id","deploymentVersionId","version","action","status","isCurrent","readiness","requestedAt"],"additionalProperties":false,"title":"Deployment operation","description":"Lifecycle state of a deployment or version-activation attempt."},"Workflows_DeploymentReadiness":{"type":"object","properties":{"webhooks":{"type":"string","enum":["pending","ready","not_applicable"],"description":"Webhook synchronization readiness."},"schedules":{"type":"string","enum":["pending","ready","not_applicable"],"description":"Schedule synchronization readiness."},"mcp":{"type":"string","enum":["pending","ready","not_applicable"],"description":"MCP synchronization readiness."}},"required":["webhooks","schedules","mcp"],"additionalProperties":false,"title":"Deployment readiness","description":"Readiness of the side effects required to activate a deployment."},"Workflows_DeploymentOperationError":{"type":"object","properties":{"code":{"type":"string","description":"Stable deployment failure code."},"message":{"type":"string","description":"Human-readable deployment failure message."},"retryable":{"type":"boolean","description":"Whether retrying the deployment may succeed."}},"required":["code","message","retryable"],"additionalProperties":false,"title":"Deployment operation error","description":"Failure details for a deployment lifecycle operation."},"Workflows_VersionActivationResult":{"title":"Version activation result","description":"Activation attempt accepted for processing. Activation is asynchronous; inspect `isDeployed` and `latestDeploymentAttempt` for current state.","$ref":"#/components/schemas/Workflows_RollbackResult"},"Workflows_RollbackResult":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"isDeployed":{"type":"boolean","description":"Whether a workflow version is currently live and available for API execution."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp associated with the deployment, or null when unavailable.","format":"date-time","examples":["2026-06-12T10:30:00.000Z"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal warnings about deployment side effects, such as notifications that are still queued or failed. Empty when there is nothing to report. Lint findings are never reported here."},"activeDeployment":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ActiveDeploymentSummary"},{"type":"null"}],"description":"Currently live deployment version, or null while no version is active."},"latestDeploymentAttempt":{"anyOf":[{"$ref":"#/components/schemas/Workflows_DeploymentOperationSummary"},{"type":"null"}],"description":"Most recent deployment lifecycle attempt, or null when none is available."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Deployment version selected for re-activation."}},"required":["id","isDeployed","deployedAt","warnings","activeDeployment","latestDeploymentAttempt","version"],"additionalProperties":false,"title":"Rollback result","description":"Rollback attempt accepted for processing. Activation is asynchronous; inspect `isDeployed` and `latestDeploymentAttempt` for current state."},"Workflows_ActivateWorkflowVersionResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"isDeployed":{"type":"boolean","description":"Whether a workflow version is currently live and available for API execution."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp associated with the deployment, or null when unavailable.","format":"date-time","examples":["2026-06-12T10:30:00.000Z"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal warnings about deployment side effects, such as notifications that are still queued or failed. Empty when there is nothing to report. Lint findings are never reported here."},"activeDeployment":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ActiveDeploymentSummary"},{"type":"null"}],"description":"Currently live deployment version, or null while no version is active."},"latestDeploymentAttempt":{"anyOf":[{"$ref":"#/components/schemas/Workflows_DeploymentOperationSummary"},{"type":"null"}],"description":"Most recent deployment lifecycle attempt, or null when none is available."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Deployment version selected for re-activation."}},"required":["id","isDeployed","deployedAt","warnings","activeDeployment","latestDeploymentAttempt","version"],"additionalProperties":false,"description":"Response data.","$ref":"#/components/schemas/Workflows_VersionActivationResult"}},"required":["data"],"additionalProperties":false,"title":"Activate workflow version response","description":"Current deployment state after accepting the activation attempt.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":{"id":"depop_01J8ZK4RX5N7Y3S0U8D6E1W2","deploymentVersionId":"depver_01J8ZK4RX5N7Y3S0U8D6E1W3","version":3,"action":"activate","status":"activating","isCurrent":true,"readiness":{"webhooks":"ready","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:30:00.000Z","activatedAt":null,"error":null},"version":3}}]},"Workflows_ActivateWorkflowVersionRequest":{"default":{},"title":"Activate workflow version request","description":"No body. The version to promote is named by the request path.","examples":[{}],"type":"object","properties":{},"additionalProperties":false},"Workflows_RevertWorkflowVersionResult":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier."},"version":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","const":"active"}],"description":"Deployment version loaded into the draft, or `active` for the live version."},"lastSaved":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch milliseconds at which the overwritten draft was saved."}},"required":["id","version","lastSaved"],"additionalProperties":false,"title":"Revert workflow version result","description":"The draft after it was overwritten by a deployment version."},"Workflows_RevertWorkflowVersionResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_RevertWorkflowVersionResult"}},"required":["data"],"additionalProperties":false,"title":"Revert workflow version response","description":"The draft after it was overwritten by the deployment version.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","version":3,"lastSaved":1765535400000}}]},"Workflows_RevertWorkflowVersionRequest":{"default":{},"title":"Revert workflow version request","description":"No body. The version to load into the draft is named by the request path.","examples":[{}],"type":"object","properties":{},"additionalProperties":false},"Workflows_WorkflowDeploymentWebhook":{"type":"object","properties":{"blockId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger block the URL delivers to, or null for a legacy row that recorded none."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Webhook provider the endpoint verifies inbound requests against, e.g. `generic`, `github`, or `slack`."},"url":{"type":"string","format":"uri","description":"Absolute URL for the external system to send events to.","examples":["https://www.sim.ai/api/webhooks/trigger/leads"]}},"required":["blockId","provider","url"],"additionalProperties":false,"title":"Deployed webhook","description":"The public delivery URL of one webhook the live deployment registered."},"Workflows_WorkflowDeployment":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"isDeployed":{"type":"boolean","description":"Whether a workflow version is currently live and available for API execution."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp associated with the deployment, or null when unavailable.","format":"date-time","examples":["2026-06-12T10:30:00.000Z"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal warnings about deployment side effects, such as notifications that are still queued or failed. Empty when there is nothing to report. Lint findings are never reported here."},"activeDeployment":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ActiveDeploymentSummary"},{"type":"null"}],"description":"Currently live deployment version, or null while no version is active."},"latestDeploymentAttempt":{"anyOf":[{"$ref":"#/components/schemas/Workflows_DeploymentOperationSummary"},{"type":"null"}],"description":"Most recent deployment lifecycle attempt, or null when none is available."},"needsRedeployment":{"type":"boolean","description":"Whether the editable draft has diverged from the live deployment version. False while a deployment attempt is still preparing or activating, and false when nothing is deployed."},"isPublicApi":{"type":"boolean","description":"Whether anyone with the execution URL can run the deployed workflow and consume billed usage without an API key. Change this with Update Workflow Public API Access."},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowDeploymentWebhook"},"description":"Public delivery URL of every webhook the live version registered, one per trigger block. Read URLs here: the editor computes the block URL field, which reads empty through the API. Empty while nothing is deployed; triggers using a shared endpoint without a per-workflow URL are omitted."}},"required":["id","isDeployed","deployedAt","warnings","activeDeployment","latestDeploymentAttempt","needsRedeployment","isPublicApi","webhooks"],"additionalProperties":false,"title":"Workflow deployment","description":"Current deployment state of a workflow, including draft-versus-live drift and the most recent deployment attempt."},"Workflows_WorkflowDeploymentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowDeployment"}},"required":["data"],"additionalProperties":false,"title":"Workflow deployment response","description":"Current deployment state, including draft-versus-live drift and whether the deployment is publicly executable.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":true,"needsRedeployment":true,"isPublicApi":false,"deployedAt":"2026-06-12T10:30:00.000Z","warnings":[],"activeDeployment":{"deploymentVersionId":"depver_01J8ZK3QW4M6X2R9T7B5C0V2","version":3,"deployedAt":"2026-06-12T10:30:00.000Z"},"latestDeploymentAttempt":{"id":"depop_01J8ZK3QW4M6X2R9T7B5C0V1","deploymentVersionId":"depver_01J8ZK3QW4M6X2R9T7B5C0V2","version":3,"action":"deploy","status":"active","isCurrent":true,"readiness":{"webhooks":"ready","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:29:58.000Z","activatedAt":"2026-06-12T10:30:00.000Z","error":null},"webhooks":[{"blockId":"blk_01J8ZK3QW4M6X2R9T7B5C0V3","provider":"generic","url":"https://www.sim.ai/api/webhooks/trigger/leads"}]}}]},"Workflows_WorkflowPublicApiSettings":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier."},"isPublicApi":{"type":"boolean","description":"Whether the deployed workflow accepts unauthenticated public API execution."}},"required":["id","isPublicApi"],"additionalProperties":false,"title":"Workflow public API settings","description":"Whether a deployed workflow is executable without an API key."},"Workflows_UpdateWorkflowPublicApiResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowPublicApiSettings"}},"required":["data"],"additionalProperties":false,"title":"Update workflow public API response","description":"Public API access after the update.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isPublicApi":true}}]},"Workflows_UpdateWorkflowPublicApiRequest":{"type":"object","properties":{"isPublicApi":{"type":"boolean","description":"Whether the deployed workflow should accept unauthenticated public API execution."}},"required":["isPublicApi"],"additionalProperties":false,"title":"Update workflow public API request","description":"Enable or disable unauthenticated public execution of the deployed workflow.","examples":[{"isPublicApi":true}]},"Workflows_DeployResult":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"isDeployed":{"type":"boolean","description":"Whether a workflow version is currently live and available for API execution."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp associated with the deployment, or null when unavailable.","format":"date-time","examples":["2026-06-12T10:30:00.000Z"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal warnings about deployment side effects, such as notifications that are still queued or failed. Empty when there is nothing to report. Lint findings are never reported here."},"activeDeployment":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ActiveDeploymentSummary"},{"type":"null"}],"description":"Currently live deployment version, or null while no version is active."},"latestDeploymentAttempt":{"anyOf":[{"$ref":"#/components/schemas/Workflows_DeploymentOperationSummary"},{"type":"null"}],"description":"Most recent deployment lifecycle attempt, or null when none is available."},"version":{"description":"Deployment version created for this attempt, when available.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lint":{"anyOf":[{"$ref":"#/components/schemas/Workflows_WorkflowLintReport"},{"type":"null"}],"description":"Advisory lint for the admitted version, checked as the deploying member. Findings never block deployment. Null when lint exceeds its time budget or cannot complete; the deployment proceeds."}},"required":["id","isDeployed","deployedAt","warnings","activeDeployment","latestDeploymentAttempt","lint"],"additionalProperties":false,"title":"Deploy result","description":"Deployment accepted for asynchronous activation. Poll Get workflow deployment and match `latestDeploymentAttempt` to this attempt; an older version can remain live while it activates. List workflow versions reports `isActive`."},"Workflows_DeployWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_DeployResult"}},"required":["data"],"additionalProperties":false,"title":"Deploy workflow response","description":"Current deployment state after accepting the attempt.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":{"id":"depop_01J8ZK3QW4M6X2R9T7B5C0V1","deploymentVersionId":"depver_01J8ZK3QW4M6X2R9T7B5C0V2","version":3,"action":"deploy","status":"preparing","isCurrent":true,"readiness":{"webhooks":"pending","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:30:00.000Z","activatedAt":null,"error":null},"version":3,"lint":{"sources":[],"sinks":[],"orphanBlocks":[],"emptyOutgoingPorts":[],"invalidBranchPorts":[],"invalidConnectionTargets":[],"fieldIssues":[],"unresolvedReferences":[],"tableFieldIssues":[],"notes":[]}}}]},"Workflows_DeployWorkflowRequest":{"default":{},"title":"Deploy workflow request","description":"Optional metadata for the new deployment version.","examples":[{"name":"Escalation routing","description":"Adds the priority escalation branch."}],"type":"object","properties":{"name":{"description":"Optional label for the deployment version.","type":"string","minLength":1,"maxLength":100},"description":{"description":"Optional release note for the deployment version.","anyOf":[{"type":"string","maxLength":50000},{"type":"null"}]}},"additionalProperties":false},"Workflows_ArchivedWorkflowMcpTool":{"type":"object","properties":{"serverId":{"type":"string","description":"Workflow-MCP server the tool is published on."},"toolName":{"type":"string","description":"Name MCP clients called the tool by."}},"required":["serverId","toolName"],"additionalProperties":false,"title":"Archived workflow MCP tool","description":"A workflow-MCP tool registration an undeploy took inactive."},"Workflows_UndeployResult":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow identifier.","examples":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]},"isDeployed":{"type":"boolean","description":"Whether a workflow version is currently live and available for API execution."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp associated with the deployment, or null when unavailable.","format":"date-time","examples":["2026-06-12T10:30:00.000Z"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal warnings about deployment side effects, such as notifications that are still queued or failed. Empty when there is nothing to report. Lint findings are never reported here."},"activeDeployment":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ActiveDeploymentSummary"},{"type":"null"}],"description":"Currently live deployment version, or null while no version is active."},"latestDeploymentAttempt":{"anyOf":[{"$ref":"#/components/schemas/Workflows_DeploymentOperationSummary"},{"type":"null"}],"description":"Most recent deployment lifecycle attempt, or null when none is available."},"archivedMcpTools":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_ArchivedWorkflowMcpTool"},"description":"MCP tool registrations this undeploy archived. Each appears in its server’s tool list with `status: \"inactive\"` until the workflow is deployed again, which restores it; unpublishing one while it is inactive removes it for good. Empty when no server published the workflow."}},"required":["id","isDeployed","deployedAt","warnings","activeDeployment","latestDeploymentAttempt","archivedMcpTools"],"additionalProperties":false,"title":"Undeploy result","description":"Deployment state after a successful undeploy. `isDeployed` is false and no workflow version is active. Undeploying also takes every MCP tool that published the workflow inactive; `archivedMcpTools` names them so the effect is not silent."},"Workflows_UndeployWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_UndeployResult"}},"required":["data"],"additionalProperties":false,"title":"Undeploy workflow response","description":"Deployment state after deactivating the active version.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":null,"archivedMcpTools":[]}}]},"Workflows_RollbackWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_RollbackResult"}},"required":["data"],"additionalProperties":false,"title":"Rollback workflow response","description":"Current deployment state after accepting the rollback attempt.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","isDeployed":false,"deployedAt":null,"warnings":[],"activeDeployment":null,"latestDeploymentAttempt":{"id":"depop_01J8ZK4RX5N7Y3S0U8D6E1W2","deploymentVersionId":"depver_01J8ZK4RX5N7Y3S0U8D6E1W3","version":2,"action":"activate","status":"activating","isCurrent":true,"readiness":{"webhooks":"ready","schedules":"ready","mcp":"not_applicable"},"requestedAt":"2026-06-12T10:30:00.000Z","activatedAt":null,"error":null},"version":2}}]},"Workflows_RollbackWorkflowRequest":{"default":{},"title":"Rollback workflow request","description":"Optional deployment version to reactivate.","examples":[{"version":2}],"type":"object","properties":{"version":{"description":"Deployment version to reactivate. Omit to select the previous active version.","type":"integer","minimum":1,"maximum":2147483647}},"additionalProperties":false},"Workflows_WorkflowExportPayload":{"type":"object","properties":{"version":{"type":"string","const":"1.0","description":"Workflow export format version."},"exportedAt":{"type":"string","description":"ISO 8601 timestamp when the export was created.","format":"date-time"},"workflow":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the source workflow."},"name":{"type":"string","description":"Name of the exported workflow."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description of the exported workflow, or null when unset."},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Identifier of the source workspace, or null for legacy exports."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path; `/` is the workspace root.","maxLength":4096}},"required":["id","name","description","workspaceId","folderPath"],"additionalProperties":false,"description":"Source workflow metadata."},"state":{"type":"object","additionalProperties":true,"description":"Saved graph, edges, containers, metadata, and variables. Registered credential fields are cleared; ordinary variables and unresolved environment references remain included."},"referenceManifest":{"description":"Versioned non-secret identifiers and registered source field occurrences for mapped import.","type":"object","properties":{"version":{"type":"number","const":1,"description":"Reference format or deployment version number."},"references":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Untrusted source reference label; imports never use it to authorize or query a source workspace."},"required":{"type":"boolean","description":"Whether the reference or configuration is required for this operation."},"occurrences":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"valuePath":{"maxItems":8,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"integer","minimum":0,"maximum":2000}]},"description":"Path within the field value; strings address properties and numbers address array entries."},"positions":{"description":"Positions occupied by this identifier in a multi-value field.","maxItems":2000,"type":"array","items":{"type":"integer","minimum":0,"maximum":2000}},"encoding":{"type":"string","enum":["scalar","array","csv","files","environment"],"description":"Registered encoding used to discover and rewrite the reference."}},"required":["blockId","subBlockKey","valuePath","encoding"],"additionalProperties":false},"description":"Every registered source block and field occurrence of this reference."}},"required":["kind","sourceId","required","occurrences"],"additionalProperties":false},"description":"Non-secret resource identifiers and their registered occurrences."}},"required":["version","references"],"additionalProperties":false}},"required":["version","exportedAt","workflow","state"],"additionalProperties":false,"title":"Workflow export payload","description":"Portable saved draft with registered credential fields cleared. Workspace bindings are cleared by default and retained when `includeWorkspaceBindings=true`."},"Workflows_ExportWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowExportPayload"}},"required":["data"],"additionalProperties":false,"title":"Export workflow response","description":"Portable workflow data with registered credential fields cleared.","examples":[{"data":{"version":"1.0","exportedAt":"2026-08-09T18:04:11.000Z","workflow":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","folderPath":"/Operations"},"state":{"blocks":{},"edges":[]}}}]},"Workflows_ImportedWorkflowBlock":{"type":"object","properties":{"id":{"type":"string","description":"Block identifier."},"type":{"type":"string","description":"Registered block type."},"name":{"type":"string","description":"Block display name."}},"required":["id","type","name"],"additionalProperties":false,"title":"Imported workflow block","description":"A block the import created in the new workflow."},"Workflows_ImportedWorkflow":{"type":"object","properties":{"id":{"type":"string","description":"Resource identifier."},"name":{"type":"string","description":"Display name of the workflow or workspace."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Imported workflow description."},"workspaceId":{"type":"string","description":"Explicit current workspace scope."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path.","maxLength":4096},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was imported.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the workflow was last updated.","format":"date-time"},"blocks":{"description":"Blocks the import created, in payload order. Omitted only when replaying an older receipt that did not record this summary. The workflow state read returns the current full graph.","type":"array","items":{"$ref":"#/components/schemas/Workflows_ImportedWorkflowBlock"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Missing required workspace bindings, such as a table or knowledge base, reported as `<block name>: <field> was stripped by export; set it before running`. Set these fields before execution. Default exports clear workspace bindings; `includeWorkspaceBindings=true` retains non-secret bindings for same-workspace imports. Empty when no required binding is missing."},"operationId":{"type":"string","minLength":1,"maxLength":256,"description":"Durable operation identifier to use for polling."},"requestId":{"type":"string","minLength":1,"maxLength":128,"description":"Client request ID used to commit this operation. Reuse identical mutation inputs with this ID after an uncertain response."},"kind":{"type":"string","enum":["workflow_import","workspace_fork","workspace_push","workspace_pull"],"description":"Type of committed workspace operation."},"applied":{"type":"boolean","const":true,"description":"The business transaction committed, including when follow-up work fails."},"status":{"type":"string","enum":["processing","completed","completed_with_warnings","requires_configuration","failed"],"description":"Operation status; failed follow-up work does not undo the committed transaction."},"resourceIds":{"maxItems":5000,"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"description":"Identifiers of resources created or changed by the committed operation."},"issues":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128,"description":"Stable machine-readable issue code."},"message":{"type":"string","maxLength":2048,"description":"Human-readable explanation of the issue."},"workflowId":{"description":"Workflow affected by this issue or deployment attempt.","type":"string","maxLength":256},"blockId":{"description":"Source block identifier before graph ID regeneration.","type":"string","maxLength":256},"subBlockKey":{"description":"Registered source field key, including the tool index for nested Agent fields.","type":"string","maxLength":256}},"required":["code","message"],"additionalProperties":false},"description":"Structured warnings, missing configuration, and follow-up failures."},"idMap":{"description":"Source graph identifiers mapped to the imported identifiers.","type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":256}},"deploymentOperationIds":{"description":"Exact deployment attempts admitted by the workspace operation.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":256}},"deployments":{"description":"Readiness of the exact admitted deployment attempts.","maxItems":1000,"type":"array","items":{"type":"object","properties":{"operationId":{"type":"string","maxLength":256,"description":"Durable operation identifier to use for polling."},"workflowId":{"type":"string","maxLength":256,"description":"Workflow affected by this issue or deployment attempt."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Deployment version number for this admitted attempt."},"status":{"type":"string","enum":["preparing","activating","active","failed","superseded"],"description":"Status of this exact admitted deployment attempt."},"ready":{"type":"boolean","description":"Whether this exact deployment attempt is active and all required components are ready."},"pendingComponents":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":128},"description":"Deployment components that have not finished becoming ready."}},"required":["operationId","workflowId","version","status","ready","pendingComponents"],"additionalProperties":false}},"triggerUrlChanges":{"description":"Public trigger paths changed by this sync, with the affected workflow names.","maxItems":1000,"type":"array","items":{"type":"object","properties":{"workflowName":{"type":"string","maxLength":1024,"description":"Name of the workflow whose public trigger path stops serving."},"path":{"type":"string","maxLength":4096,"description":"Public trigger path that stops serving after this sync."}},"required":["workflowName","path"],"additionalProperties":false}},"backgroundWorkId":{"description":"Workspace activity identifier for resource-copy progress.","type":"string","maxLength":256},"copyProgress":{"description":"Completion status and counts for explicitly selected resource copies.","type":"object","properties":{"status":{"type":"string","enum":["pending","completed","failed"],"description":"Background resource-copy status."},"copied":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of resources copied successfully."},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of resources that failed to copy."}},"required":["status","copied","failed"],"additionalProperties":false}},"required":["id","name","description","workspaceId","folderPath","createdAt","updatedAt","warnings"],"additionalProperties":false,"title":"Imported workflow","description":"Workflow created by an import operation, with the required workspace bindings it arrived without."},"Workflows_ImportWorkflowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_ImportedWorkflow"}},"required":["data"],"additionalProperties":false,"title":"Import workflow response","description":"The workflow created by the import.","examples":[{"data":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer support triage","description":"Routes incoming support requests to the right team.","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","folderPath":"/Operations","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-08-09T18:04:11.000Z","blocks":[{"id":"block_start","type":"starter","name":"Start"},{"id":"block_triage","type":"agent","name":"Triage"},{"id":"block_reply","type":"response","name":"Reply"}],"warnings":["Triage: knowledgeBaseId was stripped by export; set it before running"]}}]},"Workflows_ImportWorkflowBody":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to import the workflow."},"workflow":{"anyOf":[{"type":"string","minLength":1,"description":"JSON string containing a workflow export object or bare workflow state."},{"type":"object","additionalProperties":true,"description":"Workflow export object or bare workflow state."}],"description":"Workflow export object, bare workflow state, or JSON string containing either form."},"folderPath":{"description":"Destination folder path; omit for the workspace root.","$ref":"#/components/schemas/Workflows_FolderPathInput"},"name":{"description":"Override for the imported workflow name.","type":"string","minLength":1,"maxLength":200},"description":{"description":"Override for the imported workflow description.","type":"string","maxLength":2000},"mappings":{"description":"Mapping entries addressed by resource kind and source identifier.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Untrusted source reference label; imports never use it to authorize or query a source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["kind","sourceId","targetId"],"additionalProperties":false}},"bindings":{"description":"Resolved and unresolved source occurrences with their destination selections.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"valuePath":{"default":[],"maxItems":8,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"integer","minimum":0,"maximum":2000}]},"description":"Path within the field value; strings address properties and numbers address array entries."},"positions":{"description":"Positions occupied by this identifier in a multi-value field.","maxItems":2000,"type":"array","items":{"type":"integer","minimum":0,"maximum":2000}},"encoding":{"default":"scalar","type":"string","enum":["scalar","array","csv","files","environment"],"description":"Registered encoding used to discover and rewrite the reference."},"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["blockId","subBlockKey","kind","targetId"],"additionalProperties":false}},"dependentValues":{"description":"Destination-specific values addressed by the source block ID and field key, before imported IDs are regenerated.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"value":{"type":"string","maxLength":16384,"description":"Destination value for the registered dependent field."}},"required":["blockId","subBlockKey","value"],"additionalProperties":false}},"requestId":{"description":"Stable client request ID for mapped import. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can create another workflow.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"previewFingerprint":{"description":"Fingerprint returned by an import preview with the same choices. A changed plan returns 409; preview again. Do not invent this value.","type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["workspaceId","workflow"],"additionalProperties":false,"title":"Import workflow input","description":"Workflow document, destination, and optional reviewed mappings. This example creates an empty draft."},"Workflows_ChatDeploymentListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique chat deployment identifier."},"workflowId":{"type":"string","description":"Workflow this deployment publishes."},"workspaceId":{"type":"string","description":"Workspace the deployment belongs to, derived from its workflow."},"identifier":{"type":"string","description":"URL slug the deployed chat answers on. Unique across live deployments."},"url":{"type":"string","description":"Public URL of the deployed chat. There is no chat subdomain — the identifier is a path segment.","examples":["https://sim.ai/chat/support"]},"title":{"type":"string","description":"Title shown to visitors."},"description":{"type":"string","description":"Description shown to visitors. Empty when unset."},"isActive":{"type":"boolean","description":"Whether the deployment answers requests."},"authType":{"type":"string","enum":["public","password","email","sso"],"description":"How visitors are gated: `public` (no gate), `password`, `email`, or `sso`."},"outputConfigs":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_StoredChatDeploymentOutputConfig"},"description":"Block outputs surfaced to visitors."},"includeThinking":{"type":"boolean","description":"Whether visitors may receive provider thinking events. They must also opt into the streaming protocol."},"includeToolCalls":{"type":"boolean","description":"Whether visitors may receive tool lifecycle events. They must also opt into the streaming protocol."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the deployment was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the deployment was last modified.","format":"date-time"}},"required":["id","workflowId","workspaceId","identifier","url","title","description","isActive","authType","outputConfigs","includeThinking","includeToolCalls","createdAt","updatedAt"],"additionalProperties":false,"title":"Chat deployment list entry","description":"A workflow published as a hosted chat, without the fields the detail read gates."},"Workflows_StoredChatDeploymentOutputConfig":{"type":"object","properties":{"workflowId":{"description":"Child workflow containing the selected block. Omitted for the deployed workflow.","type":"string"},"blockId":{"type":"string","description":"Block whose output the chat streams."},"path":{"type":"string","description":"Path within that block output. Empty means the whole output."}},"required":["blockId","path"],"additionalProperties":false,"title":"Stored chat deployment output config","description":"One block output currently surfaced to chat visitors."},"Workflows_ChatDeploymentListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_ChatDeploymentListItem"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Chat deployment list response","description":"A cursor-paginated page of chat deployments.","examples":[{"data":[{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","identifier":"support","url":"https://sim.ai/chat/support","title":"Support chat","description":"Ask about billing, onboarding, or outages.","isActive":true,"authType":"public","outputConfigs":[{"blockId":"block_01J8ZK3QW4M6X2R9T7B5C0V4","path":"content"}],"includeThinking":false,"includeToolCalls":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}],"nextCursor":null}]},"Workflows_StoredChatDeploymentCustomizations":{"type":"object","properties":{"primaryColor":{"description":"CSS color used for the chat accent.","type":"string"},"welcomeMessage":{"description":"First message shown to a visitor.","type":"string"},"imageUrl":{"description":"Avatar image shown beside assistant messages.","type":"string"}},"additionalProperties":false,"title":"Stored chat deployment customizations","description":"Presentation overrides currently stored on the deployed chat."},"Workflows_ChatDeployment":{"type":"object","properties":{"id":{"type":"string","description":"Unique chat deployment identifier."},"workflowId":{"type":"string","description":"Workflow this deployment publishes."},"workspaceId":{"type":"string","description":"Workspace the deployment belongs to, derived from its workflow."},"identifier":{"type":"string","description":"URL slug the deployed chat answers on. Unique across live deployments."},"url":{"type":"string","description":"Public URL of the deployed chat. There is no chat subdomain — the identifier is a path segment.","examples":["https://sim.ai/chat/support"]},"title":{"type":"string","description":"Title shown to visitors."},"description":{"type":"string","description":"Description shown to visitors. Empty when unset."},"isActive":{"type":"boolean","description":"Whether the deployment answers requests."},"authType":{"type":"string","enum":["public","password","email","sso"],"description":"How visitors are gated: `public` (no gate), `password`, `email`, or `sso`."},"hasPassword":{"type":"boolean","description":"Whether a password is stored. The password itself is never readable."},"allowedEmails":{"type":"array","items":{"type":"string"},"description":"Email addresses or domains admitted under `email` and `sso` gating. Empty otherwise."},"customizations":{"description":"Presentation overrides. Unset fields fall back to platform defaults.","$ref":"#/components/schemas/Workflows_StoredChatDeploymentCustomizations"},"outputConfigs":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_StoredChatDeploymentOutputConfig"},"description":"Block outputs surfaced to visitors."},"includeThinking":{"type":"boolean","description":"Whether visitors may receive provider thinking events. They must also opt into the streaming protocol."},"includeToolCalls":{"type":"boolean","description":"Whether visitors may receive tool lifecycle events. They must also opt into the streaming protocol."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the deployment was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the deployment was last modified.","format":"date-time"}},"required":["id","workflowId","workspaceId","identifier","url","title","description","isActive","authType","hasPassword","allowedEmails","customizations","outputConfigs","includeThinking","includeToolCalls","createdAt","updatedAt"],"additionalProperties":false,"title":"Chat deployment","description":"A workflow published as a hosted chat."},"Workflows_GetWorkflowChatDeploymentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_ChatDeployment"}},"required":["data"],"additionalProperties":false,"title":"Get workflow chat deployment response","description":"The workflow's chat deployment.","examples":[{"data":{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","identifier":"support","url":"https://sim.ai/chat/support","title":"Support chat","description":"Ask about billing, onboarding, or outages.","isActive":true,"authType":"public","hasPassword":false,"allowedEmails":[],"customizations":{"primaryColor":"#6F3DFA","welcomeMessage":"Hi there! How can I help?"},"outputConfigs":[{"blockId":"block_01J8ZK3QW4M6X2R9T7B5C0V4","path":"content"}],"includeThinking":false,"includeToolCalls":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}]},"Workflows_ReplaceWorkflowChatDeploymentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_ChatDeployment"}},"required":["data"],"additionalProperties":false,"title":"Replace workflow chat deployment response","description":"The chat deployment as stored after the replace.","examples":[{"data":{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","identifier":"support","url":"https://sim.ai/chat/support","title":"Support chat","description":"Ask about billing, onboarding, or outages.","isActive":true,"authType":"public","hasPassword":false,"allowedEmails":[],"customizations":{"primaryColor":"#6F3DFA","welcomeMessage":"Hi there! How can I help?"},"outputConfigs":[{"blockId":"block_01J8ZK3QW4M6X2R9T7B5C0V4","path":"content"}],"includeThinking":false,"includeToolCalls":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}]},"Workflows_ChatDeploymentCustomizations":{"type":"object","properties":{"primaryColor":{"description":"CSS color used for the chat accent.","type":"string","minLength":1,"maxLength":64},"welcomeMessage":{"description":"First message shown to a visitor. On replace, omission uses the platform default; an empty string keeps the existing message.","type":"string","maxLength":2000},"imageUrl":{"description":"Avatar image shown beside assistant messages. On replace, omission or an empty string keeps the existing avatar.","type":"string","maxLength":2048}},"additionalProperties":false,"title":"Chat deployment customizations","description":"Presentation overrides for the deployed chat."},"Workflows_ChatDeploymentOutputConfig":{"type":"object","properties":{"workflowId":{"description":"Child workflow containing the selected block. Omit for the deployed workflow.","type":"string","minLength":1},"blockId":{"type":"string","minLength":1,"description":"Block whose output the chat streams."},"path":{"type":"string","minLength":1,"description":"Path within that block output."}},"required":["blockId","path"],"additionalProperties":false,"title":"Chat deployment output config","description":"One block output surfaced to chat visitors."},"Workflows_ReplaceChatDeploymentRequest":{"type":"object","properties":{"identifier":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"URL slug the deployed chat answers on. Must be free across live deployments."},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Title shown to visitors."},"description":{"description":"Description shown to visitors. Omitted clears it.","type":"string","maxLength":2000},"customizations":{"description":"Presentation overrides. Omitted `primaryColor` and `welcomeMessage` use platform defaults; an omitted or empty `imageUrl` keeps the existing avatar. An empty `welcomeMessage` keeps the existing message.","$ref":"#/components/schemas/Workflows_ChatDeploymentCustomizations"},"authType":{"description":"How visitors are gated. `public` leaves the chat open to anyone holding the URL.","default":"public","type":"string","enum":["public","password","email","sso"]},"password":{"description":"Write-only password of 15 to 1024 characters, not only whitespace. Required whenever `authType` is `password`, and rejected otherwise. Never readable back. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply.","type":"string","maxLength":1024},"allowedEmails":{"description":"Email addresses or domains admitted under `email` and `sso` gating. At least one is required for those modes.","maxItems":500,"type":"array","items":{"type":"string","minLength":1}},"outputConfigs":{"description":"Block outputs to surface to visitors. Omitted surfaces none.","maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Workflows_ChatDeploymentOutputConfig"}},"includeThinking":{"description":"Allow visitors to receive provider thinking events.","default":false,"type":"boolean"},"includeToolCalls":{"description":"Allow visitors to receive tool lifecycle events.","default":false,"type":"boolean"}},"required":["identifier","title"],"additionalProperties":false,"title":"Replace chat deployment request","description":"The complete desired state of a workflow's chat.","examples":[{"identifier":"support","title":"Support chat"}]},"Workflows_DeleteChatDeploymentResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the removed chat deployment."},"deleted":{"type":"boolean","const":true,"description":"Whether the deployment was removed."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete chat deployment result","description":"Chat deployment removal acknowledgement."},"Workflows_DeleteWorkflowChatDeploymentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_DeleteChatDeploymentResult"}},"required":["data"],"additionalProperties":false,"title":"Delete workflow chat deployment response","description":"Acknowledgement that the chat deployment was removed.","examples":[{"data":{"id":"chat_01J8ZK3QW4M6X2R9T7B5C0V2","deleted":true}}]},"Workflows_ExecutionError":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable workflow execution failure message."},"code":{"type":"string","enum":["TIMEOUT","CANCELLED","USAGE_LIMIT_EXCEEDED","INVALID_INPUT","BLOCK_EXECUTION_FAILED","CHILD_WORKFLOW_FAILED","EXECUTION_FAILED"],"description":"Stable machine-readable execution failure code. `BLOCK_EXECUTION_FAILED` and `CHILD_WORKFLOW_FAILED` are reported only where block attribution is available; elsewhere a block-level failure is reported as `EXECUTION_FAILED`."},"blockId":{"description":"Identifier of the failing block. Present on the synchronous execute response only; the polled run resource and the resume response cannot attribute a block.","type":"string"},"blockName":{"description":"Display name of the failing block. Present on the synchronous execute response only.","type":"string"},"blockType":{"description":"Integration or block type that failed. Present on the synchronous execute response only.","type":"string"}},"required":["message","code"],"additionalProperties":false,"title":"Execution error","description":"Structured in-band failure details for a workflow run."},"Workflows_WorkflowRunResult":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]},"workflowId":{"type":"string","description":"Workflow that produced the run."},"status":{"type":"string","enum":["completed","failed","paused","cancelled"],"description":"Terminal or paused run status."},"output":{"description":"Workflow output, including partial output on failure."},"blockOutputs":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Output value produced by one workflow block."}},{"type":"null"}],"description":"Outputs of the blocks named by `selectedOutputs`, keyed by those selector strings exactly as sent, or null when none were requested. `output` stays the final workflow output regardless. Selectors whose block did not run or whose path is absent are omitted (an unknown block is a `400` instead); failed runs include the outputs of the blocks that did run."},"error":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ExecutionError"},{"type":"null"}],"description":"Structured execution failure, or null when none occurred."},"startedAt":{"description":"ISO 8601 timestamp when execution started.","format":"date-time","type":"string"},"endedAt":{"description":"ISO 8601 timestamp when execution ended.","format":"date-time","type":"string"},"durationMs":{"description":"Execution duration in milliseconds.","type":"number","minimum":0}},"required":["runId","workflowId","status","output","blockOutputs","error"],"additionalProperties":false,"title":"Workflow run result","description":"Synchronous workflow run output and in-band execution status. Run failures are reported in band, not as HTTP errors — a run that exceeds its execution timeout returns HTTP 200 with `status: \"failed\"` and `error.code: \"TIMEOUT\"`, so branch on `status`."},"Workflows_ExecuteWorkflowSyncResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowRunResult"}},"required":["data"],"additionalProperties":false,"title":"Synchronous workflow execution response","description":"Completed, failed, paused, or cancelled synchronous workflow run.","examples":[{"data":{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","output":{"result":"Ticket routed to Support"},"blockOutputs":null,"error":null,"startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000}}]},"Workflows_QueuedWorkflowRun":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]},"statusUrl":{"type":"string","format":"uri","description":"Absolute URL of the workflow run resource."}},"required":["runId","statusUrl"],"additionalProperties":false,"title":"Queued workflow run","description":"Receipt returned when a workflow run is queued."},"Workflows_ExecuteWorkflowQueuedResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_QueuedWorkflowRun"}},"required":["data"],"additionalProperties":false,"title":"Queued workflow execution response","description":"Receipt returned for an asynchronous workflow run.","examples":[{"data":{"runId":"run_8f14e45f-ceea-467f-a","statusUrl":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a"}}]},"Workflows_ExecuteWorkflowRequest":{"type":"object","properties":{"input":{"description":"Workflow input keyed by the selected trigger input-field name.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Value supplied for one workflow input field."}},"run":{"description":"Workflow state and entry point to execute. Omit for the active deployment. Manual execution requires OAuth or personal-key write access and supports synchronous or streamed runs only.","oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"deployment","description":"Execute the active deployed workflow state."}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"manual","description":"Execute the current saved workflow state manually."},"entry":{"description":"Manual entry mode. Omit to enter through the workflow trigger; a block entry requires an exact source run.","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trigger","description":"Enter the manual run through a runnable trigger."},"blockId":{"description":"Runnable trigger block to enter through. Omit only when the saved workflow has exactly one runnable trigger.","type":"string","minLength":1},"useMockPayload":{"description":"Use the selected trigger's server-derived mock payload. Cannot be combined with `input`.","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"block","description":"Resume manual execution at a block using persisted upstream state."},"blockId":{"type":"string","minLength":1,"description":"Saved workflow block at which manual execution should resume."},"sourceRunId":{"type":"string","minLength":1,"description":"Run in this workflow whose persisted execution state supplies upstream block results. Missing or expired state returns 404."}},"required":["type","blockId","sourceRunId"],"additionalProperties":false}]},"stopAfterBlockId":{"description":"Saved workflow block after which the run stops; downstream blocks do not execute. Must not be inside a loop or parallel. If a router, condition, or untaken error path routes the run away from the block, the run fails as soon as that is decided; no further block starts, though blocks already running finish. With a block entry naming the same block, re-runs only that block against the source run.","type":"string","minLength":1}},"required":["source"],"additionalProperties":false}]},"async":{"default":false,"description":"Queue the run and return a 202 receipt. Requires an API key or OAuth access token and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).","type":"boolean"},"executionTimeoutSeconds":{"description":"Maximum duration of an asynchronous run, in seconds, capped by the plan's execution timeout. Requires `async: true`; otherwise returns `400`.","type":"integer","minimum":1,"maximum":604800},"stream":{"default":false,"description":"Return Server-Sent Events instead of JSON when true. Cannot be combined with `async`.","type":"boolean"},"selectedOutputs":{"description":"Select `<blockName>.<outputPath>` or `<childWorkflowId>.<blockName>.<outputPath>` using normalized block reference names. Child selectors cover every invocation. Synchronous results use selector strings verbatim as `blockOutputs` keys; streaming selections shape the envelope. Unknown block names or IDs return `400` with available blocks before execution. Unexecuted blocks and absent paths are omitted. Incompatible with `async`; select outputs from the finished run resource instead.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"includeThinking":{"default":false,"description":"Include model reasoning events in an agent-event stream. Requires `stream: true` and the `X-Sim-Stream-Protocol: agent-events-v1` request header, and is rejected when `async` is true.","type":"boolean"},"includeToolCalls":{"default":false,"description":"Include tool-call events in an agent-event stream. Requires `stream: true` and the `X-Sim-Stream-Protocol: agent-events-v1` request header, and is rejected when `async` is true.","type":"boolean"},"includeFileBase64":{"description":"Inline eligible output files as base64 content. Rejected when `async` is true.","type":"boolean"},"base64MaxBytes":{"description":"Maximum total bytes of file content to inline as base64, lowering but never raising the server limit of 16 MiB. Rejected when `async` is true.","type":"integer","exclusiveMinimum":0,"maximum":16777216}},"additionalProperties":false,"title":"Execute workflow request","description":"Input, workflow-state selection, and execution-mode options. Input descriptions specify compatible modes; invalid combinations return `400`.","examples":[{"input":{"ticketId":"ticket_123"}},{"input":{"ticketId":"ticket_123"},"async":true},{"input":{"ticketId":"ticket_123"},"stream":true},{"run":{"source":"manual"}},{"run":{"source":"manual","entry":{"type":"block","blockId":"block_123","sourceRunId":"run_123"}}},{"run":{"source":"manual","entry":{"type":"block","blockId":"block_123","sourceRunId":"run_123"},"stopAfterBlockId":"block_123"}}]},"Workflows_WorkflowRunListItem":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]},"workflowId":{"type":"string","description":"Workflow that produced the run."},"status":{"type":"string","enum":["pending","running","paused","redacting","completed","failed","cancelled"],"description":"Current or terminal run status. `redacting` is transient, reported while a finished run's output is being scrubbed. `paused` means the run is waiting at a human or time pause, or a resume attempt did not complete. The single-run response provides the pause kind, resume time, and any automatic-resume waiting reason."},"trigger":{"type":"string","description":"Trigger type that started the run."},"startedAt":{"type":"string","description":"ISO 8601 timestamp when the run started.","format":"date-time"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the run ended, or null while active.","format":"date-time"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Run duration in milliseconds, or null while active."},"cost":{"anyOf":[{"type":"object","properties":{"total":{"type":"number","description":"Total credits consumed by the run."}},"required":["total"],"additionalProperties":false},{"type":"null"}],"description":"Credits consumed, or null when unavailable or hidden by organization permission groups."}},"required":["runId","workflowId","status","trigger","startedAt","endedAt","durationMs","cost"],"additionalProperties":false,"title":"Workflow run summary","description":"Summary of a recorded workflow run."},"Workflows_WorkflowRunListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowRunListItem"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Workflow run list response","description":"A cursor-paginated page of workflow run summaries.","examples":[{"data":[{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","trigger":"api","startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000,"cost":{"total":12}}],"nextCursor":null}]},"Workflows_V2RunFile":{"type":"object","properties":{"id":{"type":"string","description":"Identifier to address this file by on the download endpoint."},"name":{"type":"string","description":"File name, including its extension."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"type":{"type":"string","description":"MIME type recorded for the file."},"downloadPath":{"type":"string","description":"Path to fetch this file's bytes from, relative to the API host."},"base64":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base64-encoded contents when `includeFileBase64` was requested and the file fits the inline ceiling, otherwise null."}},"required":["id","name","size","type","downloadPath","base64"],"additionalProperties":false,"title":"Workflow run file","description":"A file produced by a workflow run."},"Workflows_WorkflowRunStatus":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]},"workflowId":{"type":"string","description":"Workflow that produced the run."},"status":{"type":"string","enum":["pending","running","paused","redacting","completed","failed","cancelled","queued"],"description":"Current or terminal run status. `redacting` is transient, reported while a finished run's output is being scrubbed. `paused` means the run is waiting at a human or time pause, or a resume attempt did not complete. The single-run response provides the pause kind, resume time, and any automatic-resume waiting reason."},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger type that started the run. Backfilled as `api` for a run that is still queued, so it is populated from the first poll."},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 start timestamp. A queued run reports the time it was enqueued, so it is populated from the first poll.","format":"date-time"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 end timestamp, or null while nonterminal.","format":"date-time"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Run duration in milliseconds, or null while active."},"paused":{"anyOf":[{"type":"object","properties":{"contextId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resume context identifier, or null while every pause point is mid-resume."},"pausedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the execution entered the paused state."},"resumeAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 scheduled automatic-resume timestamp, or null when no resume time is set."},"pauseKind":{"anyOf":[{"type":"string","enum":["time","human"]},{"type":"null"}],"description":"Whether the pause waits for time or human input, or null when unspecified."},"blockedOnBlockId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow block awaiting resume, or null when no block is identified."},"automaticResumeWaitingReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Recorded automatic-resume failure, or null when no failure is recorded. Inspect `pauseKind` and `resumeAt` to distinguish a scheduled time pause from human input. Cleared after a successful resume. A non-retryable or exhausted failure starts with `Automatic resume requires manual intervention: `."},"pausePointCount":{"type":"number","description":"Number of pause points tracked for the execution."},"resumedCount":{"type":"number","description":"Number of pause points that have resumed."}},"required":["contextId","pausedAt","resumeAt","pauseKind","blockedOnBlockId","automaticResumeWaitingReason","pausePointCount","resumedCount"],"additionalProperties":false},{"type":"null"}],"description":"Current pause details, or null when the run is not paused."},"cost":{"anyOf":[{"type":"object","properties":{"total":{"type":"number","description":"Total credits consumed by the run."}},"required":["total"],"additionalProperties":false},{"type":"null"}],"description":"Credits consumed, or null when unavailable or hidden by organization permission groups."},"error":{"anyOf":[{"$ref":"#/components/schemas/Workflows_ExecutionError"},{"type":"null"}],"description":"Structured execution failure, or null when none occurred. Reclassified from the persisted error message, so `blockId`/`blockName`/`blockType` are absent and a block-level failure reports `EXECUTION_FAILED` here even when the same run reported `BLOCK_EXECUTION_FAILED` on its synchronous execute response."},"output":{"anyOf":[{"description":"Final workflow output value."},{"type":"null"}],"description":"Final output when `includeOutput=true`, or null when not requested or hidden by organization permission groups."},"blockOutputs":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Output value produced by one workflow block."}},{"type":"null"}],"description":"Selected block outputs, or null when none were requested or execution data is hidden by organization permission groups. `selectedOutputs` controls these independently of `includeOutput`."},"files":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Workflows_V2RunFile"}},{"type":"null"}],"description":"Run-produced files when `includeOutput=true`, or null when not requested or execution data is hidden by organization permission groups."}},"required":["runId","workflowId","status","trigger","startedAt","endedAt","durationMs","paused","cost","error","output","blockOutputs","files"],"additionalProperties":false,"title":"Workflow run status","description":"Detailed current state of a workflow run."},"Workflows_WorkflowRunStatusResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowRunStatus"}},"required":["data"],"additionalProperties":false,"title":"Workflow run status response","description":"Detailed current state of a workflow run.","examples":[{"data":{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","trigger":"api","startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000,"paused":null,"cost":{"total":12},"error":null,"output":{"result":"Ticket routed to Support"},"blockOutputs":null,"files":[{"id":"file_1a2b3c","name":"summary.pdf","size":20480,"type":"application/pdf","downloadPath":"/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a/files/file_1a2b3c","base64":null}]}}]},"Workflows_ResumeWorkflowSyncResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowRunResult"}},"required":["data"],"additionalProperties":false,"title":"Synchronous workflow resume response","description":"Completed, failed, paused, or cancelled resumed workflow run.","examples":[{"data":{"runId":"run_8f14e45f-ceea-467f-a","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","status":"completed","output":{"result":"Ticket routed to Support"},"blockOutputs":null,"error":null,"startedAt":"2026-08-09T18:04:10.000Z","endedAt":"2026-08-09T18:04:11.000Z","durationMs":1000}}]},"Workflows_QueuedWorkflowResume":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]},"statusUrl":{"type":"string","format":"uri","description":"Absolute URL of the workflow run resource."},"queuePosition":{"description":"Current queue position, when available.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["runId","statusUrl"],"additionalProperties":false,"title":"Queued workflow resume","description":"Receipt returned when a resumed workflow attempt is queued."},"Workflows_ResumeWorkflowQueuedResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_QueuedWorkflowResume"}},"required":["data"],"additionalProperties":false,"title":"Queued workflow resume response","description":"Receipt returned when a resumed workflow attempt is queued.","examples":[{"data":{"runId":"run_8f14e45f-ceea-467f-a","statusUrl":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a"}}]},"Workflows_ResumeWorkflowRequest":{"type":"object","properties":{"contextId":{"type":"string","minLength":1,"description":"Human-in-the-loop pause-context identifier."},"input":{"description":"Input supplied to the paused workflow block."}},"required":["contextId"],"additionalProperties":false,"title":"Resume workflow request","description":"Pause context and optional input used to resume a workflow run.","examples":[{"contextId":"ctx_123","input":{"approved":true}}]},"Workflows_CancelWorkflowRunResult":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether this request cancelled anything. `false` with an `already_*` reason means the run had already reached that terminal state, so there was nothing to cancel — still `200`, because a no-op is not an error. `false` with any other reason identifies a degraded or incomplete cancellation step."},"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Unique workflow run identifier.","examples":["run_8f14e45f-ceea-467f-a"]},"redisAvailable":{"type":"boolean","description":"Whether the distributed cancellation channel was available."},"durablyRecorded":{"type":"boolean","description":"Whether this request durably recorded a cancellation. Always false for a run that was already terminal, where the request is satisfied but nothing was written."},"locallyAborted":{"type":"boolean","description":"Whether an in-process execution was aborted."},"pausedCancelled":{"type":"boolean","description":"Whether a paused execution was cancelled."},"reason":{"description":"Machine-readable cancellation outcome, present on every cancellation including full successes. `recorded` and `queue_cancelled` are successful cancellation values. `already_cancelled`, `already_completed`, and `already_failed` mean the run had already reached that terminal state, so nothing was cancelled and `durablyRecorded` is false. The remaining values identify a degraded or incomplete cancellation step.","type":"string","enum":["recorded","already_cancelled","already_completed","already_failed","redis_unavailable","redis_write_failed","paused_event_publish_failed","paused_database_cancel_failed","queue_cancelled","active_resume_signal_failed","cancellation_not_finalized"]}},"required":["success","runId","redisAvailable","durablyRecorded","locallyAborted","pausedCancelled"],"additionalProperties":false,"title":"Cancel workflow run result","description":"Outcome of a workflow run cancellation request. Cancellation is best-effort: a run already in a terminal state is a `200` no-op, reported as `success: false` and `durablyRecorded: false` with an `already_*` reason naming the state observed."},"Workflows_CancelWorkflowRunResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_CancelWorkflowRunResult"}},"required":["data"],"additionalProperties":false,"title":"Cancel workflow run response","description":"Outcome of the cancellation request.","examples":[{"data":{"success":true,"runId":"run_8f14e45f-ceea-467f-a","redisAvailable":true,"durablyRecorded":true,"locallyAborted":true,"pausedCancelled":false,"reason":"recorded"}}]},"Workflows_WorkflowFolder":{"type":"object","properties":{"name":{"type":"string","description":"Folder name."},"path":{"type":"string","title":"Non-root folder path","description":"Canonical folder path used as the public folder identifier.","maxLength":4096},"parentPath":{"type":"string","title":"Folder path","description":"Canonical parent path; `/` is the root.","maxLength":4096},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the folder was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the folder was last updated.","format":"date-time"},"locked":{"type":"boolean","description":"Whether the folder is currently locked for mutation."}},"required":["name","path","parentPath","createdAt","updatedAt","locked"],"additionalProperties":false,"title":"Workflow folder","description":"A canonical workflow folder and its mutation lock state."},"Workflows_WorkflowFolderListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkflowFolder"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Workflow folder list response","description":"A list of canonical workflow folders.","examples":[{"data":[{"name":"Operations","path":"/Operations","parentPath":"/","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-05-01T09:00:00.000Z","locked":false}],"nextCursor":null}]},"Workflows_CreateWorkflowFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowFolder"}},"required":["data"],"additionalProperties":false,"title":"Create workflow folder response","description":"The created workflow folder.","examples":[{"data":{"name":"Operations","path":"/Operations","parentPath":"/","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-05-01T09:00:00.000Z","locked":false}}]},"Workflows_NonRootFolderPathInput":{"title":"Non-root folder path input","description":"Non-root folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"Workflows_CreateWorkflowFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the folder."},"path":{"description":"Path of the folder to create.","$ref":"#/components/schemas/Workflows_NonRootFolderPathInput"}},"required":["workspaceId","path"],"additionalProperties":false,"title":"Create workflow folder request","description":"Workspace and canonical path for a new workflow folder."},"Workflows_RelocateWorkflowFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkflowFolder"}},"required":["data"],"additionalProperties":false,"title":"Relocate workflow folder response","description":"The relocated workflow folder.","examples":[{"data":{"name":"Support","path":"/Support","parentPath":"/","createdAt":"2026-05-01T09:00:00.000Z","updatedAt":"2026-05-01T09:00:00.000Z","locked":false}}]},"Workflows_RelocateWorkflowFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."},"path":{"description":"Current folder path.","$ref":"#/components/schemas/Workflows_NonRootFolderPathInput"},"destinationPath":{"description":"Where the folder lands, with `mv` semantics. A path naming an existing folder receives the source as a child under its current name; `/` moves it to the workspace root under its current name; any other path becomes the folder’s new full path (a rename, a relocation, or both).","$ref":"#/components/schemas/Workflows_FolderPathInput"}},"required":["workspaceId","path","destinationPath"],"additionalProperties":false,"title":"Relocate workflow folder request","description":"Current and destination paths for a workflow folder."},"Workflows_DeleteWorkflowFolderResult":{"type":"object","properties":{"path":{"type":"string","title":"Folder path","description":"Path of the deleted workflow folder.","maxLength":4096},"deleted":{"type":"boolean","const":true,"description":"Confirms that the folder was deleted."},"deletedItems":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of folders deleted."},"workflows":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of workflows deleted."}},"required":["folders","workflows"],"additionalProperties":false,"description":"Resources removed by the deletion."}},"required":["path","deleted","deletedItems"],"additionalProperties":false,"title":"Delete workflow folder result","description":"Confirmation and deletion counts for a workflow folder."},"Workflows_DeleteWorkflowFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_DeleteWorkflowFolderResult"}},"required":["data"],"additionalProperties":false,"title":"Delete workflow folder response","description":"Confirmation and counts for the deleted folder.","examples":[{"data":{"path":"/Operations","deleted":true,"deletedItems":{"folders":1,"workflows":0}}}]},"Workflows_WorkspaceForkPreview":{"type":"object","properties":{"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Fingerprint to submit when applying this preview with the same choices. Preview again after changing a choice."},"sourceWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Canonical workspace the workflows and resources are copied from."},"workflows":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"name":{"type":"string","maxLength":1024,"description":"Display name of the workflow or workspace."}},"required":["sourceWorkflowId","name"],"additionalProperties":false},"description":"Eligible workflows and their planned actions."},"selectedResourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of resources explicitly selected for copying."},"draftOnly":{"type":"boolean","const":true,"description":"True because fork creation produces undeployed drafts."}},"required":["previewFingerprint","sourceWorkspaceId","workflows","selectedResourceCount","draftOnly"],"additionalProperties":false,"title":"Workspace fork preview","description":"Read-only fork plan and fingerprint."},"Workflows_PreviewWorkspaceForkResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceForkPreview"}},"required":["data"],"additionalProperties":false,"title":"Preview workspace fork response","description":"Deployed source workflows, selected-copy count, and a preview fingerprint."},"Workflows_PreviewWorkspaceForkBody":{"type":"object","properties":{"name":{"description":"Display name of the workflow or workspace.","type":"string","minLength":1,"maxLength":100},"copy":{"description":"Explicit resource selections to copy into the new fork; omitted resource kinds are not copied.","type":"object","properties":{"files":{"description":"Workspace file IDs to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"tables":{"description":"Source table identifiers whose schemas and rows are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"knowledgeBases":{"description":"Source knowledge base identifiers whose documents and content are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"customTools":{"description":"Source custom tool identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"skills":{"description":"Source skill identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"description":"External MCP server identifiers to copy; OAuth connections require authorization in the destination.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"workflowMcpServers":{"description":"Workflow-publishing MCP server identifiers to copy as empty configuration shells.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}},"additionalProperties":false,"title":"Preview workspace fork request","description":"Optional child name and explicitly selected resource copies."},"Workflows_WorkspaceOperationReport":{"type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":256,"description":"Durable operation identifier to use for polling."},"requestId":{"type":"string","minLength":1,"maxLength":128,"description":"Client request ID used to commit this operation. Reuse identical mutation inputs with this ID after an uncertain response."},"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."},"kind":{"type":"string","enum":["workflow_import","workspace_fork","workspace_push","workspace_pull"],"description":"Type of committed workspace operation."},"applied":{"type":"boolean","const":true,"description":"The business transaction committed, including when follow-up work fails."},"status":{"type":"string","enum":["processing","completed","completed_with_warnings","requires_configuration","failed"],"description":"Operation status; failed follow-up work does not undo the committed transaction."},"resourceIds":{"maxItems":5000,"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"description":"Identifiers of resources created or changed by the committed operation."},"issues":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128,"description":"Stable machine-readable issue code."},"message":{"type":"string","maxLength":2048,"description":"Human-readable explanation of the issue."},"workflowId":{"description":"Workflow affected by this issue or deployment attempt.","type":"string","maxLength":256},"blockId":{"description":"Source block identifier before graph ID regeneration.","type":"string","maxLength":256},"subBlockKey":{"description":"Registered source field key, including the tool index for nested Agent fields.","type":"string","maxLength":256}},"required":["code","message"],"additionalProperties":false},"description":"Structured warnings, missing configuration, and follow-up failures."},"idMap":{"description":"Source graph identifiers mapped to the imported identifiers.","type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":256}},"deploymentOperationIds":{"description":"Exact deployment attempts admitted by the workspace operation.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":256}},"deployments":{"description":"Readiness of the exact admitted deployment attempts.","maxItems":1000,"type":"array","items":{"type":"object","properties":{"operationId":{"type":"string","maxLength":256,"description":"Durable operation identifier to use for polling."},"workflowId":{"type":"string","maxLength":256,"description":"Workflow affected by this issue or deployment attempt."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Deployment version number for this admitted attempt."},"status":{"type":"string","enum":["preparing","activating","active","failed","superseded"],"description":"Status of this exact admitted deployment attempt."},"ready":{"type":"boolean","description":"Whether this exact deployment attempt is active and all required components are ready."},"pendingComponents":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":128},"description":"Deployment components that have not finished becoming ready."}},"required":["operationId","workflowId","version","status","ready","pendingComponents"],"additionalProperties":false}},"triggerUrlChanges":{"description":"Public trigger paths changed by this sync, with the affected workflow names.","maxItems":1000,"type":"array","items":{"type":"object","properties":{"workflowName":{"type":"string","maxLength":1024,"description":"Name of the workflow whose public trigger path stops serving."},"path":{"type":"string","maxLength":4096,"description":"Public trigger path that stops serving after this sync."}},"required":["workflowName","path"],"additionalProperties":false}},"backgroundWorkId":{"description":"Workspace activity identifier for resource-copy progress.","type":"string","maxLength":256},"copyProgress":{"description":"Completion status and counts for explicitly selected resource copies.","type":"object","properties":{"status":{"type":"string","enum":["pending","completed","failed"],"description":"Background resource-copy status."},"copied":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of resources copied successfully."},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of resources that failed to copy."}},"required":["status","copied","failed"],"additionalProperties":false}},"required":["operationId","requestId","workspaceId","kind","applied","status","resourceIds","issues"],"additionalProperties":false,"title":"Workspace operation receipt","description":"Committed operation receipt, resource copies, and exact deployment readiness."},"Workflows_ForkWorkspaceResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceOperationReport"}},"required":["data"],"additionalProperties":false,"title":"Fork workspace response","description":"Committed fork receipt and resource-copy progress.","examples":[{"data":{"operationId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","requestId":"fork-support-2026-10-13","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","kind":"workspace_fork","applied":true,"status":"processing","resourceIds":["destination_workflow_id"],"issues":[]}}]},"Workflows_ForkWorkspaceBody":{"type":"object","properties":{"name":{"description":"Display name of the workflow or workspace.","type":"string","minLength":1,"maxLength":100},"copy":{"description":"Explicit resource selections to copy into the new fork; omitted resource kinds are not copied.","type":"object","properties":{"files":{"description":"Workspace file IDs to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"tables":{"description":"Source table identifiers whose schemas and rows are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"knowledgeBases":{"description":"Source knowledge base identifiers whose documents and content are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"customTools":{"description":"Source custom tool identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"skills":{"description":"Source skill identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"description":"External MCP server identifiers to copy; OAuth connections require authorization in the destination.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"workflowMcpServers":{"description":"Workflow-publishing MCP server identifiers to copy as empty configuration shells.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"requestId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable client request ID. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can apply another operation."},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Fingerprint returned by a preview with the same choices. A changed plan returns 409; preview again. The example hash is illustrative; use the actual preview value."}},"required":["requestId","previewFingerprint"],"additionalProperties":false,"title":"Fork workspace request","description":"Child name and copy choices, with the actual preview fingerprint and a stable request ID.","examples":[{"name":"Support sandbox","requestId":"fork-support-2026-10-13","previewFingerprint":"c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a"}]},"Workflows_WorkspaceSyncPreview":{"type":"object","properties":{"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Fingerprint to submit when applying this preview with the same choices. Preview again after changing a choice."},"sourceWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Canonical workspace the workflows and resources are copied from."},"targetWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Canonical workspace receiving the changes."},"ready":{"type":"boolean","description":"Whether required bindings, configuration, and sync blockers are resolved. This does not mean the target is already deployed."},"workflows":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["create","replace","archive"],"description":"Planned workflow creation, replacement, or archival."},"sourceWorkflowId":{"description":"Workflow identifier in the source workspace.","type":"string","minLength":1},"targetWorkflowId":{"description":"Existing target workflow identifier; absent when apply will create a new target.","type":"string","minLength":1},"name":{"type":"string","maxLength":1024,"description":"Display name of the workflow or workspace."},"comparison":{"description":"Last successfully synced source deployment compared with the source deployment pinned by this preview. Absent for archive actions.","oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available","description":"Both exact source snapshots are available."},"base":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Exact source deployment snapshot identifier."},"version":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Saved version number in the source workflow."}},"required":["id","version"],"additionalProperties":false,"description":"Source deployment last successfully synced to this destination."},"target":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Exact source deployment snapshot identifier."},"version":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Saved version number in the source workflow."}},"required":["id","version"],"additionalProperties":false,"description":"Pinned source deployment that this sync would copy."}},"required":["status","base","target"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable","description":"The source baseline cannot be compared."},"reason":{"type":"string","enum":["new_workflow","no_baseline","missing_baseline"],"description":"New destination workflow, no recorded successful sync, or deleted baseline snapshot."},"target":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Exact source deployment snapshot identifier."},"version":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Saved version number in the source workflow."}},"required":["id","version"],"additionalProperties":false,"description":"Pinned source deployment that this sync would copy."}},"required":["status","reason","target"],"additionalProperties":false}]}},"required":["action","name"],"additionalProperties":false},"description":"Eligible workflows and their planned actions."},"unresolvedBindings":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","maxLength":256,"description":"Resource or operation kind."},"sourceId":{"type":"string","maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"blockName":{"description":"Display name of the affected source block.","type":"string","maxLength":1024},"reason":{"description":"Structured explanation of the unresolved binding.","type":"string","maxLength":256}},"required":["kind","sourceId"],"additionalProperties":false},"description":"Source references that still require destination mappings or explicit copy choices."},"configuration":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","maxLength":256,"description":"Block identifier in the source workflow."},"subBlockKey":{"type":"string","maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"title":{"type":"string","maxLength":1024,"description":"Human-readable configuration field label."},"required":{"type":"boolean","description":"Whether the reference or configuration is required for this operation."},"currentValue":{"type":"string","maxLength":65536,"description":"Persisted sync override or proposed override; empty when neither is configured."},"multiSelect":{"description":"Whether the field accepts comma-separated selections.","type":"boolean"},"selectorKey":{"description":"Registered selector key for discovering this field’s options.","type":"string","maxLength":256},"discoveryWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace scope for selector discovery: source for a parent being copied, otherwise destination."},"context":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":4096},"description":"Allowlisted selector dependencies scoped to discoveryWorkspaceId."},"parentKind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox"],"description":"Resource kind that owns this dependent configuration."},"parentSourceId":{"type":"string","maxLength":4096,"description":"Source identifier of the parent resource being mapped."},"parentContextKey":{"description":"Selector context key supplied by the mapped parent resource.","type":"string","maxLength":256}},"required":["sourceWorkflowId","sourceBlockId","subBlockKey","title","required","currentValue","discoveryWorkspaceId","context","parentKind","parentSourceId"],"additionalProperties":false},"description":"Dependent fields that may need destination-specific values."},"excludedTargets":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Resource identifier."},"name":{"type":"string","maxLength":1024,"description":"Display name of the workflow or workspace."}},"required":["id","name"],"additionalProperties":false},"description":"Target workflows explicitly excluded from sync."},"triggerSlots":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Stable source trigger block identifier to use in trigger mappings."},"blockName":{"type":"string","maxLength":1024,"description":"Display name of the source trigger block."},"workflowName":{"type":"string","maxLength":1024,"description":"Display name of the source workflow."},"ownPath":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"description":"Existing target trigger path, preserved automatically and not configurable."},"adoptablePaths":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"description":"Retiring paths in the same target workflow with a compatible trigger provider."},"defaultAdoptPath":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"description":"Default adoption when ownPath is null; null then allocates a new path."}},"required":["sourceWorkflowId","sourceBlockId","blockName","workflowName","ownPath","adoptablePaths","defaultAdoptPath"],"additionalProperties":false},"description":"Source triggers and the target paths available for explicit adoption choices."},"triggerUrlChanges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"workflowName":{"type":"string","maxLength":1024,"description":"Name of the affected workflow."},"path":{"type":"string","maxLength":4096,"description":"Public trigger path that stops serving after this sync."}},"required":["workflowName","path"],"additionalProperties":false},"description":"Retiring target trigger URLs no arriving trigger adopts."}},"required":["previewFingerprint","sourceWorkspaceId","targetWorkspaceId","ready","workflows","unresolvedBindings","configuration","excludedTargets","triggerSlots","triggerUrlChanges"],"additionalProperties":false,"title":"Workspace sync preview","description":"Read-only sync actions, bindings, configuration, and trigger-path choices."},"Workflows_PreviewWorkspacePushResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceSyncPreview"}},"required":["data"],"additionalProperties":false,"title":"Preview workspace push response","description":"Current-to-other workflow actions, required choices, and preview fingerprint."},"Workflows_PreviewWorkspacePushBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."},"mappings":{"description":"Proposed mapping entries addressed by resource type and `sourceId`. Preview does not save them; apply commits them with the sync.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"],"description":"Resource type stored on the canonical parent/child edge."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["resourceType","sourceId","targetId"],"additionalProperties":false}},"dependentValues":{"description":"Destination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Block identifier in the source workflow."},"subBlockKey":{"type":"string","minLength":1,"maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"value":{"type":"string","maxLength":65536,"description":"Destination value for the registered dependent field."}},"required":["sourceWorkflowId","sourceBlockId","subBlockKey","value"],"additionalProperties":false}},"copyResources":{"description":"Explicit source resources to copy before syncing the workflows.","type":"object","properties":{"knowledgeBases":{"description":"Source knowledge base identifiers whose documents and content are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"tables":{"description":"Source table identifiers whose schemas and rows are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"customTools":{"description":"Source custom tool identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"skills":{"description":"Source skill identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"files":{"description":"Workspace file storage keys to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"description":"External MCP server identifiers to copy; OAuth connections require authorization in the destination.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"dropReferences":{"description":"Source-deleted references explicitly acknowledged for removal; live source references cannot be dropped.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."}},"required":["kind","sourceId"],"additionalProperties":false}},"triggerMappings":{"description":"Public trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected.","maxItems":500,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source trigger block identifier from the sync preview."},"adoptPath":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"An adoptable path offered for this trigger, or null to allocate a new path."}},"required":["sourceWorkflowId","sourceBlockId","adoptPath"],"additionalProperties":false}}},"required":["otherWorkspaceId"],"additionalProperties":false,"title":"Preview workspace push request","description":"Other workspace and proposed source-to-target sync choices."},"Workflows_PushWorkspaceResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceOperationReport"}},"required":["data"],"additionalProperties":false,"title":"Push workspace response","description":"Committed push receipt with copy and deployment readiness.","examples":[{"data":{"operationId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","requestId":"push-support-2026-10-13","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","kind":"workspace_push","applied":true,"status":"processing","resourceIds":["destination_workflow_id"],"issues":[]}}]},"Workflows_PushWorkspaceBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."},"mappings":{"description":"Proposed mapping entries addressed by resource type and `sourceId`. Preview does not save them; apply commits them with the sync.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"],"description":"Resource type stored on the canonical parent/child edge."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["resourceType","sourceId","targetId"],"additionalProperties":false}},"dependentValues":{"description":"Destination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Block identifier in the source workflow."},"subBlockKey":{"type":"string","minLength":1,"maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"value":{"type":"string","maxLength":65536,"description":"Destination value for the registered dependent field."}},"required":["sourceWorkflowId","sourceBlockId","subBlockKey","value"],"additionalProperties":false}},"copyResources":{"description":"Explicit source resources to copy before syncing the workflows.","type":"object","properties":{"knowledgeBases":{"description":"Source knowledge base identifiers whose documents and content are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"tables":{"description":"Source table identifiers whose schemas and rows are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"customTools":{"description":"Source custom tool identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"skills":{"description":"Source skill identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"files":{"description":"Workspace file storage keys to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"description":"External MCP server identifiers to copy; OAuth connections require authorization in the destination.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"dropReferences":{"description":"Source-deleted references explicitly acknowledged for removal; live source references cannot be dropped.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."}},"required":["kind","sourceId"],"additionalProperties":false}},"triggerMappings":{"description":"Public trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected.","maxItems":500,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source trigger block identifier from the sync preview."},"adoptPath":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"An adoptable path offered for this trigger, or null to allocate a new path."}},"required":["sourceWorkflowId","sourceBlockId","adoptPath"],"additionalProperties":false}},"requestId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable client request ID. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can apply another operation."},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Fingerprint returned by a preview with the same choices. A changed plan returns 409; preview again. The example hash is illustrative; use the actual preview value."},"confirm":{"type":"boolean","const":true,"description":"Confirm replacement of mapped target drafts and archival of mapped targets whose sources were deleted or archived."}},"required":["otherWorkspaceId","requestId","previewFingerprint","confirm"],"additionalProperties":false,"title":"Push workspace request","description":"Confirmed current-to-other choices, actual preview fingerprint, and stable request ID.","examples":[{"otherWorkspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","requestId":"push-support-2026-10-13","previewFingerprint":"c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a","confirm":true}]},"Workflows_PreviewWorkspacePullResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceSyncPreview"}},"required":["data"],"additionalProperties":false,"title":"Preview workspace pull response","description":"Other-to-current workflow actions, required choices, and preview fingerprint."},"Workflows_PreviewWorkspacePullBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."},"mappings":{"description":"Proposed mapping entries addressed by resource type and `sourceId`. Preview does not save them; apply commits them with the sync.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"],"description":"Resource type stored on the canonical parent/child edge."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["resourceType","sourceId","targetId"],"additionalProperties":false}},"dependentValues":{"description":"Destination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Block identifier in the source workflow."},"subBlockKey":{"type":"string","minLength":1,"maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"value":{"type":"string","maxLength":65536,"description":"Destination value for the registered dependent field."}},"required":["sourceWorkflowId","sourceBlockId","subBlockKey","value"],"additionalProperties":false}},"copyResources":{"description":"Explicit source resources to copy before syncing the workflows.","type":"object","properties":{"knowledgeBases":{"description":"Source knowledge base identifiers whose documents and content are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"tables":{"description":"Source table identifiers whose schemas and rows are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"customTools":{"description":"Source custom tool identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"skills":{"description":"Source skill identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"files":{"description":"Workspace file storage keys to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"description":"External MCP server identifiers to copy; OAuth connections require authorization in the destination.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"dropReferences":{"description":"Source-deleted references explicitly acknowledged for removal; live source references cannot be dropped.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."}},"required":["kind","sourceId"],"additionalProperties":false}},"triggerMappings":{"description":"Public trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected.","maxItems":500,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source trigger block identifier from the sync preview."},"adoptPath":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"An adoptable path offered for this trigger, or null to allocate a new path."}},"required":["sourceWorkflowId","sourceBlockId","adoptPath"],"additionalProperties":false}}},"required":["otherWorkspaceId"],"additionalProperties":false,"title":"Preview workspace pull request","description":"Other workspace and proposed source-to-target sync choices."},"Workflows_PullWorkspaceResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceOperationReport"}},"required":["data"],"additionalProperties":false,"title":"Pull workspace response","description":"Committed pull receipt with copy and deployment readiness.","examples":[{"data":{"operationId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","requestId":"pull-support-2026-10-13","workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","kind":"workspace_pull","applied":true,"status":"processing","resourceIds":["destination_workflow_id"],"issues":[]}}]},"Workflows_PullWorkspaceBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."},"mappings":{"description":"Proposed mapping entries addressed by resource type and `sourceId`. Preview does not save them; apply commits them with the sync.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"],"description":"Resource type stored on the canonical parent/child edge."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["resourceType","sourceId","targetId"],"additionalProperties":false}},"dependentValues":{"description":"Destination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Block identifier in the source workflow."},"subBlockKey":{"type":"string","minLength":1,"maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"value":{"type":"string","maxLength":65536,"description":"Destination value for the registered dependent field."}},"required":["sourceWorkflowId","sourceBlockId","subBlockKey","value"],"additionalProperties":false}},"copyResources":{"description":"Explicit source resources to copy before syncing the workflows.","type":"object","properties":{"knowledgeBases":{"description":"Source knowledge base identifiers whose documents and content are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"tables":{"description":"Source table identifiers whose schemas and rows are copied.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"customTools":{"description":"Source custom tool identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"skills":{"description":"Source skill identifiers to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"files":{"description":"Workspace file storage keys to copy.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"description":"External MCP server identifiers to copy; OAuth connections require authorization in the destination.","maxItems":2000,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"dropReferences":{"description":"Source-deleted references explicitly acknowledged for removal; live source references cannot be dropped.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."}},"required":["kind","sourceId"],"additionalProperties":false}},"triggerMappings":{"description":"Public trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected.","maxItems":500,"type":"array","items":{"type":"object","properties":{"sourceWorkflowId":{"type":"string","minLength":1,"description":"Workflow identifier in the source workspace."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source trigger block identifier from the sync preview."},"adoptPath":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"An adoptable path offered for this trigger, or null to allocate a new path."}},"required":["sourceWorkflowId","sourceBlockId","adoptPath"],"additionalProperties":false}},"requestId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable client request ID. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can apply another operation."},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Fingerprint returned by a preview with the same choices. A changed plan returns 409; preview again. The example hash is illustrative; use the actual preview value."},"confirm":{"type":"boolean","const":true,"description":"Confirm replacement of mapped target drafts and archival of mapped targets whose sources were deleted or archived."}},"required":["otherWorkspaceId","requestId","previewFingerprint","confirm"],"additionalProperties":false,"title":"Pull workspace request","description":"Confirmed other-to-current choices, actual preview fingerprint, and stable request ID.","examples":[{"otherWorkspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","requestId":"pull-support-2026-10-13","previewFingerprint":"c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a","confirm":true}]},"Workflows_GetWorkspaceForkAvailabilityResult":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether this deployment and workspace plan enable forking."}},"required":["available"],"additionalProperties":false,"title":"Get workspace fork availability result","description":"Fork feature availability for this workspace."},"Workflows_GetWorkspaceForkAvailabilityResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_GetWorkspaceForkAvailabilityResult"}},"required":["data"],"additionalProperties":false,"title":"Get workspace fork availability response","description":"Whether forking is enabled for this deployment and workspace plan."},"Workflows_GetWorkspaceForkLineageResult":{"type":"object","properties":{"current":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Resource identifier."},"name":{"type":"string","maxLength":1024,"description":"Display name of the workflow or workspace."},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owning organization, or null for a personal workspace."}},"required":["id","name","organizationId"],"additionalProperties":false,"description":"The current workspace lineage node."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Resource identifier."},"name":{"type":"string","maxLength":1024,"description":"Display name of the workflow or workspace."},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owning organization, or null for a personal workspace."}},"required":["id","name","organizationId"],"additionalProperties":false},{"type":"null"}],"description":"The live parent workspace, or null when this workspace is not a fork."}},"required":["current","parent"],"additionalProperties":false,"title":"Get workspace fork lineage result","description":"Current workspace and its active parent."},"Workflows_GetWorkspaceForkLineageResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_GetWorkspaceForkLineageResult"}},"required":["data"],"additionalProperties":false,"title":"Get workspace fork lineage response","description":"Current workspace and its active direct parent, when present."},"Workflows_ListWorkspaceForkChildrenResult":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Resource identifier."},"name":{"type":"string","maxLength":1024,"description":"Display name of the workflow or workspace."},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owning organization, or null for a personal workspace."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 creation timestamp."}},"required":["id","name","organizationId","createdAt"],"additionalProperties":false,"title":"List workspace fork children result","description":"An active direct child workspace."},"Workflows_ListWorkspaceForkChildrenResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_ListWorkspaceForkChildrenResult"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List workspace fork children response","description":"A page of active direct child workspaces."},"Workflows_ListWorkspaceForkResourcesResult":{"type":"object","properties":{"id":{"type":"string","maxLength":4096,"description":"Resource identifier."},"label":{"type":"string","maxLength":1024,"description":"Human-readable resource label."},"folderId":{"description":"Containing folder identifier, or null at the workspace root.","anyOf":[{"type":"string"},{"type":"null"}]},"folderName":{"description":"Containing folder name, or null at the workspace root.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","label"],"additionalProperties":false,"title":"List workspace fork resources result","description":"A copyable resource candidate."},"Workflows_ListWorkspaceForkResourcesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_ListWorkspaceForkResourcesResult"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List workspace fork resources response","description":"A page of copyable resource candidates."},"Workflows_GetWorkspaceForkMappingsResult":{"type":"object","properties":{"resourceType":{"type":"string","enum":["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"],"description":"Resource type stored on the canonical parent/child edge."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."},"id":{"type":"string","maxLength":256,"description":"Resource identifier."}},"required":["resourceType","sourceId","targetId","id"],"additionalProperties":false,"title":"Get workspace fork mappings result","description":"A saved directional mapping entry."},"Workflows_GetWorkspaceForkMappingsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_GetWorkspaceForkMappingsResult"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Get workspace fork mappings response","description":"A page of persisted source-to-target mapping entries."},"Workflows_UpdateWorkspaceForkMappingsResult":{"type":"object","properties":{"updated":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of records changed."}},"required":["updated"],"additionalProperties":false,"title":"Update workspace fork mappings result","description":"Count of changed mapping records."},"Workflows_UpdateWorkspaceForkMappingsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_UpdateWorkspaceForkMappingsResult"}},"required":["data"],"additionalProperties":false,"title":"Update workspace fork mappings response","description":"Number of mapping records changed."},"Workflows_UpdateWorkspaceForkMappingsBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."},"direction":{"type":"string","enum":["push","pull"],"description":"Push means current to other; pull means other to current, independent of parent/child orientation."},"mappings":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["oauth_credential","service_account_credential","env_var","table","knowledge_base","file","file_folder","mcp_server","custom_block","custom_tool","skill","sandbox"],"description":"Resource type stored on the canonical parent/child edge."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Source resource identifier in the canonical source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["resourceType","sourceId","targetId"],"additionalProperties":false},"description":"Mapping entries addressed by resource type and `sourceId`. `targetId: null` clears a mapping."}},"required":["otherWorkspaceId","direction","mappings"],"additionalProperties":false,"title":"Update workspace fork mappings request","description":"Other workspace, direction, and mapping entries to update."},"Workflows_RollbackWorkspaceForkResult":{"type":"object","properties":{"restored":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Workflows restored to their prior deployed version."},"archived":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Workflows created by the sync and now archived."},"unarchived":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Previously archived workflows restored by rollback."},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Snapshot workflows no longer available to restore."},"pendingActivations":{"maxItems":1000,"type":"array","items":{"type":"string","maxLength":256},"description":"Workflows whose restored deployment is still activating."}},"required":["restored","archived","unarchived","skipped","pendingActivations"],"additionalProperties":false,"title":"Rollback workspace fork result","description":"Workflow restoration and pending-activation counts."},"Workflows_RollbackWorkspaceForkResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_RollbackWorkspaceForkResult"}},"required":["data"],"additionalProperties":false,"title":"Rollback workspace fork response","description":"Restored, archived, skipped, and still-activating workflow counts."},"Workflows_RollbackWorkspaceForkBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."}},"required":["otherWorkspaceId"],"additionalProperties":false,"title":"Rollback workspace fork request","description":"Other workspace whose latest inbound sync should be undone."},"Workflows_UnlinkWorkspaceForkResult":{"type":"object","properties":{"unlinked":{"type":"boolean","description":"Whether the fork edge was removed."}},"required":["unlinked"],"additionalProperties":false,"title":"Unlink workspace fork result","description":"Fork-edge removal acknowledgment."},"Workflows_UnlinkWorkspaceForkResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_UnlinkWorkspaceForkResult"}},"required":["data"],"additionalProperties":false,"title":"Unlink workspace fork response","description":"Confirmation that the relationship was removed."},"Workflows_UnlinkWorkspaceForkBody":{"type":"object","properties":{"otherWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace on the other side of the direct fork edge."}},"required":["otherWorkspaceId"],"additionalProperties":false,"title":"Unlink workspace fork request","description":"Other workspace on the direct fork edge to remove."},"Workflows_UpdateWorkspaceForkExclusionsResult":{"type":"object","properties":{"updated":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of records changed."}},"required":["updated"],"additionalProperties":false,"title":"Update workspace fork exclusions result","description":"Count of changed workflow exclusion flags."},"Workflows_UpdateWorkspaceForkExclusionsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_UpdateWorkspaceForkExclusionsResult"}},"required":["data"],"additionalProperties":false,"title":"Update workspace fork exclusions response","description":"Number of workflow exclusion flags changed."},"Workflows_UpdateWorkspaceForkExclusionsBody":{"type":"object","properties":{"workflowIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1},"description":"Workflow identifiers in the current workspace."},"forkSyncExcluded":{"type":"boolean","description":"Whether the named workflows should be skipped as sync sources and targets."}},"required":["workflowIds","forkSyncExcluded"],"additionalProperties":false,"title":"Update workspace fork exclusions request","description":"Workflow IDs and whether to exclude them from sync."},"Workflows_PreviewWorkflowImportResult":{"type":"object","properties":{"previewFingerprint":{"type":"string","minLength":64,"maxLength":64,"description":"Fingerprint to send when applying this import with the same choices. Preview again after changing any choice."},"ready":{"type":"boolean","description":"Whether every required destination binding and configuration field is resolved for import."},"bindings":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"sourceId":{"type":"string","maxLength":4096,"description":"Untrusted source reference label; imports never use it to authorize or query a source workspace."},"targetId":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."},"required":{"type":"boolean","description":"Whether the reference or configuration is required for this operation."},"occurrence":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"valuePath":{"maxItems":8,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"integer","minimum":0,"maximum":2000}]},"description":"Path within the field value; strings address properties and numbers address array entries."},"positions":{"description":"Positions occupied by this identifier in a multi-value field.","maxItems":2000,"type":"array","items":{"type":"integer","minimum":0,"maximum":2000}},"encoding":{"type":"string","enum":["scalar","array","csv","files","environment"],"description":"Registered encoding used to discover and rewrite the reference."}},"required":["blockId","subBlockKey","valuePath","encoding"],"additionalProperties":false,"description":"Registered source field occurrence addressed by this binding."}},"required":["kind","sourceId","targetId","required","occurrence"],"additionalProperties":false},"description":"Resolved and unresolved source occurrences with their destination selections."},"unresolvedBindings":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"sourceId":{"type":"string","maxLength":4096,"description":"Untrusted source reference label; imports never use it to authorize or query a source workspace."},"targetId":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."},"required":{"type":"boolean","description":"Whether the reference or configuration is required for this operation."},"occurrence":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"valuePath":{"maxItems":8,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"integer","minimum":0,"maximum":2000}]},"description":"Path within the field value; strings address properties and numbers address array entries."},"positions":{"description":"Positions occupied by this identifier in a multi-value field.","maxItems":2000,"type":"array","items":{"type":"integer","minimum":0,"maximum":2000}},"encoding":{"type":"string","enum":["scalar","array","csv","files","environment"],"description":"Registered encoding used to discover and rewrite the reference."}},"required":["blockId","subBlockKey","valuePath","encoding"],"additionalProperties":false,"description":"Registered source field occurrence addressed by this binding."}},"required":["kind","sourceId","targetId","required","occurrence"],"additionalProperties":false},"description":"Source references that still require destination mappings or explicit copy choices."},"configuration":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"title":{"type":"string","maxLength":1024,"description":"Human-readable configuration field label."},"required":{"type":"boolean","description":"Whether the reference or configuration is required for this operation."},"configured":{"type":"boolean","description":"Whether this destination field currently has a nonempty value."},"multiSelect":{"description":"Whether the field accepts comma-separated selections.","type":"boolean"},"selectorKey":{"description":"Registered selector key for discovering this field’s destination options.","type":"string","maxLength":256},"context":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":16384},"description":"Allowlisted selector dependencies scoped to the destination workspace."},"requiresAuthentication":{"type":"boolean","description":"Whether a human must connect the provider before choices can be discovered."}},"required":["blockId","subBlockKey","title","required","configured","context","requiresAuthentication"],"additionalProperties":false},"description":"Dependent fields that may need destination-specific values."},"unresolvedConfiguration":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":1024,"description":"Registered source field key, including the tool index for nested Agent fields."},"title":{"type":"string","maxLength":1024,"description":"Human-readable configuration field label."},"required":{"type":"boolean","description":"Whether the reference or configuration is required for this operation."},"configured":{"type":"boolean","description":"Whether this destination field currently has a nonempty value."},"multiSelect":{"description":"Whether the field accepts comma-separated selections.","type":"boolean"},"selectorKey":{"description":"Registered selector key for discovering this field’s destination options.","type":"string","maxLength":256},"context":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":16384},"description":"Allowlisted selector dependencies scoped to the destination workspace."},"requiresAuthentication":{"type":"boolean","description":"Whether a human must connect the provider before choices can be discovered."}},"required":["blockId","subBlockKey","title","required","configured","context","requiresAuthentication"],"additionalProperties":false},"description":"Required destination configuration that remains empty."},"discovery":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","maxLength":256,"description":"Resource or operation kind."},"command":{"type":"string","maxLength":1024,"description":"CLI command to enumerate destination candidates."},"humanAuthorizationMayBeRequired":{"type":"boolean","description":"Whether discovery may require a human OAuth authorization step."}},"required":["kind","command","humanAuthorizationMayBeRequired"],"additionalProperties":false},"description":"CLI operations for discovering suitable destination resources."}},"required":["previewFingerprint","ready","bindings","unresolvedBindings","configuration","unresolvedConfiguration","discovery"],"additionalProperties":false,"title":"Workflow import preview","description":"Import readiness, unresolved bindings, and destination discovery instructions."},"Workflows_PreviewWorkflowImportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_PreviewWorkflowImportResult"}},"required":["data"],"additionalProperties":false,"title":"Preview workflow import response","description":"Import readiness, unresolved bindings, and destination discovery instructions."},"Workflows_ImportWorkflowRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to import the workflow."},"workflow":{"anyOf":[{"type":"string","minLength":1,"description":"JSON string containing a workflow export object or bare workflow state."},{"type":"object","additionalProperties":true,"description":"Workflow export object or bare workflow state."}],"description":"Workflow export object, bare workflow state, or JSON string containing either form."},"folderPath":{"description":"Destination folder path; omit for the workspace root.","$ref":"#/components/schemas/Workflows_FolderPathInput"},"name":{"description":"Override for the imported workflow name.","type":"string","minLength":1,"maxLength":200},"description":{"description":"Override for the imported workflow description.","type":"string","maxLength":2000},"mappings":{"description":"Mapping entries addressed by resource kind and source identifier.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"sourceId":{"type":"string","minLength":1,"maxLength":4096,"description":"Untrusted source reference label; imports never use it to authorize or query a source workspace."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["kind","sourceId","targetId"],"additionalProperties":false}},"bindings":{"description":"Resolved and unresolved source occurrences with their destination selections.","maxItems":5000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"valuePath":{"default":[],"maxItems":8,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"integer","minimum":0,"maximum":2000}]},"description":"Path within the field value; strings address properties and numbers address array entries."},"positions":{"description":"Positions occupied by this identifier in a multi-value field.","maxItems":2000,"type":"array","items":{"type":"integer","minimum":0,"maximum":2000}},"encoding":{"default":"scalar","type":"string","enum":["scalar","array","csv","files","environment"],"description":"Registered encoding used to discover and rewrite the reference."},"kind":{"type":"string","enum":["credential","env-var","knowledge-base","knowledge-document","table","file","file-folder","mcp-server","custom-tool","custom-block","skill","sandbox","workflow"],"description":"Resource or operation kind."},"targetId":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}],"description":"Authorized destination identifier, or null to clear the mapping."}},"required":["blockId","subBlockKey","kind","targetId"],"additionalProperties":false}},"dependentValues":{"description":"Destination-specific values addressed by the source block ID and field key, before imported IDs are regenerated.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":256,"description":"Source block identifier before graph ID regeneration."},"subBlockKey":{"type":"string","minLength":1,"maxLength":256,"description":"Registered source field key, including the tool index for nested Agent fields."},"value":{"type":"string","maxLength":16384,"description":"Destination value for the registered dependent field."}},"required":["blockId","subBlockKey","value"],"additionalProperties":false}}},"required":["workspaceId","workflow"],"additionalProperties":false,"title":"Import workflow request","description":"Portable workflow data and destination metadata for an import."},"Workflows_SelectorOption":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":16384,"description":"Provider resource identifier."},"label":{"type":"string","minLength":1,"maxLength":16384,"description":"Human-readable provider resource name."},"meta":{"description":"Safe scalar metadata for presenting or configuring this choice.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"anyOf":[{"type":"string","maxLength":16384},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["id","label"],"additionalProperties":false,"title":"SelectorOption","description":"The SelectorOption result."},"Workflows_ListSelectorResponse":{"type":"object","properties":{"data":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Workflows_SelectorOption"},"description":"Authorized provider options in this page."},"nextCursor":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; null means there is nothing further to fetch. Never construct one yourself."},"truncated":{"type":"boolean","description":"Whether provider limits left the result incomplete. A null `nextCursor` with `truncated: true` does not establish that all options were searched."}},"required":["data","nextCursor","truncated"],"additionalProperties":false,"title":"List selector response","description":"A page of authorized options, continuation cursor, and truncation status."},"Workflows_ListSelectorBody":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."},"selectorKey":{"type":"string","enum":["airtable.bases","airtable.tables","asana.workspaces","attio.lists","attio.objects","bigquery.datasets","bigquery.tables","bitbucket.workspaces","bitbucket.repositories","calcom.eventTypes","calcom.schedules","clickup.workspaces","clickup.spaces","clickup.folders","clickup.lists","coda.docs","coda.pages","coda.tables","coda.columns","coda.rows","coda.formulas","coda.controls","coda.folders","coda.permissions","confluence.spaces","confluence.spacesById","confluence.pages","google.tasks.lists","fivetran.groups","fivetran.connections","gmail.labels","google.calendar","google.drive","google.sheets","harmonic.savedSearches","hubspot.lists","hubspot.owners","hubspot.pipelines","hubspot.pipelineStages","hubspot.properties","jsm.requestTypes","jsm.serviceDesks","microsoft.planner.plans","notion.databases","notion.pages","netsuite.recordTypes","netsuite.asyncTasks","pipedrive.pipelines","sharepoint.lists","trello.boards","zoho_desk.organizations","zoho_desk.departments","zoho_desk.agents","zoom.meetings","slack.channels","snowflake.databases","snowflake.schemas","snowflake.tables","snowflake.warehouses","snowflake.roles","snowflake.fileFormats","snowflake.procedures","slack.users","outlook.folders","outlook.calendars","microsoft.teams","microsoft.chats","microsoft.channels","microsoft.planner","onedrive.files","onedrive.folders","sharepoint.sites","microsoft.excel","microsoft.excel.drives","microsoft.excel.sheets","microsoft.word","wealthbox.contacts","jira.issues","jira.projects","jira.projectKeys","linear.projects","linear.teams","monday.boards","monday.groups","webflow.sites","webflow.collections","webflow.items","planetscale.databases","powerbi.workspaces","powerbi.datasets","powerbi.reports","planetscale.branches","planetscale.backups","planetscale.deployRequests","cloudwatch.logGroups","cloudwatch.logStreams","imap.mailboxes","mcp.tools","managedAgent.agents","managedAgent.environments","managedAgent.vaults","managedAgent.memoryStores","knowledge.documents","sim.workflows","table.columns","table.outputColumns","workspace.secretNames","workspace.sandboxes","providers.ollamaEmbeddingModels","providers.openrouterEmbeddingModels"],"description":"Registered selector key from an import or sync preview, such as `gmail.labels`."},"context":{"default":{},"description":"Only the dependencies declared by the selector, such as oauthCredential and channelId. Missing OAuth connections require human authorization.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","maxLength":16384}},"search":{"description":"Provider option search text.","type":"string","minLength":1,"maxLength":1024},"cursor":{"description":"Cursor returned by the preceding page. Keep `workspaceId`, `selectorKey`, `context`, and `search` unchanged; only `limit` may change. Restart without a cursor after a changed-page 409.","type":"string","minLength":1,"maxLength":32768},"limit":{"default":50,"description":"Maximum options per page, from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},"required":["workspaceId","selectorKey"],"additionalProperties":false,"title":"List selector request","description":"Workspace, registered selector key, context, and optional search/cursor."},"Workflows_GetSelectorResponse":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/Workflows_SelectorOption"},{"type":"null"}],"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Get selector response","description":"The authorized option, or data:null when absent from complete results."},"Workflows_GetSelectorBody":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Explicit current workspace scope."},"selectorKey":{"type":"string","enum":["airtable.bases","airtable.tables","asana.workspaces","attio.lists","attio.objects","bigquery.datasets","bigquery.tables","bitbucket.workspaces","bitbucket.repositories","calcom.eventTypes","calcom.schedules","clickup.workspaces","clickup.spaces","clickup.folders","clickup.lists","coda.docs","coda.pages","coda.tables","coda.columns","coda.rows","coda.formulas","coda.controls","coda.folders","coda.permissions","confluence.spaces","confluence.spacesById","confluence.pages","google.tasks.lists","fivetran.groups","fivetran.connections","gmail.labels","google.calendar","google.drive","google.sheets","harmonic.savedSearches","hubspot.lists","hubspot.owners","hubspot.pipelines","hubspot.pipelineStages","hubspot.properties","jsm.requestTypes","jsm.serviceDesks","microsoft.planner.plans","notion.databases","notion.pages","netsuite.recordTypes","netsuite.asyncTasks","pipedrive.pipelines","sharepoint.lists","trello.boards","zoho_desk.organizations","zoho_desk.departments","zoho_desk.agents","zoom.meetings","slack.channels","snowflake.databases","snowflake.schemas","snowflake.tables","snowflake.warehouses","snowflake.roles","snowflake.fileFormats","snowflake.procedures","slack.users","outlook.folders","outlook.calendars","microsoft.teams","microsoft.chats","microsoft.channels","microsoft.planner","onedrive.files","onedrive.folders","sharepoint.sites","microsoft.excel","microsoft.excel.drives","microsoft.excel.sheets","microsoft.word","wealthbox.contacts","jira.issues","jira.projects","jira.projectKeys","linear.projects","linear.teams","monday.boards","monday.groups","webflow.sites","webflow.collections","webflow.items","planetscale.databases","powerbi.workspaces","powerbi.datasets","powerbi.reports","planetscale.branches","planetscale.backups","planetscale.deployRequests","cloudwatch.logGroups","cloudwatch.logStreams","imap.mailboxes","mcp.tools","managedAgent.agents","managedAgent.environments","managedAgent.vaults","managedAgent.memoryStores","knowledge.documents","sim.workflows","table.columns","table.outputColumns","workspace.secretNames","workspace.sandboxes","providers.ollamaEmbeddingModels","providers.openrouterEmbeddingModels"],"description":"Registered selector key from an import or sync preview, such as `gmail.labels`."},"context":{"default":{},"description":"Only the dependencies declared by the selector, such as oauthCredential and channelId. Missing OAuth connections require human authorization.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","maxLength":16384}},"id":{"type":"string","minLength":1,"maxLength":16384,"description":"Provider option ID to resolve with the same selector and declared context."}},"required":["workspaceId","selectorKey","id"],"additionalProperties":false,"title":"Get selector request","description":"Workspace, registered selector key, context, and provider option ID."},"Workflows_GetWorkspaceOperationResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Workflows_WorkspaceOperationReport"}},"required":["data"],"additionalProperties":false,"title":"Get workspace operation response","description":"Refreshed commit, copy progress, and exact deployment readiness."},"Workflows_ListWorkspaceOperationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflows_WorkspaceOperationReport"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List workspace operations response","description":"A page of stored operation receipts."},"Logs_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Logs_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"Logs_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"Logs_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/Logs_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"Logs_V2LogListItem":{"type":"object","properties":{"kind":{"type":"string","enum":["workflow","job"],"description":"Whether the run executed a workflow or a Chat / Sim-agent job. Job runs appear only when `includeJobRuns=true`."},"runId":{"type":"string","description":"Unique run identifier."},"workflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow identifier, or null when unavailable."},"deploymentVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deployment version identifier, or null when unavailable."},"status":{"type":"string","enum":["pending","running","paused","redacting","completed","failed","cancelled"],"description":"Current execution status, reported as persisted. `redacting` is transient while run output is scrubbed. `paused` is reported only when a resume attempt did not complete; a run held at a human-in-the-loop pause point reads `pending` here, and `paused` on the workflow run resources. Use those when the pause state matters."},"level":{"type":"string","description":"Log severity level."},"trigger":{"type":"string","description":"Trigger that started the run."},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 execution start timestamp."},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 execution end timestamp, or null while the run is active."},"totalDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total execution duration in milliseconds, or null while unavailable."},"cost":{"anyOf":[{"type":"object","properties":{"total":{"type":"number","description":"Total execution cost in USD."}},"required":["total"],"additionalProperties":false},{"type":"null"}],"description":"Cost charged for the run, or null when the run has neither a recorded total nor an itemized ledger."},"files":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Logs_V2LogFile"}},{"type":"null"}],"description":"Files the run produced, or null when none are recorded. Only the run's own output files appear; input attachments a caller supplied are addressed through the files API instead."},"hasHandledErrors":{"type":"boolean","description":"Whether a block in the run errored and was recovered by an error path. Such a run keeps `level: info`, so this is the only place the handled error shows at run level; pass `includeHandledErrors=true` with `level=error` to list these runs. Always false for a job run."},"workflow":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow identifier, or null when unavailable."},"name":{"type":"string","description":"Workflow name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description, or null when unset."},"deleted":{"type":"boolean","description":"Whether the workflow has been deleted."}},"required":["id","name","description","deleted"],"additionalProperties":false,"description":"Workflow summary for a full-detail result."},"finalOutput":{"description":"Final workflow output."},"traceSpans":{"type":"array","items":{"$ref":"#/components/schemas/Logs_LogTraceSpan"},"description":"Block-level execution trace spans."}},"required":["kind","runId","workflowId","deploymentVersionId","status","level","trigger","startedAt","endedAt","totalDurationMs","cost","files","hasHandledErrors"],"additionalProperties":false,"title":"Execution log summary","description":"Summary information for one workflow execution log."},"Logs_V2LogFile":{"type":"object","properties":{"id":{"type":"string","description":"Identifier to address this file by on the download endpoint."},"name":{"type":"string","description":"File name, including its extension."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"type":{"type":"string","description":"MIME type recorded for the file."},"downloadPath":{"type":"string","description":"Path to fetch this file's bytes from, relative to the API host."}},"required":["id","name","size","type","downloadPath"],"additionalProperties":false,"title":"Execution log file","description":"A file produced by the run this log records."},"Logs_LogTraceSpan":{"title":"Log trace span","description":"One recursive operation span in a workflow execution trace.","type":"object","properties":{"id":{"type":"string","description":"Trace-span identifier."},"name":{"type":"string","description":"Trace-span name."},"type":{"type":"string","description":"Trace-span category."},"duration":{"type":"number","description":"Current trace-span duration in milliseconds."},"durationMs":{"type":"number","description":"Compatibility field for span duration in milliseconds. Read `duration` for current trace spans."},"startTime":{"type":"string","description":"ISO 8601 span start timestamp."},"endTime":{"type":"string","description":"ISO 8601 span end timestamp."},"status":{"type":"string","description":"Trace-span status."},"errorHandled":{"type":"boolean","description":"Whether the recorded error was handled."},"errorType":{"type":"string","description":"Recorded error type."},"errorMessage":{"type":"string","description":"Recorded error message."},"blockId":{"type":"string","description":"Workflow block associated with the span."},"input":{"description":"Input captured for the traced operation."},"output":{"description":"Output captured for the traced operation."},"tokens":{"anyOf":[{"type":"number","description":"Total tokens attributed to the span."},{"type":"object","properties":{"total":{"type":"number","description":"Total tokens."},"input":{"type":"number","description":"Input tokens."},"output":{"type":"number","description":"Output tokens."}},"additionalProperties":false}],"description":"Token usage attributed to the span."},"cost":{"type":"object","properties":{"total":{"type":"number","description":"Total span cost in USD."},"input":{"type":"number","description":"Input-token cost in USD."},"output":{"type":"number","description":"Output-token cost in USD."},"toolCost":{"type":"number","description":"Tool cost in USD."}},"additionalProperties":false,"description":"Cost attributed to the span."},"relativeStartMs":{"type":"number","description":"Offset from the root span in milliseconds."},"toolCalls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Tool-call identifier."},"name":{"type":"string","description":"Invoked tool name."},"arguments":{"description":"Arguments supplied to the tool call."},"result":{"description":"Value returned by the tool call."},"error":{"type":"string","description":"Tool-call error message."},"startTime":{"type":"string","description":"ISO 8601 tool-call start timestamp."},"endTime":{"type":"string","description":"ISO 8601 tool-call end timestamp."},"duration":{"type":"number","description":"Tool-call duration in milliseconds."}},"additionalProperties":{"description":"Additional provider-specific tool-call metadata."}},"description":"Tool calls recorded by the span."},"children":{"type":"array","items":{"$ref":"#/components/schemas/Logs_LogTraceSpan"},"description":"Nested child trace spans."}},"required":["id","name","type"],"additionalProperties":{"description":"Additional provider-specific trace-span metadata."}},"Logs_V2LogListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Logs_V2LogListItem"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Log list response","description":"A cursor-paginated page of workflow execution logs.","examples":[{"data":[{"kind":"workflow","runId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deploymentVersionId":"dep_2c4e6a8b0d1f","status":"completed","level":"info","trigger":"api","startedAt":"2026-01-15T10:30:00.000Z","endedAt":"2026-01-15T10:30:01.250Z","totalDurationMs":1250,"cost":{"total":0.0072},"hasHandledErrors":false,"files":[{"id":"f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04","name":"summary.pdf","size":18422,"type":"application/pdf","downloadPath":"/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13/files/f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04"}]}],"nextCursor":"eyJzdGFydGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwMFoifQ=="}]},"Logs_V2LogDetail":{"type":"object","properties":{"runId":{"type":"string","description":"Unique run identifier."},"workflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow identifier, or null when unavailable."},"deploymentVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deployment version identifier, or null when unavailable."},"status":{"type":"string","enum":["pending","running","paused","redacting","completed","failed","cancelled"],"description":"Current execution status, reported as persisted. `redacting` is transient while run output is scrubbed. `paused` is reported only when a resume attempt did not complete; a run held at a human-in-the-loop pause point reads `pending` here, and `paused` on the workflow run resources. Use those when the pause state matters."},"level":{"type":"string","description":"Log severity level."},"trigger":{"type":"string","description":"Trigger that started the run."},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 execution start timestamp."},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 execution end timestamp, or null while the run is active."},"totalDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total execution duration in milliseconds, or null while unavailable."},"files":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Logs_V2LogFile"}},{"type":"null"}],"description":"Files the run produced, or null when none are recorded. Only the run's own output files appear; input attachments a caller supplied are addressed through the files API instead."},"executedByEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}],"description":"Email of the identity the run executed as: the caller for an interactive or personal-API-key run, and the workspace billing account for a schedule, webhook, deployed chat, or public API call. Null when the run failed before an identity was resolved."},"workflow":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow identifier, or null when unavailable."},"name":{"type":"string","description":"Workflow name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description, or null when unset."},"folderPath":{"anyOf":[{"type":"string","title":"Folder path","description":"Canonical slash-prefixed folder path. `/` is the workspace root. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096},{"type":"null"}],"description":"Canonical folder path of the workflow, in the same form `folderPaths` accepts as a filter: `/` for a workflow at the workspace root. Null only when the path cannot be resolved — the folder has been deleted, or the workflow itself no longer exists."},"ownerEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}],"description":"Deprecated — use the run-level `executedByEmail` instead. Email of the workflow's current owner, or null when unavailable. This is a property of the workflow as it stands today, not of the run: it changes when workflow ownership is reassigned, and the owner is not the identity a background run executes as.","deprecated":true},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owning workspace identifier, or null when unavailable."},"createdAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 workflow creation timestamp, or null when unavailable."},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 workflow update timestamp, or null when unavailable."},"deleted":{"type":"boolean","description":"Whether the workflow has been deleted."}},"required":["id","name","description","folderPath","ownerEmail","workspaceId","createdAt","updatedAt","deleted"],"additionalProperties":false,"description":"Workflow snapshot associated with the execution."},"workflowState":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{"description":"One top-level snapshot section — `blocks`, `edges`, `loops`, `parallels`, or `variables` — passed through as stored."}},{"type":"null"}],"description":"Workflow graph captured for the run, or null if unavailable or includeWorkflowState=false. Sensitive values are redacted to null; environment-variable references may be preserved."},"traceSpans":{"type":"array","items":{"$ref":"#/components/schemas/Logs_LogTraceSpan"},"description":"Materialized block-level execution trace spans."},"finalOutput":{"anyOf":[{"description":"Materialized final workflow output value."},{"type":"null"}],"description":"Materialized final workflow output, or null when none was produced."},"cost":{"anyOf":[{"type":"object","properties":{"total":{"type":"number","description":"Total execution cost in USD."},"items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["fixed","model","tool"],"description":"What the line is for: the run's base fee (`fixed`), one model's inference (`model`), or one metered tool or integration call (`tool`)."},"description":{"type":"string","description":"Human-readable name of the billed item, such as the model or tool id."},"cost":{"type":"number","description":"Amount billed for this line, in USD."},"inputTokens":{"description":"Input tokens attributed to this line. Absent for lines that do not bill tokens.","type":"number"},"outputTokens":{"description":"Output tokens attributed to this line. Absent for lines that do not bill tokens.","type":"number"}},"required":["category","description","cost"],"additionalProperties":false,"description":"One billed line of a run, folded across every event that billed it."}},{"type":"null"}],"description":"Billed lines reconciling to `total`, or null when no itemized ledger exists for the run."}},"required":["total","items"],"additionalProperties":false},{"type":"null"}],"description":"Cost charged for the run, or null when unavailable."},"workflowInput":{"anyOf":[{"description":"Caller-supplied trigger payload for the run."},{"type":"null"}],"description":"Input the run was triggered with, or null when the run recorded none. Credential-bearing and PII-masked values are redacted the same way `finalOutput` is."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 log creation timestamp."}},"required":["runId","workflowId","deploymentVersionId","status","level","trigger","startedAt","endedAt","totalDurationMs","files","executedByEmail","workflow","workflowState","traceSpans","finalOutput","cost","workflowInput","createdAt"],"additionalProperties":false,"title":"Execution log detail","description":"Detailed workflow execution log including state, trace, output, and cost."},"Logs_V2LogDetailResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Logs_V2LogDetail"}},"required":["data"],"additionalProperties":false,"title":"Log detail response","description":"The complete diagnostic representation of a workflow run.","examples":[{"data":{"runId":"e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deploymentVersionId":"dep_2c4e6a8b0d1f","status":"completed","level":"info","trigger":"api","startedAt":"2026-01-15T10:30:00.000Z","endedAt":"2026-01-15T10:30:01.250Z","totalDurationMs":1250,"files":[{"id":"f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04","name":"summary.pdf","size":18422,"type":"application/pdf","downloadPath":"/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13/files/f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04"}],"executedByEmail":"billing@example.com","workflow":{"id":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Customer Support Agent","description":"Routes incoming support tickets and drafts responses","folderPath":"/","ownerEmail":"jane@example.com","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","createdAt":"2025-01-10T09:00:00.000Z","updatedAt":"2025-06-18T16:45:00.000Z","deleted":false},"workflowState":{"blocks":{},"edges":[]},"traceSpans":[],"finalOutput":{"result":"Hello, world!"},"cost":{"total":0.0072,"items":[{"category":"fixed","description":"Base execution charge","cost":0.005},{"category":"model","description":"gpt-5","cost":0.0022,"inputTokens":1840,"outputTokens":260}]},"workflowInput":{"ticketId":"T-4821"},"createdAt":"2026-01-15T10:30:00.000Z"}}]},"Logs_V2WorkflowLogStats":{"type":"object","properties":{"workflowId":{"type":"string","description":"Workflow identifier, or the literal `deleted` for the single series that collects runs whose workflow no longer exists."},"workflowName":{"type":"string","description":"Workflow name, or `Deleted Workflow`."},"segments":{"type":"array","items":{"$ref":"#/components/schemas/Logs_V2LogStatsSegment"},"description":"Buckets in time order. Only the buckets with at least one run unless `includeEmpty` was set, in which case every bucket appears, empty ones included."},"totalExecutions":{"type":"number","description":"Runs for this workflow across the window."},"totalSuccessful":{"type":"number","description":"Runs for this workflow that did not error."},"overallSuccessRate":{"type":"number","description":"Percentage of runs that did not error, from 0 to 100. 100 when there were no runs."}},"required":["workflowId","workflowName","segments","totalExecutions","totalSuccessful","overallSuccessRate"],"additionalProperties":false,"title":"Per-workflow log stats","description":"Bucketed run counts and success rate for one workflow."},"Logs_V2LogStatsSegment":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 start of the bucket."},"totalExecutions":{"type":"number","description":"Runs that started inside the bucket."},"successfulExecutions":{"type":"number","description":"Runs in the bucket that did not error."},"avgDurationMs":{"type":"number","description":"Mean duration of the bucket's runs in milliseconds, weighted by run count. Zero when no run in the bucket recorded a duration."}},"required":["timestamp","totalExecutions","successfulExecutions","avgDurationMs"],"additionalProperties":false,"title":"Log stats bucket","description":"Run counts and mean latency for one time bucket."},"Logs_V2LogStats":{"type":"object","properties":{"workflows":{"type":"array","items":{"$ref":"#/components/schemas/Logs_V2WorkflowLogStats"},"description":"Per-workflow series, ordered by error rate descending then by name, capped at 200 entries."},"workflowsTruncated":{"type":"boolean","description":"Whether `workflows` was cut to 200 entries. The workspace totals and `aggregateSegments` are computed from every workflow before the cut, so they stay exact either way."},"aggregateSegments":{"type":"array","items":{"$ref":"#/components/schemas/Logs_V2LogStatsSegment"},"description":"Workspace-wide totals per bucket, in time order. Subject to the same `includeEmpty` rule as each workflow series: empty buckets are omitted unless asked for."},"totalRuns":{"type":"number","description":"Runs in the window across the whole workspace."},"totalErrors":{"type":"number","description":"Runs in the window that errored."},"handledErrorRuns":{"description":"Runs in the window in which a block errored and was recovered by an error path. Such runs count as successful in every other figure. Present only when `includeHandledErrors=true`.","type":"number"},"avgLatency":{"type":"number","description":"Mean run duration in milliseconds across the window, weighted by run count."},"timeBounds":{"type":"object","properties":{"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 start of the window."},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 end of the window."}},"required":["start","end"],"additionalProperties":false,"description":"Actual window; supplied bounds are exact. Without `endDate`, the right edge is the later of now and the newest matching run. Without `startDate`, the left edge is the oldest match, or 24 hours before the right edge when no runs match. With no matches or supplied bounds, this is the trailing 24 hours; `endDate` alone uses the preceding 24 hours, while `startDate` alone spans through now."},"segmentMs":{"type":"number","description":"Bucket width in milliseconds: `max(60000, floor(windowMs / segmentCount))`. The one-minute minimum applies to bucket width, not window width; when it applies, trailing empty buckets extend past `timeBounds.end` instead of compressing the window."}},"required":["workflows","workflowsTruncated","aggregateSegments","totalRuns","totalErrors","avgLatency","timeBounds","segmentMs"],"additionalProperties":false,"title":"Execution log statistics","description":"Bucketed success rate, error count, and latency for a workspace and each of its workflows."},"Logs_V2LogStatsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Logs_V2LogStats"}},"required":["data"],"additionalProperties":false,"title":"Log statistics response","description":"Bucketed success rate, error count, and latency for a workspace and its workflows.","examples":[{"data":{"workflows":[{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workflowName":"Customer Support Agent","segments":[{"timestamp":"2026-01-15T10:00:00.000Z","totalExecutions":40,"successfulExecutions":38,"avgDurationMs":1180}],"totalExecutions":40,"totalSuccessful":38,"overallSuccessRate":95}],"workflowsTruncated":false,"aggregateSegments":[{"timestamp":"2026-01-15T10:00:00.000Z","totalExecutions":40,"successfulExecutions":38,"avgDurationMs":1180}],"totalRuns":40,"totalErrors":2,"avgLatency":1180,"timeBounds":{"start":"2026-01-15T10:00:00.000Z","end":"2026-01-15T22:00:00.000Z"},"segmentMs":600000}}]},"FilesAudit_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/FilesAudit_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"FilesAudit_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"FilesAudit_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/FilesAudit_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"FilesAudit_FolderPathInput":{"title":"Folder path input","description":"Folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"FilesAudit_V2File":{"type":"object","properties":{"id":{"type":"string","description":"Unique file identifier.","examples":["wf_V1StGXR8z5jdHi6BmyT91"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Original file name.","examples":["data.csv"]},"size":{"type":"number","minimum":0,"description":"Size in bytes of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source, not the rendered document, so it does not predict how many bytes downloading the file returns.","examples":[1024]},"type":{"type":"string","description":"MIME type of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source type, not the rendered document type a download serves.","examples":["text/csv"]},"key":{"type":"string","description":"Storage key for the file.","examples":["workspace/example/data.csv"]},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path. `/` is the workspace root.","maxLength":4096},"uploadedByEmail":{"type":"string","format":"email","pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"Current email address of the uploader.","examples":["jane@example.com"]},"uploadedAt":{"type":"string","description":"ISO 8601 timestamp when the file was uploaded.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of the last content or metadata write.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the file was archived by deleting it, or null while the file is active. Only an archived-scope file list returns files with a non-null value.","format":"date-time","examples":["2026-01-16T09:00:00Z"]}},"required":["id","webUrl","name","size","type","key","folderPath","uploadedByEmail","uploadedAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Workspace file","description":"A workspace file exposed by the public v2 API."},"FilesAudit_V2FileListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FilesAudit_V2File"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"File list response","description":"A cursor-paginated page of workspace files.","examples":[{"data":[{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}],"nextCursor":null}]},"FilesAudit_V2CreatedFile":{"type":"object","properties":{"id":{"type":"string","description":"Unique file identifier.","examples":["wf_V1StGXR8z5jdHi6BmyT91"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Original file name.","examples":["data.csv"]},"size":{"type":"number","minimum":0,"description":"Size in bytes of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source, not the rendered document, so it does not predict how many bytes downloading the file returns.","examples":[1024]},"type":{"type":"string","description":"MIME type of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source type, not the rendered document type a download serves.","examples":["text/csv"]},"key":{"type":"string","description":"Storage key for the file.","examples":["workspace/example/data.csv"]},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path. `/` is the workspace root.","maxLength":4096},"uploadedByEmail":{"type":"string","format":"email","pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"Current email address of the uploader.","examples":["jane@example.com"]},"uploadedAt":{"type":"string","description":"ISO 8601 timestamp when the file was uploaded.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of the last content or metadata write.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the file was archived by deleting it, or null while the file is active. Only an archived-scope file list returns files with a non-null value.","format":"date-time","examples":["2026-01-16T09:00:00Z"]},"revision":{"description":"Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.","type":"string"}},"required":["id","webUrl","name","size","type","key","folderPath","uploadedByEmail","uploadedAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Created file","description":"A newly created workspace file, with the revision it produced."},"FilesAudit_V2CreatedFileResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2CreatedFile"}},"required":["data"],"additionalProperties":false,"title":"Created file response","description":"A newly created workspace file, with the revision it produced.","examples":[{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}}]},"FilesAudit_CreateFileRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the file."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"File name, including its extension. Path separators and dot segments are rejected."},"contentType":{"type":"string","minLength":1,"maxLength":255,"description":"MIME type. When omitted, it is inferred from the file extension."},"folderPath":{"description":"Canonical containing-folder path. Omit for the workspace root.","$ref":"#/components/schemas/FilesAudit_FolderPathInput"},"content":{"default":"","description":"Initial file content. Omit or send an empty string for a zero-byte file. The complete JSON request is capped at 10 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The separate decoded-file limit is 50 MiB. Use an upload session for larger payloads.","type":"string","maxLength":70000000},"encoding":{"default":"utf-8","description":"Encoding of the content field.","type":"string","enum":["utf-8","base64"]}},"required":["workspaceId","name"],"additionalProperties":false,"title":"Create file request","description":"Inline content and placement for a new workspace file."},"FilesAudit_V2FileUpload":{"type":"object","properties":{"id":{"type":"string","description":"Upload session identifier."},"status":{"type":"string","enum":["uploading","completing","finalizing","completed","failed","aborting","aborted","expired"],"description":"Current upload session status."},"name":{"type":"string","description":"File name supplied when the session was created."},"contentType":{"type":"string","description":"MIME type supplied when the session was created."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Expected file size in bytes."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 time when the upload session expires."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure message, or null when no failure has occurred."},"file":{"anyOf":[{"$ref":"#/components/schemas/FilesAudit_V2File"},{"type":"null"}],"description":"Registered file after finalization, or null before finalization completes."}},"required":["id","status","name","contentType","size","expiresAt","error","file"],"additionalProperties":false,"title":"File upload session","description":"Current state of a resumable workspace-file upload session."},"FilesAudit_V2PutUploadTransfer":{"type":"object","properties":{"method":{"type":"string","const":"put","description":"Upload strategy discriminator."},"url":{"type":"string","format":"uri","description":"Signed URL to which the file bytes are uploaded. Upload bytes with `PUT` and exactly the supplied headers; never construct or modify the signed URL. Treat any `2xx` as success. Sim-hosted URLs return an empty `204` and v2 JSON errors. Object-storage URLs may return `200` or `201` and provider-specific errors, often XML."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Headers that must be included with the upload request."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 expiration time for this signed URL. This is the URL's own expiry and is normally earlier than the upload session's expiresAt: the session stays open for later part, status, completion, and abort requests, but the bytes must be uploaded before this time. Once it passes, the storage provider rejects the upload and a new upload session must be created."}},"required":["method","url","headers","expiresAt"],"additionalProperties":false,"title":"Direct upload transfer","description":"Instructions for uploading bytes to one signed URL."},"FilesAudit_V2MultipartUploadTransfer":{"type":"object","properties":{"method":{"type":"string","const":"multipart","description":"Upload strategy discriminator."},"partSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Required size of each non-final part in bytes."},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":640,"description":"Total number of upload parts."}},"required":["method","partSize","partCount"],"additionalProperties":false,"title":"Multipart upload transfer","description":"Instructions for splitting bytes into a multipart upload."},"FilesAudit_V2CreateFileUploadData":{"type":"object","properties":{"session":{"description":"New upload session.","$ref":"#/components/schemas/FilesAudit_V2FileUpload"},"uploadToken":{"type":"string","minLength":1,"description":"Signed control token required by later upload-session requests."},"transfer":{"oneOf":[{"$ref":"#/components/schemas/FilesAudit_V2PutUploadTransfer"},{"$ref":"#/components/schemas/FilesAudit_V2MultipartUploadTransfer"}],"description":"Instructions for transferring the file bytes."}},"required":["session","uploadToken","transfer"],"additionalProperties":false,"title":"Create file upload data","description":"A new file upload session, its control token, and byte-transfer instructions."},"FilesAudit_CreateFileUploadResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2CreateFileUploadData"}},"required":["data"],"additionalProperties":false,"title":"Create file upload response","description":"Upload session, signed control token, and transfer strategy."},"FilesAudit_CreateFileUploadRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which the file will be registered."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"File name, including its extension."},"contentType":{"type":"string","minLength":1,"maxLength":255,"description":"MIME type of the uploaded file."},"size":{"type":"integer","minimum":0,"maximum":5368709120,"description":"Exact file size in bytes."},"folderPath":{"description":"Canonical destination folder path. Omit for the workspace root.","$ref":"#/components/schemas/FilesAudit_FolderPathInput"}},"required":["workspaceId","name","contentType","size"],"additionalProperties":false,"title":"Create file upload request","description":"File metadata required to create an upload session."},"FilesAudit_FileUploadResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileUpload"}},"required":["data"],"additionalProperties":false,"title":"File upload response","description":"Current upload-session state."},"FilesAudit_V2UploadPartUrl":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Multipart part number."},"url":{"type":"string","format":"uri","description":"Signed URL for this upload part. Upload bytes with `PUT` and exactly the supplied headers; never construct or modify the signed URL. Treat any `2xx` as success. Sim-hosted URLs return an empty `204` and v2 JSON errors. Object-storage URLs may return `200` or `201` and provider-specific errors, often XML. Do not retain part `ETag` values; after every part succeeds, call the completion endpoint without a request body."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Headers that must be included with the part upload."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 expiration time for the signed URL."}},"required":["partNumber","url","headers","expiresAt"],"additionalProperties":false,"title":"Upload part URL","description":"A signed URL and required headers for one multipart upload part."},"FilesAudit_V2PartUrlsData":{"type":"object","properties":{"parts":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/FilesAudit_V2UploadPartUrl"},"description":"Signed URLs for requested parts."}},"required":["parts"],"additionalProperties":false,"title":"Upload part URLs","description":"Signed transfer URLs for the requested multipart upload parts."},"FilesAudit_CreateFileUploadPartUrlsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2PartUrlsData"}},"required":["data"],"additionalProperties":false,"title":"Create upload part URLs response","description":"Signed multipart upload URLs."},"FilesAudit_CreateFileUploadPartUrlsRequest":{"type":"object","properties":{"partNumbers":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991},"description":"Multipart part numbers for which signed URLs should be created."}},"required":["partNumbers"],"additionalProperties":false,"title":"Create upload part URLs request","description":"Multipart part numbers requiring signed URLs.","examples":[{"partNumbers":[1,2]}]},"FilesAudit_V2FileText":{"type":"object","properties":{"fileId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File the text was extracted from."},"name":{"type":"string","description":"File name, including its extension."},"path":{"type":"string","description":"Canonical VFS path of the file that was read: `files/…`, or `uploads/<name>` for a Chat upload."},"type":{"type":"string","description":"Stored MIME type of the source file."},"text":{"type":"string","description":"Extracted text."},"truncated":{"type":"boolean","description":"True when a parser limit stopped extraction before the input was exhausted."},"degraded":{"type":"boolean","description":"True when text extraction did not fully succeed and `text` may be incomplete or synthesized from the raw bytes rather than read from the document. Never treat degraded text as authoritative content."},"degradedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why extraction degraded, or null when it did not."},"charCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Length of `text` in characters."},"byteCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Source bytes read from storage before extraction."},"lineRange":{"description":"Present when `offset` or `limit` narrowed the response. `totalLines` is what separates a file that ended from a window that stopped early.","type":"object","properties":{"offset":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"First line returned, 1-based."},"lineCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lines returned."},"totalLines":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lines the whole file holds."},"totalLinesExact":{"type":"boolean","description":"False when text extraction was truncated, so `totalLines` counts only the extracted prefix and is not the end of the file."}},"required":["offset","lineCount","totalLines","totalLinesExact"],"additionalProperties":false}},"required":["fileId","name","path","type","text","truncated","degraded","degradedReason","charCount","byteCount"],"additionalProperties":false,"title":"Extracted file text","description":"Text extracted from a workspace file, with extraction-quality flags."},"FilesAudit_FileTextResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileText"}},"required":["data"],"additionalProperties":false,"title":"File text response","description":"Text extracted from a workspace file."},"FilesAudit_V2FileVersion":{"type":"object","properties":{"fileId":{"type":"string","description":"File this version belongs to."},"version":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Version number, increasing by one per recorded version. Numbers are never reused, so a gap means an older version was removed by retention or deleted.","examples":[3]},"isCurrent":{"type":"boolean","description":"Whether this version holds the current content of the file."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Size in bytes of the stored content of this version."},"contentType":{"type":"string","description":"MIME type of the stored content of this version."},"source":{"type":"string","enum":["upload","user","api","copilot","workflow","collab","revert","unknown"],"description":"What wrote this version: `upload` (the original upload), `user` (a save in the Sim editor), `api` (an API, CLI, or MCP write), `copilot` (Sim, the agent), `workflow` (a workflow run), `collab` (collaborative editing), `revert` (a revert to an earlier version), or `unknown` (content written before version history existed, or by a writer with no source of its own)."},"authors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User identifier."},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"},{"type":"null"}],"description":"Current email address of the user, or null when the account no longer exists."}},"required":["id","email"],"additionalProperties":false},"description":"Users who wrote this version, in order of first contribution. Empty for actorless writers such as workspace API keys. A collaborative version lists every editor in its window."},"restoredFromVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"For a `revert` version, the version whose content it restored; otherwise null."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when this content became current.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of the last write folded into this version. Equals `createdAt` unless edits were coalesced into it.","format":"date-time","examples":["2026-01-15T10:38:00Z"]},"supersededAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when a newer version replaced this one, or null for the current version. Retention ages versions from this time.","format":"date-time","examples":["2026-01-16T09:00:00Z"]}},"required":["fileId","version","isCurrent","size","contentType","source","authors","restoredFromVersion","createdAt","updatedAt","supersededAt"],"additionalProperties":false,"title":"File version","description":"One recorded version of the content of a workspace file."},"FilesAudit_V2FileVersionListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FilesAudit_V2FileVersion"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"File version list response","description":"A cursor-paginated page of file versions.","examples":[{"data":[{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":3,"isCurrent":true,"size":1024,"contentType":"text/csv","source":"api","authors":[{"id":"usr_4kJ9mN2pQ7rS","email":"jane@example.com"}],"restoredFromVersion":null,"createdAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","supersededAt":null}],"nextCursor":null}]},"FilesAudit_V2FileVersionResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileVersion"}},"required":["data"],"additionalProperties":false,"title":"File version response","description":"A single file version.","examples":[{"data":{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":3,"isCurrent":true,"size":1024,"contentType":"text/csv","source":"api","authors":[{"id":"usr_4kJ9mN2pQ7rS","email":"jane@example.com"}],"restoredFromVersion":null,"createdAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","supersededAt":null}}]},"FilesAudit_V2FileVersionDeleteResult":{"type":"object","properties":{"fileId":{"type":"string","description":"File whose version was deleted."},"version":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Version number that was deleted."},"deleted":{"type":"boolean","const":true,"description":"True when the version was removed from history. Stored-content deletion may finish through a background retry."}},"required":["fileId","version","deleted"],"additionalProperties":false,"title":"Delete file version result","description":"Deletion acknowledgement for one file version."},"FilesAudit_V2FileVersionDeleteResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileVersionDeleteResult"}},"required":["data"],"additionalProperties":false,"title":"Delete file version response","description":"Deletion confirmation for one file version.","examples":[{"data":{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":2,"deleted":true}}]},"FilesAudit_V2FileVersionText":{"type":"object","properties":{"fileId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File the text was extracted from."},"name":{"type":"string","description":"File name, including its extension."},"path":{"type":"string","description":"Canonical VFS path of the file that was read: `files/…`, or `uploads/<name>` for a Chat upload."},"type":{"type":"string","description":"Stored MIME type of the source file."},"text":{"type":"string","description":"Extracted text."},"truncated":{"type":"boolean","description":"True when a parser limit stopped extraction before the input was exhausted."},"degraded":{"type":"boolean","description":"True when text extraction did not fully succeed and `text` may be incomplete or synthesized from the raw bytes rather than read from the document. Never treat degraded text as authoritative content."},"degradedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why extraction degraded, or null when it did not."},"charCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Length of `text` in characters."},"byteCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Source bytes read from storage before extraction."},"lineRange":{"description":"Present when `offset` or `limit` narrowed the response. `totalLines` is what separates a file that ended from a window that stopped early.","type":"object","properties":{"offset":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"First line returned, 1-based."},"lineCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lines returned."},"totalLines":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lines the whole file holds."},"totalLinesExact":{"type":"boolean","description":"False when text extraction was truncated, so `totalLines` counts only the extracted prefix and is not the end of the file."}},"required":["offset","lineCount","totalLines","totalLinesExact"],"additionalProperties":false},"version":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Version the text was extracted from."}},"required":["fileId","name","path","type","text","truncated","degraded","degradedReason","charCount","byteCount","version"],"additionalProperties":false,"title":"Extracted file version text","description":"Text extracted from one version of a workspace file, with extraction-quality flags."},"FilesAudit_FileVersionTextResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileVersionText"}},"required":["data"],"additionalProperties":false,"title":"File version text response","description":"Text extracted from one version of a workspace file."},"FilesAudit_V2FileVersionRevertResult":{"type":"object","properties":{"reverted":{"type":"boolean","description":"False when the requested version was already current, in which case nothing was written."},"file":{"$ref":"#/components/schemas/FilesAudit_V2File"},"version":{"description":"The current version of the file after the revert: a new `revert` version; the requested version when it was already current; or the unchanged current version when its content already matched the requested one.","$ref":"#/components/schemas/FilesAudit_V2FileVersion"},"revision":{"description":"Opaque token for the content the file holds after the revert — the one it just wrote, or the unchanged current content when `reverted` is false. Send it back as `expectedRevision` on the next write.","type":"string"}},"required":["reverted","file","version"],"additionalProperties":false,"title":"Revert file version result","description":"The file and its current version after a revert."},"FilesAudit_V2FileVersionRevertResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileVersionRevertResult"}},"required":["data"],"additionalProperties":false,"title":"Revert file version response","description":"The file and its current version after the revert.","examples":[{"data":{"reverted":true,"file":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null},"version":{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","version":5,"isCurrent":true,"size":1024,"contentType":"text/csv","source":"revert","authors":[{"id":"usr_4kJ9mN2pQ7rS","email":"jane@example.com"}],"restoredFromVersion":3,"createdAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","supersededAt":null},"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg"}}]},"FilesAudit_RevertFileVersionRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."},"expectedCurrentVersion":{"description":"Revert only while this is still the current version; otherwise the request fails with `409`. Omit to revert whatever is current. Collaborative edits and repeated workflow writes that fold into the current version keep its number, so prefer `expectedRevision` to guard content.","type":"integer","minimum":1,"maximum":2147483647},"expectedRevision":{"description":"Revert only while the file still holds the content this revision names, as returned by Get file metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version.","type":"string","minLength":1}},"required":["workspaceId"],"additionalProperties":false,"title":"Revert file version request","description":"Workspace scope and an optional current-version precondition.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","expectedCurrentVersion":4}]},"FilesAudit_V2FileUnzipResult":{"type":"object","properties":{"folderPath":{"type":"string","title":"Folder path","description":"Canonical path of the folder the archive was unpacked into. May differ from the archive name when a sibling folder already claimed it.","maxLength":4096},"extractedFileCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of files written into the destination folder."},"skippedFileCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of archive entries skipped as unsafe, empty, or noise."}},"required":["folderPath","extractedFileCount","skippedFileCount"],"additionalProperties":false,"title":"Unzip result","description":"Outcome of unzipping a workspace archive into a folder."},"FilesAudit_FileUnzipResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileUnzipResult"}},"required":["data"],"additionalProperties":false,"title":"Unzip file response","description":"Counts and destination folder for the unpacked archive."},"FilesAudit_UnzipFileBody":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the archive."}},"required":["workspaceId"],"additionalProperties":false,"title":"Unzip file body","description":"Workspace scope for the archive."},"FilesAudit_V2DeleteFileResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted file."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the file was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete file result","description":"File deletion acknowledgement."},"FilesAudit_V2DeleteFileResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2DeleteFileResult"}},"required":["data"],"additionalProperties":false,"title":"Delete file response","description":"Deletion confirmation for one file."},"FilesAudit_V2FileResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2File"}},"required":["data"],"additionalProperties":false,"title":"File response","description":"A single workspace file.","examples":[{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}}]},"FilesAudit_RenameFileRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"New file name, including its extension."}},"required":["workspaceId","name"],"additionalProperties":false,"title":"Rename file request","description":"Workspace scope and new file name.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"renamed.csv"}]},"FilesAudit_V2RestoreFileResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2File"}},"required":["data"],"additionalProperties":false,"title":"Restore file response","description":"The restored file, with its resulting folderPath and name.","examples":[{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data_restored.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null}}]},"FilesAudit_RestoreFileRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the archived file."}},"required":["workspaceId"],"additionalProperties":false,"title":"Restore file request","description":"Workspace scope for the archived file.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}]},"FilesAudit_V2FileShare":{"type":"object","properties":{"id":{"type":"string","description":"Unique share identifier."},"token":{"type":"string","description":"Server-generated token embedded in the public share URL."},"url":{"type":"string","format":"uri","description":"Public share URL.","examples":["https://www.sim.ai/f/share-token-example"]},"isActive":{"type":"boolean","description":"Whether the public share currently resolves."},"resourceType":{"type":"string","enum":["file","folder"],"description":"Kind of resource being shared."},"resourceId":{"type":"string","description":"Identifier of the shared resource."},"authType":{"type":"string","enum":["public","password","email","sso"],"description":"How access to the share is gated."},"hasPassword":{"type":"boolean","description":"Whether a password is stored for this share."},"allowedEmails":{"type":"array","items":{"type":"string","minLength":1,"maxLength":320},"description":"Allowed addresses or @domain patterns for email and SSO shares."}},"required":["id","token","url","isActive","resourceType","resourceId","authType","hasPassword","allowedEmails"],"additionalProperties":false,"title":"File share","description":"Public-safe share configuration for a file."},"FilesAudit_V2FileMetadata":{"type":"object","properties":{"id":{"type":"string","description":"Unique file identifier.","examples":["wf_V1StGXR8z5jdHi6BmyT91"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Original file name.","examples":["data.csv"]},"size":{"type":"number","minimum":0,"description":"Size in bytes of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source, not the rendered document, so it does not predict how many bytes downloading the file returns.","examples":[1024]},"type":{"type":"string","description":"MIME type of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source type, not the rendered document type a download serves.","examples":["text/csv"]},"key":{"type":"string","description":"Storage key for the file.","examples":["workspace/example/data.csv"]},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path. `/` is the workspace root.","maxLength":4096},"uploadedByEmail":{"type":"string","format":"email","pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"Current email address of the uploader.","examples":["jane@example.com"]},"uploadedAt":{"type":"string","description":"ISO 8601 timestamp when the file was uploaded.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of the last content or metadata write.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the file was archived by deleting it, or null while the file is active. Only an archived-scope file list returns files with a non-null value.","format":"date-time","examples":["2026-01-16T09:00:00Z"]},"share":{"anyOf":[{"$ref":"#/components/schemas/FilesAudit_V2FileShare"},{"type":"null"}],"description":"Current public-share state, or null when the file has never been shared."},"revision":{"description":"Opaque token for the file's current content. Send it back as `expectedRevision` so a write or revert is refused when the content moved on. Absent for a file with no recorded content version.","type":"string"},"currentVersion":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Current version number. List file versions returns the history. Pass this as `expectedCurrentVersion` to require that version to remain current; use `expectedRevision` to detect edits folded into the same version."}},"required":["id","webUrl","name","size","type","key","folderPath","uploadedByEmail","uploadedAt","updatedAt","deletedAt","share","currentVersion"],"additionalProperties":false,"title":"File metadata","description":"Workspace file metadata and current public-share configuration."},"FilesAudit_V2FileMetadataResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileMetadata"}},"required":["data"],"additionalProperties":false,"title":"File metadata response","description":"File metadata enriched with its current nullable public-share state.","examples":[{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null,"share":null,"currentVersion":1,"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg"}},{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-16T09:12:00Z","deletedAt":null,"share":{"id":"shr_8Hf3kL9wQ2mNpXr6Tz1Vb","token":"share-token-example","url":"https://www.sim.ai/f/share-token-example","isActive":true,"resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","authType":"public","hasPassword":false,"allowedEmails":[]},"currentVersion":3,"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTZUMDk6MTI6MDAuMDAwWg"}}]},"FilesAudit_V2AuditLogEntry":{"type":"object","properties":{"id":{"type":"string","description":"Unique audit-log entry identifier.","examples":["audit_2c3d4e5f6g"]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace where the action occurred, or null for organization-level actions."},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the person who performed the action."},"actorEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}],"description":"Email address of the person who performed the action."},"action":{"type":"string","description":"Action that was performed.","examples":["file.uploaded"]},"resourceType":{"type":"string","description":"Type of resource affected by the action.","examples":["file"]},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Affected resource ID. Null for folder events, which identify folders by path."},"resourceName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the affected resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the action."},"metadata":{"description":"Additional JSON details specific to the action."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the action occurred.","format":"date-time","examples":["2026-01-15T10:30:00Z"]}},"required":["id","workspaceId","actorName","actorEmail","action","resourceType","resourceId","resourceName","description","metadata","createdAt"],"additionalProperties":false,"title":"Audit-log entry","description":"Public enterprise audit-log entry with privacy-sensitive request data omitted."},"FilesAudit_V2AuditLogListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FilesAudit_V2AuditLogEntry"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Audit-log list response","description":"A cursor-paginated page of audit-log entries.","examples":[{"data":[{"id":"audit_2c3d4e5f6g","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","actorName":"Jane Smith","actorEmail":"jane@example.com","action":"file.uploaded","resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","resourceName":"data.csv","description":"Uploaded file \"data.csv\" via API","metadata":{"fileSize":1024,"fileType":"text/csv"},"createdAt":"2026-01-15T10:30:00Z"}],"nextCursor":null}]},"FilesAudit_V2AuditLogResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2AuditLogEntry"}},"required":["data"],"additionalProperties":false,"title":"Audit-log response","description":"A single audit-log entry.","examples":[{"data":{"id":"audit_2c3d4e5f6g","workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","actorName":"Jane Smith","actorEmail":"jane@example.com","action":"file.uploaded","resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","resourceName":"data.csv","description":"Uploaded file \"data.csv\" via API","metadata":{"fileSize":1024,"fileType":"text/csv"},"createdAt":"2026-01-15T10:30:00Z"}}]},"FilesAudit_V2MoveFileItemsResult":{"type":"object","properties":{"movedItems":{"type":"object","properties":{"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of files moved."}},"required":["files"],"additionalProperties":false,"description":"Counts of file items moved by the request."}},"required":["movedItems"],"additionalProperties":false,"title":"Move file items result","description":"Counts of workspace file items moved by the request."},"FilesAudit_V2MoveFileItemsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2MoveFileItemsResult"}},"required":["data"],"additionalProperties":false,"title":"Move files response","description":"Count of files moved by the operation.","examples":[{"data":{"movedItems":{"files":1}}}]},"FilesAudit_MoveFileItemsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the files."},"fileIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1},"description":"File identifiers to update."},"targetFolderPath":{"description":"Destination folder path. Omit to move files to the workspace root.","$ref":"#/components/schemas/FilesAudit_FolderPathInput"}},"required":["workspaceId","fileIds"],"additionalProperties":false,"title":"Move files request","description":"Files and destination selected for a bulk move."},"FilesAudit_V2GetFileShareResponse":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/FilesAudit_V2FileShare"},{"type":"null"}],"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Get file share response","description":"Current public-share state for a file.","examples":[{"data":{"id":"shr_8Hf3kL9wQ2mNpXr6Tz1Vb","token":"share-token-example","url":"https://www.sim.ai/f/share-token-example","isActive":true,"resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","authType":"public","hasPassword":false,"allowedEmails":[]}},{"data":null}]},"FilesAudit_V2UpsertFileShareResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileShare"}},"required":["data"],"additionalProperties":false,"title":"Upsert file share response","description":"Updated public-share state for a file.","examples":[{"data":{"id":"shr_8Hf3kL9wQ2mNpXr6Tz1Vb","token":"share-token-example","url":"https://www.sim.ai/f/share-token-example","isActive":true,"resourceType":"file","resourceId":"wf_V1StGXR8z5jdHi6BmyT91","authType":"public","hasPassword":false,"allowedEmails":[]}}]},"FilesAudit_UpsertFileShareRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."},"isActive":{"type":"boolean","description":"Whether the share should resolve. Disabling preserves the token and the whole access configuration, so re-enabling restores the share as it was; enabling rewrites the credentials the resulting mode does not use."},"authType":{"description":"How access to the share is gated. The stored mode is kept when omitted. Enabling `public` clears the stored password and empties `allowedEmails`; `password` empties `allowedEmails`; `email` and `sso` clear the stored password.","type":"string","enum":["public","password","email","sso"]},"password":{"description":"Password of 15 to 1024 characters for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply.","type":"string","maxLength":1024},"allowedEmails":{"description":"Allowed addresses or `@domain` patterns for email and SSO shares. Kept when omitted; enabling `email` or `sso` with an empty resulting list is a 400.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":320}}},"required":["workspaceId","isActive"],"additionalProperties":false,"title":"Upsert file share request","description":"Desired public-share state and access policy.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isActive":true,"authType":"public"},{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","isActive":false}]},"FilesAudit_V2EditedFile":{"type":"object","properties":{"file":{"description":"The file after the edit.","$ref":"#/components/schemas/FilesAudit_V2File"},"lineCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lines the file holds after the edit."},"revision":{"description":"Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.","type":"string"}},"required":["file","lineCount"],"additionalProperties":false,"title":"Edited file","description":"A workspace file after an in-place content edit."},"FilesAudit_V2EditedFileResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2EditedFile"}},"required":["data"],"additionalProperties":false,"title":"Edited file response","description":"A workspace file after an in-place content edit.","examples":[{"data":{"file":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null},"lineCount":5}}]},"FilesAudit_EditFileContentRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."},"edit":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"search_replace","description":"Replace exact text."},"search":{"type":"string","minLength":1,"description":"Exact text to replace, matched verbatim. It must appear once unless replaceAll is true."},"content":{"type":"string","description":"Text to put in its place. An empty string deletes the matched text."},"replaceAll":{"description":"Replace every non-overlapping match. Defaults to false.","type":"boolean"}},"required":["mode","search","content"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"replace_between","description":"Replace content between two complete-line anchors."},"beforeAnchor":{"type":"string","minLength":1,"description":"Boundary line before the replaced content. This line remains."},"afterAnchor":{"type":"string","minLength":1,"description":"Boundary line after the replaced content. This line remains."},"content":{"type":"string","description":"Replacement text. An empty string clears the interior."},"occurrence":{"description":"Which beforeAnchor match to use, starting at 1. Defaults to 1. afterAnchor is the first match after it.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["mode","beforeAnchor","afterAnchor","content"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"insert_after","description":"Insert content after a complete-line anchor."},"anchor":{"type":"string","minLength":1,"description":"Complete line after which content is inserted."},"content":{"type":"string","minLength":1,"description":"Text to insert."},"occurrence":{"description":"Which anchor match to insert after, starting at 1. Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["mode","anchor","content"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"delete_between","description":"Delete from one complete-line anchor to another."},"startAnchor":{"type":"string","minLength":1,"description":"First line to delete. This start anchor is removed."},"endAnchor":{"type":"string","minLength":1,"description":"Ending boundary line. This end anchor remains."},"occurrence":{"description":"Which startAnchor match to use, starting at 1. Defaults to 1. endAnchor is the first match after it.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["mode","startAnchor","endAnchor"],"additionalProperties":false}],"description":"One exact or anchor-based edit: search_replace, replace_between, insert_after, or delete_between."},"expectedRevision":{"description":"Revision from Get file metadata or an earlier write; the request is refused with `409` when the content moved on.","type":"string","minLength":1}},"required":["workspaceId","edit"],"additionalProperties":false,"title":"Edit file content request","description":"Workspace scope and the change to apply.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","edit":{"mode":"search_replace","search":"- based in NYC","content":"- based in SF"}},{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","edit":{"mode":"insert_after","anchor":"## Preferences","content":"- prefers async updates"}}]},"FilesAudit_V2FileSearchResults":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"File the line belongs to."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line the match sits on."},"text":{"type":"string","description":"The matching line."}},"required":["fileId","lineNumber","text"],"additionalProperties":false},"description":"Matching lines, one entry per line."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of results returned."},"truncated":{"type":"boolean","description":"True when more matches exist beyond `maxResults`."},"complete":{"type":"boolean","description":"True when no files in the searched scope have pending or failed indexing. Missing matches remain inconclusive unless this is true and both `indexStatus.skippedFiles` and `indexStatus.partialFiles` are zero."},"indexStatus":{"type":"object","properties":{"readyFiles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files whose current revision is indexed and searchable."},"pendingFiles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files not yet indexed at their current revision. Their content was not searched."},"failedFiles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files whose indexing failed. Their content was not searched."},"skippedFiles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files deliberately not indexed, such as binaries and files above the size ceiling."},"partialFiles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files indexed only in part, so matches beyond the indexed portion are not found."}},"required":["readyFiles","pendingFiles","failedFiles","skippedFiles","partialFiles"],"additionalProperties":false,"description":"Index coverage across the searched scope."}},"required":["results","count","truncated","complete","indexStatus"],"additionalProperties":false,"title":"File search results","description":"Matching lines from indexed workspace file content, with index coverage."},"FilesAudit_V2FileSearchResultsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileSearchResults"}},"required":["data"],"additionalProperties":false,"title":"File search results response","description":"Matching lines from indexed workspace file content.","examples":[{"data":{"results":[{"fileId":"wf_V1StGXR8z5jdHi6BmyT91","lineNumber":4,"text":"- based in NYC"}],"count":1,"truncated":false,"complete":true,"indexStatus":{"readyFiles":12,"pendingFiles":0,"failedFiles":0,"skippedFiles":0,"partialFiles":0}}}]},"FilesAudit_V2WrittenFile":{"type":"object","properties":{"id":{"type":"string","description":"Unique file identifier.","examples":["wf_V1StGXR8z5jdHi6BmyT91"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Original file name.","examples":["data.csv"]},"size":{"type":"number","minimum":0,"description":"Size in bytes of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source, not the rendered document, so it does not predict how many bytes downloading the file returns.","examples":[1024]},"type":{"type":"string","description":"MIME type of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source type, not the rendered document type a download serves.","examples":["text/csv"]},"key":{"type":"string","description":"Storage key for the file.","examples":["workspace/example/data.csv"]},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path. `/` is the workspace root.","maxLength":4096},"uploadedByEmail":{"type":"string","format":"email","pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"Current email address of the uploader.","examples":["jane@example.com"]},"uploadedAt":{"type":"string","description":"ISO 8601 timestamp when the file was uploaded.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"updatedAt":{"type":"string","description":"ISO 8601 timestamp of the last content or metadata write.","format":"date-time","examples":["2026-01-15T10:30:00Z"]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the file was archived by deleting it, or null while the file is active. Only an archived-scope file list returns files with a non-null value.","format":"date-time","examples":["2026-01-16T09:00:00Z"]},"revision":{"description":"Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.","type":"string"}},"required":["id","webUrl","name","size","type","key","folderPath","uploadedByEmail","uploadedAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Written file","description":"A workspace file after a content replacement, with the revision it produced."},"FilesAudit_V2WrittenFileResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2WrittenFile"}},"required":["data"],"additionalProperties":false,"title":"Written file response","description":"A workspace file after a content replacement, with the revision the write produced.","examples":[{"data":{"id":"wf_V1StGXR8z5jdHi6BmyT91","webUrl":"https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91","name":"data.csv","size":1024,"type":"text/csv","key":"workspace/example/data.csv","folderPath":"/Engineering","uploadedByEmail":"jane@example.com","uploadedAt":"2026-01-15T10:30:00Z","updatedAt":"2026-01-15T10:30:00Z","deletedAt":null,"revision":"d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg"}}]},"FilesAudit_UpdateFileContentRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the file."},"content":{"type":"string","maxLength":70000000,"description":"Complete replacement content for the file. The complete JSON request is capped at 10 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The separate decoded-file limit is 50 MiB. Small patches can edit a larger stored text file without sending its full content."},"encoding":{"default":"utf-8","description":"Encoding of the content field.","type":"string","enum":["utf-8","base64"]},"expectedRevision":{"description":"Revision from Get file metadata or an earlier write; the request is refused with `409` when the content moved on.","type":"string","minLength":1}},"required":["workspaceId","content"],"additionalProperties":false,"title":"Update file content request","description":"Workspace scope and complete replacement content.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","content":"replacement text"}]},"FilesAudit_V2BulkDeleteFilesResult":{"type":"object","properties":{"deletedItems":{"type":"object","properties":{"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of files deleted."}},"required":["files"],"additionalProperties":false,"description":"Counts of file items deleted by the request."}},"required":["deletedItems"],"additionalProperties":false,"title":"Bulk delete files result","description":"Counts of workspace files deleted by the request."},"FilesAudit_BulkDeleteFilesResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2BulkDeleteFilesResult"}},"required":["data"],"additionalProperties":false,"title":"Bulk delete files response","description":"Count of files deleted by the operation.","examples":[{"data":{"deletedItems":{"files":1}}}]},"FilesAudit_BulkDeleteFilesRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the files."},"fileIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1},"description":"File identifiers to delete."}},"required":["workspaceId","fileIds"],"additionalProperties":false,"title":"Bulk delete files request","description":"Workspace and files selected for deletion.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","fileIds":["wf_V1StGXR8z5jdHi6BmyT91"]}]},"FilesAudit_V2Folder":{"type":"object","properties":{"name":{"type":"string","description":"Folder name."},"path":{"type":"string","title":"Non-root folder path","description":"Canonical folder path used as the public folder identifier.","maxLength":4096},"parentPath":{"type":"string","title":"Folder path","description":"Canonical parent path; `/` is the root.","maxLength":4096},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the folder was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the folder was last updated.","format":"date-time"}},"required":["name","path","parentPath","createdAt","updatedAt"],"additionalProperties":false,"title":"Folder","description":"A canonical workspace folder."},"FilesAudit_FileFolderListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FilesAudit_V2Folder"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"File folder list response","description":"Workspace file folders in the current page."},"FilesAudit_V2FileFolderRestore":{"type":"object","properties":{"folder":{"description":"The restored folder.","$ref":"#/components/schemas/FilesAudit_V2Folder"},"restoredItems":{"type":"object","properties":{"files":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files restored inside the folder tree."},"folders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Folders restored, including the one addressed."}},"required":["files","folders"],"additionalProperties":false,"description":"What the restore brought back."}},"required":["folder","restoredItems"],"additionalProperties":false,"title":"Folder restore result","description":"The restored folder and the counts of items it brought back."},"FilesAudit_FileFolderRestoreResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2FileFolderRestore"}},"required":["data"],"additionalProperties":false,"title":"Folder restore response","description":"The restored folder and the counts of items it brought back."},"FilesAudit_NonRootFolderPathInput":{"title":"Non-root folder path input","description":"Non-root folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"FilesAudit_RestoreFileFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the archived folder."},"path":{"description":"Path of the archived folder to restore, as reported by an archived-scope folder list.","$ref":"#/components/schemas/FilesAudit_NonRootFolderPathInput"}},"required":["workspaceId","path"],"additionalProperties":false,"title":"Restore file folder request","description":"Workspace scope and archived folder path."},"FilesAudit_FileFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2Folder"}},"required":["data"],"additionalProperties":false,"title":"File folder response","description":"A single workspace file folder."},"FilesAudit_CreateFileFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the folder."},"path":{"description":"Path of the folder to create.","$ref":"#/components/schemas/FilesAudit_NonRootFolderPathInput"}},"required":["workspaceId","path"],"additionalProperties":false,"title":"Create file folder request","description":"Workspace and canonical path for a new folder."},"FilesAudit_RelocateFileFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."},"path":{"description":"Current folder path.","$ref":"#/components/schemas/FilesAudit_NonRootFolderPathInput"},"destinationPath":{"description":"Where the folder lands, with `mv` semantics. A path naming an existing folder receives the source as a child under its current name; `/` moves it to the workspace root under its current name; any other path becomes the folder’s new full path (a rename, a relocation, or both).","$ref":"#/components/schemas/FilesAudit_FolderPathInput"}},"required":["workspaceId","path","destinationPath"],"additionalProperties":false,"title":"Relocate file folder request","description":"Current and destination canonical paths for a folder."},"FilesAudit_V2DeleteFileFolderData":{"type":"object","properties":{"path":{"type":"string","title":"Folder path","description":"Deleted folder path.","maxLength":4096},"deleted":{"type":"boolean","const":true,"description":"Confirms that the folder was deleted."},"deletedItems":{"type":"object","properties":{"folders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of folders deleted."},"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of files deleted."}},"required":["folders","files"],"additionalProperties":false,"description":"Counts of folders and files deleted by the request."}},"required":["path","deleted","deletedItems"],"additionalProperties":false,"title":"Delete file folder data","description":"File-folder deletion acknowledgement and deletion counts."},"FilesAudit_DeleteFileFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/FilesAudit_V2DeleteFileFolderData"}},"required":["data"],"additionalProperties":false,"title":"Delete file folder response","description":"Folder deletion confirmation and deleted item counts."},"Tables_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Tables_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"Tables_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"Tables_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/Tables_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"Tables_FolderPathInput":{"title":"Folder path input","description":"Folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"Tables_V2ApiTable":{"type":"object","properties":{"id":{"type":"string","description":"Unique table identifier."},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"name":{"type":"string","description":"Table name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table description, or null when none is set."},"ownerEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Current email address of the table owner.","examples":["owner@example.com"]},"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable server-assigned column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name used as the public row-data key."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Data type of values stored in the column."},"required":{"default":false,"description":"Whether inserts require a value for this column.","type":"boolean"},"unique":{"default":false,"description":"Whether values must be unique across table rows.","type":"boolean"},"workflowGroupId":{"description":"Workflow group whose output populates this column.","type":"string"},"options":{"description":"Options declared for a select column.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"],"additionalProperties":false}},"multiple":{"description":"Whether a select column accepts multiple options.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for a currency column, normalized to uppercase.","type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","type","required","unique"],"additionalProperties":false,"description":"A typed column in a table schema."},"description":"Table column definitions."}},"required":["columns"],"additionalProperties":false,"description":"Typed table schema."},"rowCount":{"type":"number","description":"Current number of rows in the table."},"maxRows":{"type":"number","description":"Maximum rows allowed by the workspace plan."},"folderPath":{"type":"string","title":"Folder path","description":"Canonical slash-prefixed folder path. `/` is the workspace root. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096},"locks":{"type":"object","properties":{"schemaLocked":{"type":"boolean","description":"Whether column-schema changes are locked."},"insertLocked":{"type":"boolean","description":"Whether row insertion is locked."},"updateLocked":{"type":"boolean","description":"Whether row updates are locked."},"deleteLocked":{"type":"boolean","description":"Whether row and table deletion is locked."}},"required":["schemaLocked","insertLocked","updateLocked","deleteLocked"],"additionalProperties":false,"description":"Read-only table governance locks."},"job":{"anyOf":[{"$ref":"#/components/schemas/Tables_V2TableJobState"},{"type":"null"}],"description":"Current background job, or null when idle."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the table was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the table was last modified."}},"required":["id","webUrl","name","description","ownerEmail","schema","rowCount","maxRows","folderPath","locks","job","createdAt","updatedAt"],"additionalProperties":false,"title":"Table","description":"A user-defined table with typed columns and governance state."},"Tables_V2TableJobState":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Background job identifier, or null when unavailable."},"type":{"anyOf":[{"type":"string","enum":["import","delete","export","backfill","update"]},{"type":"null"}],"description":"Kind of background table work."},"status":{"type":"string","enum":["running","ready","failed","canceled"],"description":"Current background job state."},"rowsProcessed":{"type":"number","description":"Number of rows processed by the job."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure reason, or null when the job has not failed."}},"required":["id","type","status","rowsProcessed","error"],"additionalProperties":false,"title":"Table job state","description":"Current background work associated with a table."},"Tables_V2TableListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2ApiTable"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Table list response","description":"A cursor-paginated page of tables."},"Tables_V2CreateTableResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTable"}},"required":["data"],"additionalProperties":false,"title":"Create table response","description":"The created table."},"Tables_CreateTableRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Table name."},"description":{"description":"Optional table description.","type":"string","maxLength":500},"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"schema":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"description":"Optional client-provided column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Column data type."},"required":{"description":"Whether inserts must supply a value for this column.","type":"boolean"},"unique":{"description":"Whether values in the column must be unique.","type":"boolean"},"options":{"description":"Select options for select-type columns.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"]}},"multiple":{"description":"Whether a select column accepts multiple values.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for currency columns.","type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","type"],"additionalProperties":false},"description":"Initial table columns."}},"required":["columns"],"additionalProperties":false,"description":"Initial table column definitions."},"folderPath":{"description":"Folder in which to create the table.","$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["name","workspaceId","schema"],"additionalProperties":false,"title":"Create table request","description":"Workspace, table metadata, folder placement, and typed columns."},"Tables_V2TableResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTable"}},"required":["data"],"additionalProperties":false,"title":"Table response","description":"A single table."},"Tables_V2DeleteTableData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted table."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the table was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete table data","description":"Table deletion acknowledgement."},"Tables_V2DeleteTableResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2DeleteTableData"}},"required":["data"],"additionalProperties":false,"title":"Delete table response","description":"Table deletion acknowledgement."},"Tables_V2UpdateTableResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTable"}},"required":["data"],"additionalProperties":false,"title":"Update table response","description":"The updated table."},"Tables_UpdateTableRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"name":{"description":"Replacement table name.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"description":{"anyOf":[{"description":"Optional table description.","type":"string","maxLength":500},{"type":"null"}],"description":"Replacement table description, or null to clear it."},"folderPath":{"$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["workspaceId"],"additionalProperties":false,"title":"Update table request","description":"Workspace scope and one or more table metadata or placement changes."},"Tables_V2TableColumnsData":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable server-assigned column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name used as the public row-data key."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Data type of values stored in the column."},"required":{"default":false,"description":"Whether inserts require a value for this column.","type":"boolean"},"unique":{"default":false,"description":"Whether values must be unique across table rows.","type":"boolean"},"workflowGroupId":{"description":"Workflow group whose output populates this column.","type":"string"},"options":{"description":"Options declared for a select column.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"],"additionalProperties":false}},"multiple":{"description":"Whether a select column accepts multiple options.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for a currency column, normalized to uppercase.","type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","type","required","unique"],"additionalProperties":false,"description":"A typed column in a table schema."},"description":"Current table columns."}},"required":["columns"],"additionalProperties":false,"title":"Table columns data","description":"The table column list after a schema mutation."},"Tables_V2TableColumnsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableColumnsData"}},"required":["data"],"additionalProperties":false,"title":"Table columns response","description":"The table column list after a schema mutation."},"Tables_AddTableColumnRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the table."},"column":{"type":"object","properties":{"id":{"description":"Optional client-provided column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Column data type."},"required":{"description":"Whether inserts must supply a value for this column.","type":"boolean"},"unique":{"description":"Whether values in the column must be unique.","type":"boolean"},"options":{"description":"Select options for select-type columns.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"]}},"multiple":{"description":"Whether a select column accepts multiple values.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for currency columns.","type":"string","pattern":"^[A-Za-z]{3}$"},"position":{"description":"Zero-based insertion position for the column.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","type"],"additionalProperties":false,"description":"Column definition to add."}},"required":["workspaceId","column"],"additionalProperties":false,"title":"Add table column request","description":"Workspace scope and the typed column to add.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","column":{"name":"plan","type":"string"}}]},"Tables_V2UnmigratedTableBlockReference":{"type":"object","properties":{"workflowId":{"type":"string","description":"Workflow holding the Table block."},"workflowName":{"type":"string","description":"Display name of that workflow."},"blockId":{"type":"string","description":"Table block whose configuration still names the old column."},"blockName":{"type":"string","description":"Display name of that block."},"fields":{"type":"array","items":{"type":"string","enum":["filter","order","data"]},"description":"Sub-block fields that still reference the old column name."}},"required":["workflowId","workflowName","blockId","blockName","fields"],"additionalProperties":false,"title":"Unmigrated table block reference","description":"A workflow Table block still configured against a renamed column."},"Tables_V2UpdateTableColumnData":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable server-assigned column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name used as the public row-data key."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Data type of values stored in the column."},"required":{"default":false,"description":"Whether inserts require a value for this column.","type":"boolean"},"unique":{"default":false,"description":"Whether values must be unique across table rows.","type":"boolean"},"workflowGroupId":{"description":"Workflow group whose output populates this column.","type":"string"},"options":{"description":"Options declared for a select column.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"],"additionalProperties":false}},"multiple":{"description":"Whether a select column accepts multiple options.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for a currency column, normalized to uppercase.","type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","type","required","unique"],"additionalProperties":false,"description":"A typed column in a table schema."},"description":"Current table columns."},"unmigrated":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2UnmigratedTableBlockReference"},"description":"Workflow Table blocks bound to this table whose `filter`, `order`, or `data` still name the column by its previous name. Only populated by a rename; empty otherwise. Workflow state is never rewritten here — edit those blocks with Apply Workflow Operations or their next run fails on the old name."}},"required":["columns","unmigrated"],"additionalProperties":false,"title":"Update table column data","description":"The table column list after the update, plus any workflow Table blocks a rename left pointing at the old column name."},"Tables_V2UpdateTableColumnResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2UpdateTableColumnData"}},"required":["data"],"additionalProperties":false,"title":"Update table column response","description":"The table column list after the update, plus workflow Table blocks a rename left on the old column name.","examples":[{"data":{"columns":[{"id":"col_name","name":"name","type":"string","required":true,"unique":false},{"id":"col_plan","name":"subscriptionPlan","type":"string","required":false,"unique":false}],"unmigrated":[{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","workflowName":"Weekly digest","blockId":"blk_9c1d3f5a7e2b4068a0c2e4f6b8d0f193","blockName":"Query plans","fields":["filter"]}]}}]},"Tables_UpdateTableColumnRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the table."},"columnName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Current name of the column to update."},"updates":{"type":"object","properties":{"name":{"description":"Replacement column name.","type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"type":{"description":"Replacement column data type.","type":"string","enum":["string","number","currency","boolean","date","json","select"]},"required":{"description":"Whether inserts must supply a value for this column.","type":"boolean"},"unique":{"description":"Whether values in the column must be unique.","type":"boolean"},"options":{"description":"Replacement select options for select-type columns.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"]}},"multiple":{"description":"Whether a select column accepts multiple values.","type":"boolean"},"currencyCode":{"description":"Replacement ISO 4217 code for a currency column.","type":"string","pattern":"^[A-Za-z]{3}$"}},"additionalProperties":false,"description":"Mutable column fields."}},"required":["workspaceId","columnName","updates"],"additionalProperties":false,"title":"Update table column request","description":"Workspace scope, current column name, and fields to update.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","columnName":"plan","updates":{"name":"subscriptionPlan"}}]},"Tables_DeleteTableColumnRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"columnName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Name of the column to delete."}},"required":["workspaceId","columnName"],"additionalProperties":false,"title":"Delete table column request","description":"Workspace scope and column name to delete.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","columnName":"legacyStatus"}]},"Tables_V2ApiTableRow":{"type":"object","properties":{"id":{"type":"string","description":"Unique row identifier."},"data":{"description":"Row cells keyed by column name.","$ref":"#/components/schemas/Tables_V2TableRowData"},"runState":{"description":"Per-workflow-group run state keyed by group identifier. Present only when the read requested `includeRunState`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Tables_V2TableRowRunState"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the row was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the row was last modified."}},"required":["id","data","createdAt","updatedAt"],"additionalProperties":false,"title":"Table row","description":"A table row with user-defined cell values."},"Tables_V2TableRowData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"User-defined cell value interpreted by its column definition."},"description":"User-defined row cells keyed by column name.","title":"Table row data","examples":[{"email":"jane@example.com","name":"Jane Doe","age":30}]},"Tables_V2TableRowRunState":{"type":"object","properties":{"status":{"type":"string","description":"Lifecycle state of the most recent run for this cell: `pending`, `queued`, `running`, `completed`, `error`, or `canceled`."},"executionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow execution identifier, or null before a worker claimed the cell."},"workflowId":{"type":"string","description":"Workflow the group runs for this cell."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure reason, or null when the run did not fail."},"runningBlockIds":{"type":"array","items":{"type":"string"},"description":"Block identifiers currently mid-execution."},"blockErrors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Per-block failure messages keyed by block identifier."},"canceledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the cell was canceled, or null."}},"required":["status","executionId","workflowId","error","runningBlockIds","blockErrors","canceledAt"],"additionalProperties":false,"title":"Table row run state","description":"Run outcome for one workflow group on one row."},"Tables_V2TableRowListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2ApiTableRow"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Table row list response","description":"A cursor-paginated page of table rows."},"Tables_V2CreateSingleTableRowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTableRow"}},"required":["data"],"additionalProperties":false,"title":"Create single table row response","description":"Response returned after inserting one table row."},"Tables_V2CreateBatchTableRowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2BatchInsertRowsData"}},"required":["data"],"additionalProperties":false,"title":"Create batch table rows response","description":"Response returned after inserting a batch of table rows."},"Tables_V2BatchInsertRowsData":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2ApiTableRow"},"description":"Inserted table rows."},"insertedCount":{"type":"number","description":"Number of inserted rows."}},"required":["rows","insertedCount"],"additionalProperties":false,"title":"Batch insert rows data","description":"Rows created by a batch insert."},"Tables_V2CreateTableRowsResponse":{"anyOf":[{"$ref":"#/components/schemas/Tables_V2CreateSingleTableRowResponse"},{"$ref":"#/components/schemas/Tables_V2CreateBatchTableRowsResponse"}],"title":"Create table rows response","description":"The inserted single row or inserted batch result."},"Tables_CreateTableRowsRequest":{"anyOf":[{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableRowData"},"description":"Rows to insert, with cells keyed by column name."}},"required":["workspaceId","rows"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"data":{"description":"Row cells keyed by column name.","$ref":"#/components/schemas/Tables_V2TableRowData"},"afterRowId":{"description":"Row after which to insert the new row.","type":"string","minLength":1},"beforeRowId":{"description":"Row before which to insert the new row.","type":"string","minLength":1}},"required":["workspaceId","data"],"additionalProperties":false}],"title":"Create table rows request","description":"A single row or bounded row batch keyed by column name.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","data":{"email":"jane@example.com","status":"active"}}]},"Tables_V2UpdateRowsData":{"type":"object","properties":{"updatedCount":{"type":"number","description":"Number of updated rows."},"updatedRowIds":{"type":"array","items":{"type":"string"},"description":"Identifiers of updated rows."}},"required":["updatedCount","updatedRowIds"],"additionalProperties":false,"title":"Update rows data","description":"Result of a bulk row update."},"Tables_V2UpdateTableRowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2UpdateRowsData"}},"required":["data"],"additionalProperties":false,"title":"Update table rows response","description":"Updated row count and identifiers."},"Tables_TablePredicateInput":{"title":"Table predicate input","description":"One condition or a recursive `all`/`any` group, normalized to a grouped predicate. Limits: 100 members per group, 10 levels, and 500 nodes. The negating operators include nulls and absent cells, multi-select included; combine with `isNotNull` or `isNotEmpty` to exclude them. Pattern operators use `*` as the only wildcard; `%`, `_`, and backslash are literal. Select operators: single-select uses `eq`/`ne`/`in`/`nin`; multi-select uses `contains`/`ncontains`; option names resolve to IDs. Full operand rules are documented on `op`.","oneOf":[{"type":"object","description":"Matches a row when every member matches.","properties":{"all":{"type":"array","minItems":1,"maxItems":100,"description":"Members combined with AND. An empty group is rejected, because it would compile to no filter at all.","items":{"description":"A nested group, or a single condition.","anyOf":[{"$ref":"#/components/schemas/Tables_TablePredicateInput"},{"type":"object","title":"Predicate condition","description":"One column comparison.","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to compare, or one of the system fields `id`, `createdAt`, `updatedAt`."},"op":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","in","nin","contains","ncontains","startsWith","endsWith","like","ilike","nlike","nilike","isEmpty","isNotEmpty","isNull","isNotNull"],"description":"Operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`; `in`/`nin` take arrays; `isEmpty`, `isNotEmpty`, `isNull`, and `isNotNull` take no operand. Text operators are `contains`, `ncontains`, `startsWith`, `endsWith`, `like`, `nlike`, `ilike`, and `nilike`. Contains variants are case-insensitive and literal; `like`/`nlike` are case-sensitive, while `ilike`/`nilike` are case-insensitive. `*` is the only wildcard; `%`, `_`, and backslash are literal. For `select` columns, single-select accepts `eq`, `ne`, `in`, `nin`; multi-select accepts `contains`, `ncontains`. Option names resolve to IDs."},"value":{"description":"Operand. A scalar for the comparison operators, an array of at most 1000 entries for `in`/`nin`, a pattern for the matching operators, and omitted for `isEmpty`/`isNotEmpty`/`isNull`/`isNotNull`."}},"required":["field","op"],"additionalProperties":false}]}}},"required":["all"],"additionalProperties":false},{"type":"object","description":"Matches a row when at least one member matches.","properties":{"any":{"type":"array","minItems":1,"maxItems":100,"description":"Members combined with OR. An empty group is rejected, because it would compile to no filter at all.","items":{"description":"A nested group, or a single condition.","anyOf":[{"$ref":"#/components/schemas/Tables_TablePredicateInput"},{"type":"object","title":"Predicate condition","description":"One column comparison.","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to compare, or one of the system fields `id`, `createdAt`, `updatedAt`."},"op":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","in","nin","contains","ncontains","startsWith","endsWith","like","ilike","nlike","nilike","isEmpty","isNotEmpty","isNull","isNotNull"],"description":"Operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`; `in`/`nin` take arrays; `isEmpty`, `isNotEmpty`, `isNull`, and `isNotNull` take no operand. Text operators are `contains`, `ncontains`, `startsWith`, `endsWith`, `like`, `nlike`, `ilike`, and `nilike`. Contains variants are case-insensitive and literal; `like`/`nlike` are case-sensitive, while `ilike`/`nilike` are case-insensitive. `*` is the only wildcard; `%`, `_`, and backslash are literal. For `select` columns, single-select accepts `eq`, `ne`, `in`, `nin`; multi-select accepts `contains`, `ncontains`. Option names resolve to IDs."},"value":{"description":"Operand. A scalar for the comparison operators, an array of at most 1000 entries for `in`/`nin`, a pattern for the matching operators, and omitted for `isEmpty`/`isNotEmpty`/`isNull`/`isNotNull`."}},"required":["field","op"],"additionalProperties":false}]}}},"required":["any"],"additionalProperties":false},{"type":"object","title":"Predicate condition","description":"One column comparison.","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to compare, or one of the system fields `id`, `createdAt`, `updatedAt`."},"op":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","in","nin","contains","ncontains","startsWith","endsWith","like","ilike","nlike","nilike","isEmpty","isNotEmpty","isNull","isNotNull"],"description":"Operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`; `in`/`nin` take arrays; `isEmpty`, `isNotEmpty`, `isNull`, and `isNotNull` take no operand. Text operators are `contains`, `ncontains`, `startsWith`, `endsWith`, `like`, `nlike`, `ilike`, and `nilike`. Contains variants are case-insensitive and literal; `like`/`nlike` are case-sensitive, while `ilike`/`nilike` are case-insensitive. `*` is the only wildcard; `%`, `_`, and backslash are literal. For `select` columns, single-select accepts `eq`, `ne`, `in`, `nin`; multi-select accepts `contains`, `ncontains`. Option names resolve to IDs."},"value":{"description":"Operand. A scalar for the comparison operators, an array of at most 1000 entries for `in`/`nin`, a pattern for the matching operators, and omitted for `isEmpty`/`isNotEmpty`/`isNull`/`isNotNull`."}},"required":["field","op"],"additionalProperties":false}]},"Tables_UpdateTableRowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"filter":{"$ref":"#/components/schemas/Tables_TablePredicateInput"},"data":{"description":"Row-data patch applied to every matching row.","$ref":"#/components/schemas/Tables_V2TableRowData"},"limit":{"description":"Maximum matching rows to update.","type":"integer","minimum":1,"maximum":1000}},"required":["workspaceId","filter","data"],"additionalProperties":false,"title":"Update table rows request","description":"Workspace scope, typed predicate, and row-data patch."},"Tables_V2DeleteRowsData":{"type":"object","properties":{"deletedCount":{"type":"number","description":"Number of deleted rows."},"deletedRowIds":{"type":"array","items":{"type":"string"},"description":"Identifiers of deleted rows."},"requestedCount":{"description":"Number of row identifiers requested.","type":"number"},"missingRowIds":{"description":"Requested row identifiers not found.","type":"array","items":{"type":"string"}}},"required":["deletedCount","deletedRowIds"],"additionalProperties":false,"title":"Delete rows data","description":"Result of a bulk row deletion."},"Tables_V2DeleteTableRowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2DeleteRowsData"}},"required":["data"],"additionalProperties":false,"title":"Delete table rows response","description":"Deleted row counts, identifiers, and optional missing identifiers."},"Tables_DeleteTableRowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"filter":{"$ref":"#/components/schemas/Tables_TablePredicateInput"},"limit":{"description":"Maximum matching rows to delete.","type":"integer","minimum":1,"maximum":1000},"rowIds":{"description":"Explicit row identifiers to delete.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId"],"additionalProperties":false,"title":"Delete table rows request","description":"Workspace scope and exactly one of a predicate or row identifier list."},"Tables_V2TableRowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTableRow"}},"required":["data"],"additionalProperties":false,"title":"Table row response","description":"A single table row."},"Tables_UpdateTableRowRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"data":{"description":"Partial row-data patch keyed by column name.","$ref":"#/components/schemas/Tables_V2TableRowData"}},"required":["workspaceId","data"],"additionalProperties":false,"title":"Update table row request","description":"Workspace scope and row-data patch keyed by column name.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","data":{"status":"active"}}]},"Tables_V2DeleteRowData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted row."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the row was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete row data","description":"Row deletion acknowledgement."},"Tables_V2DeleteTableRowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2DeleteRowData"}},"required":["data"],"additionalProperties":false,"title":"Delete table row response","description":"Row deletion acknowledgement."},"Tables_V2UpsertRowData":{"type":"object","properties":{"row":{"description":"The inserted or updated table row.","$ref":"#/components/schemas/Tables_V2ApiTableRow"},"operation":{"type":"string","enum":["insert","update"],"description":"Whether the row was inserted or updated."}},"required":["row","operation"],"additionalProperties":false,"title":"Upsert row data","description":"Row returned by an upsert and the operation performed."},"Tables_V2UpsertTableRowResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2UpsertRowData"}},"required":["data"],"additionalProperties":false,"title":"Upsert table row response","description":"The resulting row and whether it was inserted or updated."},"Tables_UpsertTableRowRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"data":{"description":"Complete set of row cells keyed by column name. On the update branch this REPLACES the matched row: any column not present here is cleared, unlike a single-row update, which merges.","$ref":"#/components/schemas/Tables_V2TableRowData"},"conflictTarget":{"description":"Unique column used to detect a conflict.","type":"string","minLength":1}},"required":["workspaceId","data"],"additionalProperties":false,"title":"Upsert table row request","description":"Workspace scope, row data, and optional unique-column conflict target.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","data":{"email":"jane@example.com","status":"active"},"conflictTarget":"email"}]},"Tables_V2QueryTableRowsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2ApiTableRow"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Query table rows response","description":"A cursor-paginated page of matching table rows."},"Tables_QueryTableRowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"predicate":{"$ref":"#/components/schemas/Tables_TablePredicateInput"},"sort":{"description":"Ordered table-row sort specification.","maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["field","direction"],"additionalProperties":false}},"limit":{"description":"Maximum rows per page. `0` requests all matches, subject to a 5 MiB row-data ceiling; larger results return `400` with `TABLE_QUERY_RESULT_TOO_LARGE`. Use paged queries or an export for larger results.","type":"integer","minimum":0,"maximum":1000},"cursor":{"description":"Opaque cursor returned by the previous query page.","type":"string","minLength":1},"includeRunState":{"default":false,"description":"Include per-workflow-group run outcomes on every row. Off by default. Incompatible with `limit: 0`; caps `limit` at 200. Run state above 2 MiB returns `413`; request fewer rows or omit run state.","type":"boolean"}},"required":["workspaceId"],"additionalProperties":false,"title":"Query table rows request","description":"Workspace scope, optional predicate and sort, and cursor pagination controls. The predicate may be one condition or an `all`/`any` group; omitting it matches every row."},"Tables_V2QueryRowsCountData":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of rows matching the predicate across the entire table."}},"required":["totalCount"],"additionalProperties":false,"title":"Query rows count data","description":"Total number of table rows matching a predicate."},"Tables_V2CountTableRowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2QueryRowsCountData"}},"required":["data"],"additionalProperties":false,"title":"Count table rows response","description":"The total number of table rows matching the predicate."},"Tables_CountTableRowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"predicate":{"$ref":"#/components/schemas/Tables_TablePredicateInput"}},"required":["workspaceId"],"additionalProperties":false,"title":"Count table rows request","description":"Workspace scope and the optional condition or `all`/`any` predicate group whose matches are counted."},"Tables_V2ApiTableView":{"type":"object","properties":{"id":{"type":"string","description":"Unique saved-view identifier."},"tableId":{"type":"string","description":"Table to which the view belongs."},"name":{"type":"string","description":"Saved-view display name."},"config":{"description":"Saved filter, sort, and column-layout configuration.","$ref":"#/components/schemas/Tables_V2TableViewConfig"},"isDefault":{"type":"boolean","description":"Whether this is the table default view."},"createdByEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}],"description":"Current author email, or null when removed."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the view was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the view was last modified."}},"required":["id","tableId","name","config","isDefault","createdByEmail","createdAt","updatedAt"],"additionalProperties":false,"title":"Table view","description":"A named saved presentation of table rows and columns."},"Tables_V2TableViewConfig":{"type":"object","properties":{"columnWidths":{"description":"Column widths keyed by column name.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","exclusiveMinimum":0}},"columnOrder":{"description":"Column names in display order.","type":"array","items":{"type":"string"}},"pinnedColumns":{"description":"Names of pinned columns.","type":"array","items":{"type":"string"}},"hiddenColumns":{"description":"Names of hidden columns.","type":"array","items":{"type":"string"}},"filter":{"description":"Saved row predicate, or null when the view is unfiltered.","anyOf":[{"description":"Recursive saved predicate tree. Runtime validation uses the canonical predicate schema."},{"type":"null"}]},"sort":{"description":"Saved ordered sort specification, or null for default ordering.","anyOf":[{"maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["field","direction"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false,"title":"Table view configuration","description":"Saved filter, sort, and column-layout settings for a table view."},"Tables_V2TableViewListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2ApiTableView"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Table view list response","description":"A cursor envelope containing the saved views."},"Tables_V2CreateTableViewResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTableView"}},"required":["data"],"additionalProperties":false,"title":"Create table view response","description":"The created saved view."},"Tables_CreateTableViewRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"description":"Workspace that owns the table."},"name":{"type":"string","minLength":1,"description":"Saved-view display name."},"config":{"type":"object","properties":{"columnWidths":{"description":"Column widths keyed by column name or stable column identifier.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","exclusiveMinimum":0}},"columnOrder":{"description":"Columns in display order, by name or stable identifier.","type":"array","items":{"type":"string"}},"pinnedColumns":{"description":"Pinned columns, by name or stable identifier.","type":"array","items":{"type":"string"}},"hiddenColumns":{"description":"Hidden columns, by name or stable identifier.","type":"array","items":{"type":"string"}},"filter":{"description":"Saved row predicate, or null when the view is unfiltered.","anyOf":[{"$ref":"#/components/schemas/Tables_TablePredicateInput"},{"type":"null"}]},"sort":{"description":"Saved ordered sort specification, or null for default ordering.","anyOf":[{"maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["field","direction"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false,"description":"Saved filter, sort, and column-layout configuration."}},"required":["workspaceId","name","config"],"additionalProperties":false,"title":"Create table view request","description":"Workspace scope, name, and saved filter, sort, and layout configuration."},"Tables_V2TableViewResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTableView"}},"required":["data"],"additionalProperties":false,"title":"Table view response","description":"A single saved table view."},"Tables_UpdateTableViewRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"description":"Workspace that owns the table."},"name":{"description":"Replacement saved-view display name.","type":"string","minLength":1},"config":{"description":"Complete replacement saved-view configuration.","type":"object","properties":{"columnWidths":{"description":"Column widths keyed by column name or stable column identifier.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","exclusiveMinimum":0}},"columnOrder":{"description":"Columns in display order, by name or stable identifier.","type":"array","items":{"type":"string"}},"pinnedColumns":{"description":"Pinned columns, by name or stable identifier.","type":"array","items":{"type":"string"}},"hiddenColumns":{"description":"Hidden columns, by name or stable identifier.","type":"array","items":{"type":"string"}},"filter":{"description":"Saved row predicate, or null when the view is unfiltered.","anyOf":[{"$ref":"#/components/schemas/Tables_TablePredicateInput"},{"type":"null"}]},"sort":{"description":"Saved ordered sort specification, or null for default ordering.","anyOf":[{"maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["field","direction"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false},"configPatch":{"description":"Saved-view configuration fields to shallow-merge.","type":"object","properties":{"columnWidths":{"description":"Column widths keyed by column name or stable column identifier.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","exclusiveMinimum":0}},"columnOrder":{"description":"Columns in display order, by name or stable identifier.","type":"array","items":{"type":"string"}},"pinnedColumns":{"description":"Pinned columns, by name or stable identifier.","type":"array","items":{"type":"string"}},"hiddenColumns":{"description":"Hidden columns, by name or stable identifier.","type":"array","items":{"type":"string"}},"filter":{"description":"Saved row predicate, or null when the view is unfiltered.","anyOf":[{"$ref":"#/components/schemas/Tables_TablePredicateInput"},{"type":"null"}]},"sort":{"description":"Saved ordered sort specification, or null for default ordering.","anyOf":[{"maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["field","direction"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false},"isDefault":{"description":"Whether to promote this view to the table default.","type":"boolean"}},"required":["workspaceId"],"additionalProperties":false,"title":"Update table view request","description":"Workspace scope and one or more saved-view changes."},"Tables_V2DeleteTableViewData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted view."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the view was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete table view data","description":"Saved-view deletion acknowledgement."},"Tables_V2DeleteTableViewResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2DeleteTableViewData"}},"required":["data"],"additionalProperties":false,"title":"Delete table view response","description":"Saved-view deletion acknowledgement."},"Tables_V2TableWorkflowGroup":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow-group identifier."},"workflowId":{"type":"string","description":"Backing workflow identifier for a manual group."},"enrichmentId":{"description":"Registry enrichment identifier.","type":"string"},"name":{"description":"Workflow-group display name.","type":"string"},"type":{"description":"Producer type.","type":"string","enum":["manual","enrichment"]},"dependencies":{"description":"Input column dependencies.","type":"object","properties":{"columns":{"description":"Columns required as producer inputs.","type":"array","items":{"type":"string"}}},"additionalProperties":false},"outputs":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"Workflow block producing this output."},"path":{"type":"string","description":"Path to the value in the workflow block output."},"outputId":{"description":"Registry enrichment output identifier.","type":"string"},"columnName":{"type":"string","description":"Name of the table column receiving the output."}},"required":["blockId","path","columnName"],"additionalProperties":false},"description":"Workflow outputs mapped to table columns."},"inputMappings":{"description":"Workflow inputs mapped from table columns.","type":"array","items":{"type":"object","properties":{"inputName":{"type":"string","description":"Workflow input name."},"columnName":{"type":"string","description":"Name of the source table column."}},"required":["inputName","columnName"],"additionalProperties":false}},"deploymentMode":{"type":"string","enum":["live","deployed"],"description":"Which workflow state per-cell runs execute against. `deployed` (the default when a group was created without one) runs the latest active deployment and refuses to run while the workflow is undeployed; `live` runs the editable draft."},"autoRun":{"description":"Whether the group automatically runs for new rows.","type":"boolean"}},"required":["id","workflowId","outputs","deploymentMode"],"additionalProperties":false,"title":"Table workflow group","description":"A workflow or enrichment producer and the columns it populates."},"Tables_V2TableWorkflowGroupListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableWorkflowGroup"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Table workflow group list response","description":"A cursor envelope containing the table workflow groups."},"Tables_V2WorkflowGroupData":{"type":"object","properties":{"group":{"description":"The created or updated workflow group.","$ref":"#/components/schemas/Tables_V2TableWorkflowGroup"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable server-assigned column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name used as the public row-data key."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Data type of values stored in the column."},"required":{"default":false,"description":"Whether inserts require a value for this column.","type":"boolean"},"unique":{"default":false,"description":"Whether values must be unique across table rows.","type":"boolean"},"workflowGroupId":{"description":"Workflow group whose output populates this column.","type":"string"},"options":{"description":"Options declared for a select column.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"],"additionalProperties":false}},"multiple":{"description":"Whether a select column accepts multiple options.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for a currency column, normalized to uppercase.","type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","type","required","unique"],"additionalProperties":false,"description":"A typed column in a table schema."},"description":"Current table columns after the mutation."}},"required":["group","columns"],"additionalProperties":false,"title":"Workflow group data","description":"A workflow group and the resulting table columns."},"Tables_V2AddTableWorkflowGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2WorkflowGroupData"}},"required":["data"],"additionalProperties":false,"title":"Add table workflow group response","description":"The workflow group and complete resulting table columns."},"Tables_AddTableWorkflowGroupRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"group":{"type":"object","properties":{"id":{"description":"Optional client-provided workflow-group identifier.","type":"string","minLength":1},"workflowId":{"description":"Backing workflow identifier. Required when `type` is `manual` (which is also the default when `type` is omitted); omit it for an `enrichment` group.","type":"string","minLength":1},"enrichmentId":{"description":"Registry enrichment identifier.","type":"string","minLength":1},"name":{"description":"Workflow-group display name.","type":"string"},"type":{"description":"Workflow-group producer type.","type":"string","enum":["manual","enrichment"]},"dependencies":{"description":"Producer input dependencies.","type":"object","properties":{"columns":{"description":"Columns required as producer inputs.","type":"array","items":{"type":"string"}}}},"outputs":{"minItems":1,"type":"array","items":{"type":"object","properties":{"blockId":{"default":"","description":"Workflow block producing this output.","type":"string"},"path":{"default":"","description":"Path to the value in the workflow block output.","type":"string"},"outputId":{"description":"Registry enrichment output identifier.","type":"string"},"columnName":{"type":"string","minLength":1,"description":"Table column receiving the output."}},"required":["columnName"]},"description":"Producer outputs mapped to columns."},"inputMappings":{"description":"Workflow inputs mapped from table columns.","type":"array","items":{"type":"object","properties":{"inputName":{"type":"string","minLength":1,"description":"Workflow input name."},"columnName":{"type":"string","minLength":1,"description":"Source table column name."}},"required":["inputName","columnName"]}},"deploymentMode":{"description":"Workflow state used for cell runs.","type":"string","enum":["live","deployed"]},"autoRun":{"description":"Whether this group automatically runs for new rows.","type":"boolean"}},"required":["outputs"],"description":"Workflow or enrichment producer definition."},"outputColumns":{"default":[],"description":"Columns to create for producer outputs. An entry naming a column the table already has attaches that column to the group instead of creating it (its `type` must match), and an output whose column already exists may omit its entry entirely — so `[]` attaches existing columns only.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Output column name."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Output column data type."},"required":{"description":"Whether the output column is required.","type":"boolean"},"unique":{"description":"Whether the output column must be unique.","type":"boolean"}},"required":["name","type"],"additionalProperties":false}},"autoRun":{"default":false,"description":"Whether to schedule existing rows after group creation.","type":"boolean"}},"required":["workspaceId","group"],"additionalProperties":false,"title":"Add table workflow group request","description":"Workspace scope, producer definition, and output columns.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","group":{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","name":"Enrich company","outputs":[{"blockId":"block_lookup","path":"output.revenue","columnName":"revenue"}]},"outputColumns":[{"name":"revenue","type":"number"}]}]},"Tables_V2UpdateTableWorkflowGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2WorkflowGroupData"}},"required":["data"],"additionalProperties":false,"title":"Update table workflow group response","description":"The workflow group and complete resulting table columns."},"Tables_UpdateTableWorkflowGroupRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"groupId":{"type":"string","minLength":1,"description":"Workflow group to update."},"workflowId":{"description":"Replacement backing workflow identifier.","type":"string","minLength":1},"name":{"description":"Replacement workflow-group display name.","type":"string"},"dependencies":{"description":"Replacement input dependencies.","type":"object","properties":{"columns":{"description":"Columns required as producer inputs.","type":"array","items":{"type":"string"}}}},"outputs":{"description":"Replacement producer outputs.","type":"array","items":{"type":"object","properties":{"blockId":{"default":"","description":"Workflow block producing this output.","type":"string"},"path":{"default":"","description":"Path to the value in the workflow block output.","type":"string"},"outputId":{"description":"Registry enrichment output identifier.","type":"string"},"columnName":{"type":"string","minLength":1,"description":"Table column receiving the output."}},"required":["columnName"]}},"newOutputColumns":{"description":"Columns to add for new outputs.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Output column name."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Output column data type."},"required":{"description":"Whether the output column is required.","type":"boolean"},"unique":{"description":"Whether the output column must be unique.","type":"boolean"}},"required":["name","type"],"additionalProperties":false}},"mappingUpdates":{"description":"Existing output-column mapping changes.","type":"array","items":{"type":"object","properties":{"columnName":{"type":"string","minLength":1,"description":"Existing output column to remap."},"blockId":{"type":"string","minLength":1,"description":"New workflow block producing the value."},"path":{"type":"string","minLength":1,"description":"New path to the workflow output value."}},"required":["columnName","blockId","path"]}},"inputMappings":{"description":"Replacement workflow input mappings.","type":"array","items":{"type":"object","properties":{"inputName":{"type":"string","minLength":1,"description":"Workflow input name."},"columnName":{"type":"string","minLength":1,"description":"Source table column name."}},"required":["inputName","columnName"]}},"deploymentMode":{"description":"Replacement workflow execution mode.","type":"string","enum":["live","deployed"]},"type":{"description":"Workflow-group producer type. Must match the group's stored type — a group's producer cannot be changed after creation.","type":"string","enum":["manual","enrichment"]},"autoRun":{"description":"Replacement automatic-run setting.","type":"boolean"}},"required":["workspaceId","groupId"],"additionalProperties":false,"title":"Update table workflow group request","description":"Workspace scope, workflow group identifier, and producer changes.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","groupId":"grp_5d8b2f0a6c1e4739a8b3d5f7e9c1a204","name":"Company profile enrichment"}]},"Tables_V2DeleteWorkflowGroupData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted workflow group."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the workflow group was deleted."},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable server-assigned column identifier.","type":"string"},"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Column name used as the public row-data key."},"type":{"type":"string","enum":["string","number","currency","boolean","date","json","select"],"description":"Data type of values stored in the column."},"required":{"default":false,"description":"Whether inserts require a value for this column.","type":"boolean"},"unique":{"default":false,"description":"Whether values must be unique across table rows.","type":"boolean"},"workflowGroupId":{"description":"Workflow group whose output populates this column.","type":"string"},"options":{"description":"Options declared for a select column.","maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable select-option identifier."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the select option."}},"required":["id","name"],"additionalProperties":false}},"multiple":{"description":"Whether a select column accepts multiple options.","type":"boolean"},"currencyCode":{"description":"ISO 4217 code for a currency column, normalized to uppercase.","type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","type","required","unique"],"additionalProperties":false,"description":"A typed column in a table schema."},"description":"Surviving table columns."}},"required":["id","deleted","columns"],"additionalProperties":false,"title":"Delete workflow group data","description":"Workflow-group deletion acknowledgement and surviving columns."},"Tables_V2DeleteTableWorkflowGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2DeleteWorkflowGroupData"}},"required":["data"],"additionalProperties":false,"title":"Delete table workflow group response","description":"Deletion acknowledgement and surviving table columns."},"Tables_DeleteTableWorkflowGroupRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"groupId":{"type":"string","minLength":1,"description":"Workflow group to delete."}},"required":["workspaceId","groupId"],"additionalProperties":false,"title":"Delete table workflow group request","description":"Workspace scope and workflow group identifier.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","groupId":"grp_5d8b2f0a6c1e4739a8b3d5f7e9c1a204"}]},"Tables_V2RunColumnData":{"type":"object","properties":{"dispatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run dispatch ID, or null when no dispatch is available to poll. Use row reads with `includeRunState` to check cell outcomes."}},"required":["dispatchId"],"additionalProperties":false,"title":"Run column data","description":"Acknowledgement for a table column run."},"Tables_V2CreateTableDispatchResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2RunColumnData"}},"required":["data"],"additionalProperties":false,"title":"Create table dispatch response","description":"Accepted background dispatch identifier."},"Tables_CreateTableDispatchRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"groupIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"Workflow or enrichment groups to run."},"runMode":{"default":"all","description":"Whether to run all or only incomplete cells.","type":"string","enum":["all","incomplete"]},"rowIds":{"description":"Explicit row subset to run.","minItems":1,"maxItems":1000000,"type":"array","items":{"type":"string","minLength":1}},"filter":{"$ref":"#/components/schemas/Tables_TablePredicateInput"},"excludeRowIds":{"description":"Rows excluded from a select-all run scope.","maxItems":10000,"type":"array","items":{"type":"string","minLength":1}},"limit":{"description":"Optional cap on eligible rows to run.","type":"object","properties":{"type":{"type":"string","const":"rows","description":"Unit constrained by the run cap."},"max":{"type":"integer","minimum":1,"maximum":1000000,"description":"Maximum eligible rows to run."}},"required":["type","max"]}},"required":["workspaceId","groupIds"],"additionalProperties":false,"title":"Create table dispatch request","description":"Workspace scope, producer groups, execution mode, and optional row scope."},"Tables_V2RunRowEnrichmentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2RunColumnData"}},"required":["data"],"additionalProperties":false,"title":"Run row enrichment response","description":"Accepted background dispatch identifier."},"Tables_RunRowEnrichmentRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."}},"required":["workspaceId"],"additionalProperties":false,"title":"Run row enrichment request","description":"Workspace scope for the row enrichment.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}]},"Tables_V2TableRowMatch":{"type":"object","properties":{"ordinal":{"type":"number","description":"Zero-based row index in the filtered and sorted view."},"rowId":{"type":"string","description":"Identifier of the matching row."},"column":{"type":"string","description":"Column name containing the match."}},"required":["ordinal","rowId","column"],"additionalProperties":false,"title":"Table row match","description":"One matching cell returned by a table row search."},"Tables_V2SearchRowsData":{"type":"object","properties":{"matches":{"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableRowMatch"},"description":"Matching table cells, at most 1000."},"truncated":{"type":"boolean","description":"Whether more than 1000 cells matched, so the list was cut."}},"required":["matches","truncated"],"additionalProperties":false,"title":"Search rows data","description":"Matching table cells and truncation state."},"Tables_V2SearchTableRowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2SearchRowsData"}},"required":["data"],"additionalProperties":false,"title":"Search table rows response","description":"Matching table cells and truncation state."},"Tables_SearchTableRowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"q":{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive cell substring to find."},"predicate":{"$ref":"#/components/schemas/Tables_TablePredicateInput"},"sort":{"description":"Ordered table-row sort specification.","maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"description":"Column name to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["field","direction"],"additionalProperties":false}}},"required":["workspaceId","q"],"additionalProperties":false,"title":"Search table rows request","description":"Workspace scope, substring query, and optional predicate and sort."},"Tables_V2TableUploadImportSource":{"type":"object","properties":{"type":{"type":"string","const":"upload","description":"Upload-backed import discriminator."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"CSV filename."},"contentType":{"type":"string","minLength":1,"maxLength":255,"description":"CSV MIME type."},"size":{"type":"integer","minimum":1,"maximum":5368709120,"description":"Exact CSV file size in bytes."}},"required":["type","name","contentType","size"],"additionalProperties":false,"title":"Upload table import source","description":"CSV file uploaded through signed transfer instructions."},"Tables_V2TableImportRejectedSample":{"type":"object","properties":{"code":{"type":"string","description":"CSV parser error code, e.g. CSV_QUOTE_NOT_CLOSED."},"line":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"1-based source line the parser had reached when it gave up, or null."},"message":{"type":"string","description":"Parser message for the dropped record."}},"required":["code","line","message"],"additionalProperties":false,"title":"Rejected import record","description":"One source record a table import could not read."},"Tables_V2UploadBackedTableImport":{"type":"object","properties":{"id":{"type":"string","description":"Unique table-import identifier."},"workspaceId":{"type":"string","description":"Workspace that owns the import."},"status":{"type":"string","enum":["uploading","processing","completed","failed","canceled","expired"],"description":"Current import lifecycle state."},"source":{"description":"Uploaded CSV source for this import.","$ref":"#/components/schemas/Tables_V2TableUploadImportSource"},"target":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"new","description":"Create-new-table target discriminator."},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Name of the table to create."},"folderPath":{"$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"existing","description":"Existing-table target discriminator."},"tableId":{"type":"string","minLength":1,"description":"Existing target table identifier."},"mode":{"type":"string","enum":["append","replace"],"description":"Whether to append rows or replace existing rows."}},"required":["type","tableId","mode"],"additionalProperties":false}],"description":"New or existing table import target."},"tableId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resulting or target table identifier."},"rowsProcessed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows processed so far."},"rowsRejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum number of source records dropped by parser failures. One failure can discard multiple records, such as an unterminated quote consuming the rest of the file. A non-zero value means partial import even with `completed` status; zero does not guarantee no loss."},"cellsRejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-empty cell values the target column type could not represent. Their rows were imported with the cell left blank."},"rejectedSamples":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableImportRejectedSample"},"description":"Bounded sample of the dropped records, for locating them in the source file."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Terminal failure reason, or null."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 creation timestamp."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 last-update timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 completion timestamp, or null."}},"required":["id","workspaceId","status","source","target","tableId","rowsProcessed","rowsRejected","cellsRejected","rejectedSamples","error","createdAt","updatedAt","completedAt"],"additionalProperties":false,"title":"Upload-backed table import","description":"Table import whose CSV source is uploaded through signed transfer instructions."},"Tables_V2PutUploadTransfer":{"type":"object","properties":{"method":{"type":"string","const":"put","description":"Upload strategy discriminator."},"url":{"type":"string","format":"uri","description":"Signed URL to which the file bytes are uploaded. Upload bytes with `PUT` and exactly the supplied headers; never construct or modify the signed URL. Treat any `2xx` as success. Sim-hosted URLs return an empty `204` and v2 JSON errors. Object-storage URLs may return `200` or `201` and provider-specific errors, often XML."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Headers that must be included with the upload request."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 expiration time for this signed URL. This is the URL's own expiry and is normally earlier than the upload session's expiresAt: the session stays open for later part, status, completion, and abort requests, but the bytes must be uploaded before this time. Once it passes, the storage provider rejects the upload and a new upload session must be created."}},"required":["method","url","headers","expiresAt"],"additionalProperties":false,"title":"Direct upload transfer","description":"Instructions for uploading bytes to one signed URL."},"Tables_V2MultipartUploadTransfer":{"type":"object","properties":{"method":{"type":"string","const":"multipart","description":"Upload strategy discriminator."},"partSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Required size of each non-final part in bytes."},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":640,"description":"Total number of upload parts."}},"required":["method","partSize","partCount"],"additionalProperties":false,"title":"Multipart upload transfer","description":"Instructions for splitting bytes into a multipart upload."},"Tables_V2TableWorkspaceFileImportSource":{"type":"object","properties":{"type":{"type":"string","const":"workspace_file","description":"Workspace-file source discriminator."},"fileId":{"type":"string","minLength":1,"description":"Existing workspace file identifier."}},"required":["type","fileId"],"additionalProperties":false,"title":"Workspace file table import source","description":"Existing workspace file used as a CSV import source."},"Tables_V2WorkspaceFileTableImport":{"type":"object","properties":{"id":{"type":"string","description":"Unique table-import identifier."},"workspaceId":{"type":"string","description":"Workspace that owns the import."},"status":{"type":"string","enum":["uploading","processing","completed","failed","canceled","expired"],"description":"Current import lifecycle state."},"source":{"description":"Workspace-file CSV source for this import.","$ref":"#/components/schemas/Tables_V2TableWorkspaceFileImportSource"},"target":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"new","description":"Create-new-table target discriminator."},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Name of the table to create."},"folderPath":{"$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"existing","description":"Existing-table target discriminator."},"tableId":{"type":"string","minLength":1,"description":"Existing target table identifier."},"mode":{"type":"string","enum":["append","replace"],"description":"Whether to append rows or replace existing rows."}},"required":["type","tableId","mode"],"additionalProperties":false}],"description":"New or existing table import target."},"tableId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resulting or target table identifier."},"rowsProcessed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows processed so far."},"rowsRejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum number of source records dropped by parser failures. One failure can discard multiple records, such as an unterminated quote consuming the rest of the file. A non-zero value means partial import even with `completed` status; zero does not guarantee no loss."},"cellsRejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-empty cell values the target column type could not represent. Their rows were imported with the cell left blank."},"rejectedSamples":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableImportRejectedSample"},"description":"Bounded sample of the dropped records, for locating them in the source file."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Terminal failure reason, or null."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 creation timestamp."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 last-update timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 completion timestamp, or null."}},"required":["id","workspaceId","status","source","target","tableId","rowsProcessed","rowsRejected","cellsRejected","rejectedSamples","error","createdAt","updatedAt","completedAt"],"additionalProperties":false,"title":"Workspace-file table import","description":"Table import whose CSV source is an existing workspace file."},"Tables_V2CreateTableImportData":{"anyOf":[{"type":"object","properties":{"session":{"description":"Created upload-backed import session.","$ref":"#/components/schemas/Tables_V2UploadBackedTableImport"},"uploadToken":{"type":"string","minLength":1,"description":"Signed token for upload control requests."},"transfer":{"oneOf":[{"$ref":"#/components/schemas/Tables_V2PutUploadTransfer"},{"$ref":"#/components/schemas/Tables_V2MultipartUploadTransfer"}],"description":"Signed CSV upload instructions."}},"required":["session","uploadToken","transfer"],"additionalProperties":false},{"type":"object","properties":{"session":{"description":"Created workspace-file import session.","$ref":"#/components/schemas/Tables_V2WorkspaceFileTableImport"},"uploadToken":{"type":"null","description":"Always null; a workspace-file import has no upload to authorize."},"transfer":{"type":"null","description":"Always null; a workspace-file import has no bytes to transfer."}},"required":["session","uploadToken","transfer"],"additionalProperties":false}],"title":"Create table import data","description":"Created import session and upload instructions when the source needs transfer."},"Tables_V2CreateTableImportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2CreateTableImportData"}},"required":["data"],"additionalProperties":false,"title":"Create table import response","description":"The import session and upload instructions when transfer is required."},"Tables_CreateTableImportRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"source":{"oneOf":[{"$ref":"#/components/schemas/Tables_V2TableUploadImportSource"},{"$ref":"#/components/schemas/Tables_V2TableWorkspaceFileImportSource"}],"description":"CSV source for the import."},"target":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"new","description":"Create-new-table target discriminator."},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Name of the table to create."},"folderPath":{"$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"existing","description":"Existing-table target discriminator."},"tableId":{"type":"string","minLength":1,"description":"Existing target table identifier."},"mode":{"type":"string","enum":["append","replace"],"description":"Whether to append rows or replace existing rows."}},"required":["type","tableId","mode"],"additionalProperties":false}],"description":"New or existing table import target."},"mapping":{"description":"CSV headers mapped to existing table columns.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":50},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":50},{"type":"null"}]}},"createColumns":{"description":"CSV headers for which new columns should be created.","maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":50}},"timezone":{"description":"IANA timezone used to interpret local date values.","type":"string"}},"required":["workspaceId","source","target"],"additionalProperties":false,"title":"Create table import request","description":"Workspace, CSV source, target table, optional mapping, and timezone."},"Tables_V2TableImport":{"type":"object","properties":{"id":{"type":"string","description":"Unique table-import identifier."},"workspaceId":{"type":"string","description":"Workspace that owns the import."},"status":{"type":"string","enum":["uploading","processing","completed","failed","canceled","expired"],"description":"Current import lifecycle state."},"source":{"oneOf":[{"$ref":"#/components/schemas/Tables_V2TableUploadImportSource"},{"$ref":"#/components/schemas/Tables_V2TableWorkspaceFileImportSource"}],"description":"CSV source for the import."},"target":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"new","description":"Create-new-table target discriminator."},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Name of the table to create."},"folderPath":{"$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"existing","description":"Existing-table target discriminator."},"tableId":{"type":"string","minLength":1,"description":"Existing target table identifier."},"mode":{"type":"string","enum":["append","replace"],"description":"Whether to append rows or replace existing rows."}},"required":["type","tableId","mode"],"additionalProperties":false}],"description":"New or existing table import target."},"tableId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resulting or target table identifier."},"rowsProcessed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows processed so far."},"rowsRejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum number of source records dropped by parser failures. One failure can discard multiple records, such as an unterminated quote consuming the rest of the file. A non-zero value means partial import even with `completed` status; zero does not guarantee no loss."},"cellsRejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-empty cell values the target column type could not represent. Their rows were imported with the cell left blank."},"rejectedSamples":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableImportRejectedSample"},"description":"Bounded sample of the dropped records, for locating them in the source file."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Terminal failure reason, or null."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 creation timestamp."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 last-update timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 completion timestamp, or null."}},"required":["id","workspaceId","status","source","target","tableId","rowsProcessed","rowsRejected","cellsRejected","rejectedSamples","error","createdAt","updatedAt","completedAt"],"additionalProperties":false,"title":"Table import","description":"Durable CSV table-import lifecycle resource."},"Tables_V2TableImportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableImport"}},"required":["data"],"additionalProperties":false,"title":"Table import response","description":"A durable table-import lifecycle resource."},"Tables_V2CancelTableImportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableImport"}},"required":["data"],"additionalProperties":false,"title":"Cancel table import response","description":"The canceled table-import lifecycle resource."},"Tables_V2UploadPartUrl":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Multipart part number."},"url":{"type":"string","format":"uri","description":"Signed URL for this upload part. Upload bytes with `PUT` and exactly the supplied headers; never construct or modify the signed URL. Treat any `2xx` as success. Sim-hosted URLs return an empty `204` and v2 JSON errors. Object-storage URLs may return `200` or `201` and provider-specific errors, often XML. Do not retain part `ETag` values; after every part succeeds, call the completion endpoint without a request body."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Headers that must be included with the part upload."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 expiration time for the signed URL."}},"required":["partNumber","url","headers","expiresAt"],"additionalProperties":false,"title":"Upload part URL","description":"A signed URL and required headers for one multipart upload part."},"Tables_V2PartUrlsData":{"type":"object","properties":{"parts":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Tables_V2UploadPartUrl"},"description":"Signed URLs for requested parts."}},"required":["parts"],"additionalProperties":false,"title":"Upload part URLs","description":"Signed transfer URLs for the requested multipart upload parts."},"Tables_V2CreateTableImportPartUrlsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2PartUrlsData"}},"required":["data"],"additionalProperties":false,"title":"Create table import part URLs response","description":"Signed URLs and required headers for each requested upload part."},"Tables_CreateTableImportPartUrlsRequest":{"type":"object","properties":{"partNumbers":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991},"description":"Multipart part numbers for which signed URLs should be created."}},"required":["partNumbers"],"additionalProperties":false,"title":"Create table import part URLs request","description":"Multipart part numbers for which signed URLs should be created.","examples":[{"partNumbers":[1,2,3]}]},"Tables_V2CompleteTableImportUploadResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableImport"}},"required":["data"],"additionalProperties":false,"title":"Complete table import upload response","description":"The import lifecycle resource after processing is queued."},"Tables_V2TableExport":{"type":"object","properties":{"id":{"type":"string","description":"Unique table-export identifier."},"tableId":{"type":"string","description":"Exported table identifier."},"workspaceId":{"type":"string","description":"Workspace that owns the export."},"format":{"type":"string","enum":["csv","json"],"description":"Export file format."},"status":{"type":"string","enum":["queued","processing","completed","failed","canceled"],"description":"Current export lifecycle state."},"rowsProcessed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows exported so far."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Terminal failure reason, or null."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 creation timestamp."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 last-update timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 completion timestamp, or null."}},"required":["id","tableId","workspaceId","format","status","rowsProcessed","error","createdAt","updatedAt","completedAt"],"additionalProperties":false,"title":"Table export","description":"Durable asynchronous table-export lifecycle resource."},"Tables_V2CreateTableExportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableExport"}},"required":["data"],"additionalProperties":false,"title":"Create table export response","description":"The created durable table-export lifecycle resource."},"Tables_CreateTableExportRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"format":{"default":"csv","description":"Export file format.","type":"string","enum":["csv","json"]}},"required":["workspaceId"],"additionalProperties":false,"title":"Create table export request","description":"Workspace scope and export format.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","format":"csv"}]},"Tables_V2TableExportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableExport"}},"required":["data"],"additionalProperties":false,"title":"Table export response","description":"A durable table-export lifecycle resource."},"Tables_V2CancelTableExportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableExport"}},"required":["data"],"additionalProperties":false,"title":"Cancel table export response","description":"The canceled durable table-export lifecycle resource."},"Tables_V2TableExportDownloadData":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Short-lived signed download URL."},"fileName":{"type":"string","description":"Suggested export filename."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 URL expiration timestamp."}},"required":["url","fileName","expiresAt"],"additionalProperties":false,"title":"Table export download data","description":"Signed URL and filename for a completed table export."},"Tables_V2DownloadTableExportResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableExportDownloadData"}},"required":["data"],"additionalProperties":false,"title":"Download table export response","description":"Short-lived signed URL, filename, and expiration timestamp."},"Tables_V2CancelTableRunsData":{"type":"object","properties":{"cancelled":{"type":"number","description":"Number of cell runs canceled."}},"required":["cancelled"],"additionalProperties":false,"title":"Cancel table runs data","description":"Result of canceling in-flight table cell runs."},"Tables_V2CancelTableRunsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2CancelTableRunsData"}},"required":["data"],"additionalProperties":false,"title":"Cancel table runs response","description":"Count of canceled table cell runs."},"Tables_CancelTableRunsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"scope":{"type":"string","enum":["all","row"],"description":"Whether to cancel across the table or one row."},"rowId":{"description":"Row whose runs should be canceled for row scope.","type":"string","minLength":1},"filter":{"$ref":"#/components/schemas/Tables_TablePredicateInput"},"excludeRowIds":{"description":"Rows excluded from an all-scope cancellation.","maxItems":10000,"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","scope"],"additionalProperties":false,"title":"Cancel table runs request","description":"Workspace scope, row or all-table cancellation, and optional row predicate or exclusions."},"Tables_V2Folder":{"type":"object","properties":{"name":{"type":"string","description":"Folder name."},"path":{"type":"string","title":"Non-root folder path","description":"Canonical folder path used as the public folder identifier.","maxLength":4096},"parentPath":{"type":"string","title":"Folder path","description":"Canonical parent path; `/` is the root.","maxLength":4096},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the folder was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the folder was last updated.","format":"date-time"}},"required":["name","path","parentPath","createdAt","updatedAt"],"additionalProperties":false,"title":"Folder","description":"A canonical workspace folder."},"Tables_V2TableFolderListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2Folder"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Table folder list response","description":"A cursor envelope containing table folders."},"Tables_V2CreateTableFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2Folder"}},"required":["data"],"additionalProperties":false,"title":"Create table folder response","description":"The created table folder."},"Tables_NonRootFolderPathInput":{"title":"Non-root folder path input","description":"Non-root folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"Tables_CreateTableFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the folder."},"path":{"description":"Path of the folder to create.","$ref":"#/components/schemas/Tables_NonRootFolderPathInput"}},"required":["workspaceId","path"],"additionalProperties":false,"title":"Create table folder request","description":"Workspace scope and canonical folder path to create."},"Tables_V2RelocateTableFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2Folder"}},"required":["data"],"additionalProperties":false,"title":"Relocate table folder response","description":"The relocated table folder."},"Tables_RelocateTableFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."},"path":{"description":"Current folder path.","$ref":"#/components/schemas/Tables_NonRootFolderPathInput"},"destinationPath":{"description":"Where the folder lands, with `mv` semantics. A path naming an existing folder receives the source as a child under its current name; `/` moves it to the workspace root under its current name; any other path becomes the folder’s new full path (a rename, a relocation, or both).","$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["workspaceId","path","destinationPath"],"additionalProperties":false,"title":"Relocate table folder request","description":"Workspace scope, current canonical path, and destination path."},"Tables_V2DeleteTableFolderData":{"type":"object","properties":{"path":{"type":"string","title":"Folder path","description":"Canonical path of the deleted folder.","maxLength":4096},"deleted":{"type":"boolean","const":true,"description":"Confirms that the folder was deleted."},"deletedItems":{"type":"object","properties":{"folders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of deleted folders."},"tables":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of deleted tables."}},"required":["folders","tables"],"additionalProperties":false,"description":"Deleted resource counts."}},"required":["path","deleted","deletedItems"],"additionalProperties":false,"title":"Delete table folder data","description":"Folder deletion acknowledgement and deleted-resource counts."},"Tables_V2DeleteTableFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2DeleteTableFolderData"}},"required":["data"],"additionalProperties":false,"title":"Delete table folder response","description":"Folder deletion acknowledgement and deleted resource counts."},"Tables_V2TableFolderRestore":{"type":"object","properties":{"folder":{"description":"The restored folder, at the path it actually landed on — which is not always the path requested.","$ref":"#/components/schemas/Tables_V2Folder"},"restoredItems":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Folders restored, including the one addressed."},"tables":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Tables restored inside the folder tree."}},"required":["folders","tables"],"additionalProperties":false,"description":"What the restore brought back."}},"required":["folder","restoredItems"],"additionalProperties":false,"title":"Table folder restore result","description":"The restored folder and the counts of items it brought back."},"Tables_V2RestoreTableFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableFolderRestore"}},"required":["data"],"additionalProperties":false,"title":"Restore table folder response","description":"The restored table folder and the counts of items it brought back."},"Tables_RestoreTableFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the archived folder."},"path":{"description":"Path the folder held when a folder delete archived it.","$ref":"#/components/schemas/Tables_NonRootFolderPathInput"}},"required":["workspaceId","path"],"additionalProperties":false,"title":"Restore table folder request","description":"Workspace scope and the canonical path the archived folder held."},"Tables_V2RestoreTableResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2ApiTable"}},"required":["data"],"additionalProperties":false,"title":"Restore table response","description":"The restored table."},"Tables_RestoreTableRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."}},"required":["workspaceId"],"additionalProperties":false,"title":"Restore table request","description":"Workspace scope for the archived table.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}]},"Tables_V2BulkUpdateRowsData":{"type":"object","properties":{"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of rows the batch updated."},"updatedRowIds":{"type":"array","items":{"type":"string"},"description":"Identifiers of the rows the batch updated."}},"required":["updatedCount","updatedRowIds"],"additionalProperties":false,"title":"Bulk update rows data","description":"Rows affected by a heterogeneous bulk update."},"Tables_V2BulkUpdateTableRowsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2BulkUpdateRowsData"}},"required":["data"],"additionalProperties":false,"title":"Bulk update table rows response","description":"Updated row count and identifiers."},"Tables_BulkUpdateTableRowsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the table."},"updates":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"rowId":{"type":"string","minLength":1,"description":"Identifier of the row this patch applies to."},"data":{"description":"Cells to merge into this row, keyed by column name.","$ref":"#/components/schemas/Tables_V2TableRowData"}},"required":["rowId","data"],"additionalProperties":false},"description":"One merge patch per row. Each row identifier may appear at most once."}},"required":["workspaceId","updates"],"additionalProperties":false,"title":"Bulk update table rows request","description":"Workspace scope and one merge patch per row.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","updates":[{"rowId":"row_1f3e5d7c9b8a4c2d806e4a6b8d0f2e93","data":{"status":"active"}},{"rowId":"row_2b4d6f8a0c1e3759b8d0f2a4c6e80193","data":{"status":"churned"}}]}]},"Tables_V2EnrichmentRunDetail":{"type":"object","properties":{"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the cascade started, or null when not recorded."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the cascade finished, or null when not recorded."},"durationMs":{"type":"number","description":"Wall-clock milliseconds across the whole cascade; zero when not recorded."},"totalCost":{"type":"number","description":"Sum of per-provider hosted-key cost in USD; zero when not recorded."},"matchedProvider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider that produced the match, or null when none did."},"aborted":{"type":"boolean","description":"True when the run was canceled before it settled."},"providers":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2EnrichmentProviderOutcome"},"description":"Every configured provider, in cascade order, including those that never ran."}},"required":["startedAt","completedAt","durationMs","totalCost","matchedProvider","aborted","providers"],"additionalProperties":false,"title":"Enrichment run detail","description":"Provider cascade, cost, and timing for one enrichment cell."},"Tables_V2EnrichmentProviderOutcome":{"type":"object","properties":{"id":{"type":"string","description":"Provider identifier, e.g. `hunter`."},"label":{"type":"string","description":"Human-readable provider name."},"toolId":{"type":"string","description":"Sim tool identifier the provider ran."},"status":{"type":"string","description":"Provider outcome: `matched`, `no_match`, `skipped`, `error`, or `not_run`. Handle unrecognized values, since additional statuses may be returned."},"cost":{"type":"number","description":"Hosted-key cost in USD this provider incurred; zero when Sim did not bill it."},"durationMs":{"type":"number","description":"Wall-clock milliseconds this provider took; zero if skipped."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure reason when `status` is `error`, else null."}},"required":["id","label","toolId","status","cost","durationMs","error"],"additionalProperties":false,"title":"Enrichment provider outcome","description":"One provider's result within an enrichment cascade."},"Tables_V2RowGroupEnrichment":{"type":"object","properties":{"groupId":{"type":"string","description":"Workflow or enrichment group this answers for."},"runState":{"anyOf":[{"$ref":"#/components/schemas/Tables_V2TableRowRunState"},{"type":"null"}],"description":"Most recent run of this group on this row — the same shape `includeRunState` reports — or null when the group has never run for the row."},"outputs":{"description":"The group's output cells keyed by column name. A column the run has not populated is null.","$ref":"#/components/schemas/Tables_V2TableRowData"},"cascade":{"anyOf":[{"$ref":"#/components/schemas/Tables_V2EnrichmentRunDetail"},{"type":"null"}],"description":"Provider cascade behind the cell, or null when none was recorded — a manual workflow group, a group that has not run, or a run predating the breakdown."}},"required":["groupId","runState","outputs","cascade"],"additionalProperties":false,"title":"Row group enrichment","description":"Run state, output cells, and provider cascade for one group on one row."},"Tables_V2RowEnrichmentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2RowGroupEnrichment"}},"required":["data"],"additionalProperties":false,"title":"Row enrichment response","description":"Run state, output cells, and provider cascade for one group on one row."},"Tables_V2TableRunDispatch":{"type":"object","properties":{"id":{"type":"string","description":"Unique dispatch identifier."},"tableId":{"type":"string","description":"Table the dispatch runs against."},"workspaceId":{"type":"string","description":"Workspace that owns the dispatch."},"status":{"type":"string","enum":["pending","dispatching","complete","canceled"],"description":"Current dispatch lifecycle state."},"mode":{"type":"string","enum":["all","incomplete","new"],"description":"Which cells the dispatch targets: `all` re-runs settled cells, `incomplete` skips them, `new` covers only cells that have never run."},"scope":{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"string"},"description":"Workflow groups the dispatch runs."},"rowIds":{"description":"Explicit rows the dispatch targets. Absent means it was given no row list and walks every eligible row, narrowed by `filtered` and `excludeRowIds` when either is present.","type":"array","items":{"type":"string"}},"filtered":{"description":"Present and true when a stored filter narrows which rows run. The filter itself is not published: it is held compiled, in a different grammar from the predicate the request was written in. Absent means no filter narrows the dispatch — which, with no `rowIds` and no `excludeRowIds`, is what means every eligible row.","type":"boolean"},"excludeRowIds":{"description":"Rows the walk skips. Independent of `filtered`: a dispatch may exclude rows from a filtered set or from every eligible row. Never present alongside `rowIds`, which the run rejects and the walk would ignore.","type":"array","items":{"type":"string"}}},"required":["groupIds"],"additionalProperties":false,"description":"What the dispatch was asked to run."},"limit":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rows","description":"Unit the cap counts."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Hard ceiling in units of `type`."}},"required":["type","max"],"additionalProperties":false},{"type":"null"}],"description":"Cap on how much work the dispatch does, or null when unbounded."},"processedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Units of `limit.type` consumed so far."},"isManualRun":{"type":"boolean","description":"True when a caller started the run, false for an automatic re-fire."},"requestedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the dispatch was created."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the dispatch completed, or null."},"canceledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the dispatch was canceled, or null."}},"required":["id","tableId","workspaceId","status","mode","scope","limit","processedCount","isManualRun","requestedAt","completedAt","canceledAt"],"additionalProperties":false,"title":"Table run dispatch","description":"Lifecycle state of one table workflow-column run dispatch."},"Tables_V2TableRunDispatchResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableRunDispatch"}},"required":["data"],"additionalProperties":false,"title":"Table run dispatch response","description":"A single table run dispatch."},"Tables_V2CancelTableDispatchResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2TableRunDispatch"}},"required":["data"],"additionalProperties":false,"title":"Cancel table dispatch response","description":"The dispatch in its post-cancellation state."},"Tables_V2TableRunDispatchListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tables_V2TableRunDispatch"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Table run dispatch list response","description":"The table's most recent run dispatches, settled ones included."},"Tables_V2MoveTablesData":{"type":"object","properties":{"moved":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."},"name":{"type":"string","description":"Table name, or the folder path for a folder."}},"required":["kind","id","name"],"additionalProperties":false},"description":"Items the batch moved."},"skipped":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."},"name":{"type":"string","description":"Table name, or the folder path for a folder."}},"required":["kind","id","name"],"additionalProperties":false},"description":"Items dropped because a selected folder already carries them."},"notFound":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."}},"required":["kind","id"],"additionalProperties":false},"description":"Entries nothing active resolved to."},"failed":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."},"name":{"type":"string","description":"Table name, or the folder path for a folder."},"reason":{"type":"string","description":"Why this item could not be acted on."}},"required":["kind","id","name","reason"],"additionalProperties":false},"description":"Items the batch could not move."}},"required":["moved","skipped","notFound","failed"],"additionalProperties":false,"title":"Bulk move tables data","description":"Per-item outcome of a bulk table and folder move."},"Tables_V2MoveTablesResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2MoveTablesData"}},"required":["data"],"additionalProperties":false,"title":"Bulk move tables response","description":"Per-item outcome of a bulk table and folder move."},"Tables_BulkMoveTablesRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns every selected item."},"tableIds":{"default":[],"description":"Tables to move, by identifier.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"folderPaths":{"description":"Table folders to re-parent, by canonical path.","maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Tables_FolderPathInput"}},"targetFolderPath":{"description":"Destination folder path. Omit to move the selection to the workspace root.","$ref":"#/components/schemas/Tables_FolderPathInput"}},"required":["workspaceId"],"additionalProperties":false,"title":"Bulk move tables request","description":"Workspace scope, the tables and folder paths to move, and the destination folder path."},"Tables_V2BulkDeleteTablesData":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."},"name":{"type":"string","description":"Table name, or the folder path for a folder."}},"required":["kind","id","name"],"additionalProperties":false},"description":"Items the batch archived or deleted."},"skipped":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."},"name":{"type":"string","description":"Table name, or the folder path for a folder."}},"required":["kind","id","name"],"additionalProperties":false},"description":"Items dropped because a selected folder already carries them."},"notFound":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."}},"required":["kind","id"],"additionalProperties":false},"description":"Entries nothing active resolved to."},"failed":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","folder"],"description":"Which kind of item this entry names."},"id":{"type":"string","description":"Table identifier, or the folder path for a folder."},"name":{"type":"string","description":"Table name, or the folder path for a folder."},"reason":{"type":"string","description":"Why this item could not be acted on."}},"required":["kind","id","name","reason"],"additionalProperties":false},"description":"Items the batch could not delete."},"deletedItems":{"type":"object","properties":{"tables":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tables archived, including folder cascades."},"folders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Folders deleted, including nested folders."}},"required":["tables","folders"],"additionalProperties":false,"description":"Totals across the explicit archives and every folder cascade they triggered."}},"required":["deleted","skipped","notFound","failed","deletedItems"],"additionalProperties":false,"title":"Bulk delete tables data","description":"Per-item outcome of a bulk table and folder delete."},"Tables_V2BulkDeleteTablesResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Tables_V2BulkDeleteTablesData"}},"required":["data"],"additionalProperties":false,"title":"Bulk delete tables response","description":"Per-item outcome of a bulk table and folder delete.","examples":[{"data":{"deleted":[{"kind":"table","id":"tbl_7c9e6679742540de944be07fc1f90ae7","name":"Leads"},{"kind":"folder","id":"/Sales/Archive","name":"/Sales/Archive"}],"skipped":[],"notFound":[],"failed":[],"deletedItems":{"tables":1,"folders":1}}}]},"Tables_BulkDeleteTablesRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns every selected item."},"tableIds":{"default":[],"description":"Tables to archive, by identifier.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"folderPaths":{"description":"Table folders to delete, by canonical path. Each cascades to everything inside it.","maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Tables_FolderPathInput"}}},"required":["workspaceId"],"additionalProperties":false,"title":"Bulk delete tables request","description":"Workspace scope, and the tables and folder paths to delete."},"Knowledge_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Knowledge_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"Knowledge_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"Knowledge_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/Knowledge_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"Knowledge_FolderPathInput":{"title":"Folder path input","description":"Folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"Knowledge_V2KnowledgeBase":{"type":"object","properties":{"id":{"type":"string","description":"Unique knowledge base identifier.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"name":{"type":"string","description":"Human-readable knowledge base name.","examples":["Product Documentation"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Knowledge base description, or null when none is set.","examples":["All product documentation and guides"]},"tokenCount":{"type":"number","description":"Total tokens across indexed documents.","examples":[48213]},"embeddingModel":{"type":"string","description":"Embedding model used to index documents.","examples":["text-embedding-3-small"]},"embeddingDimension":{"type":"number","description":"Dimensionality of the embedding vectors.","examples":[1536]},"chunkingConfig":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkingConfig"},"docCount":{"description":"Number of documents in the knowledge base.","examples":[12],"type":"number"},"connectorTypes":{"description":"External connector types that have synced documents into the knowledge base.","examples":[["notion","google_drive"]],"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the knowledge base was created.","format":"date-time","examples":["2025-01-10T09:00:00Z"]},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the knowledge base was last modified.","format":"date-time","examples":["2025-06-18T16:45:00Z"]},"webUrl":{"type":"string","format":"uri","description":"Canonical absolute URL for opening this resource in the Sim web application."},"ownerEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Current email address of the knowledge base owner.","examples":["owner@example.com"]},"folderPath":{"type":"string","title":"Folder path","description":"Canonical containing-folder path; `/` is the workspace root. Resolved against active folders only, so an archived knowledge base whose containing folder was archived with it reports `/`.","maxLength":4096,"examples":["/Product"]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 archive timestamp, or null while active. Use List knowledge bases with `scope=archived` to find archived knowledge bases.","format":"date-time","examples":["2026-01-16T09:00:00Z"]}},"required":["id","name","description","tokenCount","embeddingModel","embeddingDimension","chunkingConfig","createdAt","updatedAt","webUrl","ownerEmail","folderPath","deletedAt"],"additionalProperties":false,"title":"Knowledge base","description":"A collection of documents indexed for vector and tag search."},"Knowledge_V2KnowledgeChunkingConfig":{"type":"object","properties":{"maxSize":{"type":"number","description":"Maximum chunk size in tokens.","examples":[1024]},"minSize":{"type":"number","description":"Minimum chunk size in characters.","examples":[100]},"overlap":{"type":"number","description":"Requested overlap in tokens between adjacent chunks.","examples":[200]},"strategy":{"description":"Chunking strategy applied during document processing.","type":"string","enum":["auto","text","regex","recursive","sentence","token"]},"strategyOptions":{"description":"Strategy-specific tuning options.","type":"object","properties":{"pattern":{"description":"Regular expression used by the regex chunking strategy.","type":"string","maxLength":500},"separators":{"description":"Ordered separators used to split content into chunks.","type":"array","items":{"type":"string"}},"recipe":{"description":"Content-aware recipe used by the automatic chunking strategy.","type":"string","enum":["plain","markdown","code"]},"strictBoundaries":{"description":"Whether regex matches must form strict chunk boundaries.","type":"boolean"}},"additionalProperties":false}},"required":["maxSize","minSize","overlap"],"additionalProperties":{"description":"Additional forward-compatible chunking configuration property."},"title":"Knowledge chunking configuration","description":"How documents in a knowledge base are split into chunks before embedding."},"Knowledge_V2KnowledgeBaseListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeBase"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge base list response","description":"A cursor-paginated page of knowledge bases."},"Knowledge_V2KnowledgeBaseResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeBase"}},"required":["data"],"additionalProperties":false,"title":"Knowledge base response","description":"A single knowledge base."},"Knowledge_V2KnowledgeChunkingConfigInput":{"type":"object","properties":{"maxSize":{"default":1024,"description":"Maximum chunk size in tokens.","examples":[1024],"type":"number","minimum":100,"maximum":4000},"minSize":{"default":100,"description":"Minimum chunk size in characters.","examples":[100],"type":"number","minimum":1,"maximum":2000},"overlap":{"default":200,"description":"Requested overlap in tokens between adjacent chunks.","examples":[200],"type":"number","minimum":0,"maximum":500},"strategy":{"description":"Chunking strategy applied during document processing. `regex` additionally requires `strategyOptions.pattern`.","type":"string","enum":["auto","text","regex","recursive","sentence","token"]},"strategyOptions":{"description":"Strategy-specific tuning options. `strictBoundaries` is accepted only with `strategy: \"regex\"`.","type":"object","properties":{"pattern":{"description":"Regular expression used by the regex chunking strategy.","type":"string","maxLength":500},"separators":{"description":"Ordered separators used to split content into chunks.","maxItems":32,"type":"array","items":{"type":"string","maxLength":100}},"recipe":{"description":"Content-aware recipe used by the automatic chunking strategy.","type":"string","enum":["plain","markdown","code"]},"strictBoundaries":{"description":"Whether regex matches must form strict chunk boundaries.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"title":"Knowledge chunking configuration input","description":"Chunking configuration applied when processing documents. On update this object is replaced wholesale rather than merged, so a caller preserving one key must read, modify, and write the whole object back."},"Knowledge_CreateKnowledgeBaseRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the knowledge base."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable knowledge base name.","examples":["Product Documentation"]},"description":{"description":"Optional knowledge base description.","examples":["All product documentation and guides"],"type":"string","maxLength":10000},"chunkingConfig":{"default":{"maxSize":1024,"minSize":100,"overlap":200},"description":"Chunking configuration; defaults are applied when omitted.","$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkingConfigInput"},"folderPath":{"description":"Containing folder path; omission creates the knowledge base at the root.","$ref":"#/components/schemas/Knowledge_FolderPathInput"}},"required":["workspaceId","name"],"additionalProperties":false,"title":"Create knowledge base request","description":"Workspace, name, description, chunking configuration, and folder placement."},"Knowledge_UpdateKnowledgeBaseRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"name":{"description":"New knowledge base name.","examples":["Updated Product Documentation"],"type":"string","minLength":1,"maxLength":255},"description":{"description":"New knowledge base description.","examples":["Refreshed product documentation and guides"],"type":"string","maxLength":10000},"chunkingConfig":{"description":"New document chunking configuration.","$ref":"#/components/schemas/Knowledge_V2KnowledgeChunkingConfigInput"},"folderPath":{"description":"New containing-folder path.","$ref":"#/components/schemas/Knowledge_FolderPathInput"}},"required":["workspaceId"],"additionalProperties":false,"title":"Update knowledge base request","description":"Workspace scope and fields to update. At least one mutable field is required."},"Knowledge_V2KnowledgeDeleteData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted resource.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"deleted":{"type":"boolean","const":true,"description":"Confirms that the resource was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Knowledge deletion data","description":"Acknowledgement for a deleted knowledge base or document."},"Knowledge_V2KnowledgeDeleteResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Knowledge deletion response","description":"Deletion acknowledgement containing the removed resource identifier."},"Knowledge_V2KnowledgeConnector":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique connector identifier."},"knowledgeBaseId":{"type":"string","minLength":1,"description":"Knowledge base synced by the connector."},"connectorType":{"type":"string","minLength":1,"description":"Registered external source type."},"credentialId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OAuth credential identifier, or null for API-key and unauthenticated sources."},"sourceConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Connector-specific source configuration value."},"description":"Connector-specific source selection and filtering configuration."},"syncMode":{"type":"string","description":"Synchronization mode used by the connector."},"syncIntervalMinutes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Scheduled synchronization interval in minutes; zero disables scheduled syncs."},"status":{"type":"string","enum":["active","paused","pending","syncing","error","disabled"],"description":"Current connector state. `pending` means a sync is queued but not yet running."},"lastSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Time of the most recent synchronization, or null before the first sync."},"lastSyncError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Most recent synchronization error, or null when none is recorded."},"lastSyncDocCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Documents observed by the most recent synchronization."},"nextSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Next scheduled synchronization time, or null when not scheduled."},"consecutiveFailures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of consecutive synchronization failures."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time the connector was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time the connector was last updated."}},"required":["id","knowledgeBaseId","connectorType","credentialId","sourceConfig","syncMode","syncIntervalMinutes","status","lastSyncAt","lastSyncError","lastSyncDocCount","nextSyncAt","consecutiveFailures","createdAt","updatedAt"],"additionalProperties":false,"title":"Knowledge connector","description":"An external document source linked to a knowledge base, without secret material."},"Knowledge_V2KnowledgeConnectorListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnector"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge connector list response","description":"A cursor-paginated page of connectors without secret material.","examples":[{"data":[{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"active","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}]},"Knowledge_V2KnowledgeConnectorResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeConnector"}},"required":["data"],"additionalProperties":false,"title":"Knowledge connector response","description":"A single connector without secret material.","examples":[{"data":{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"active","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Knowledge_CreateKnowledgeConnectorRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"connectorType":{"type":"string","minLength":1,"maxLength":100,"description":"Registered connector type."},"credentialId":{"description":"OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors.","type":"string","minLength":1,"maxLength":255},"apiKey":{"description":"Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference.","type":"string","minLength":1,"maxLength":10000},"sourceConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Connector-specific source configuration value."},"description":"Connector-specific source selection and filtering configuration."},"syncIntervalMinutes":{"default":1440,"description":"Scheduled synchronization interval in minutes; zero disables scheduling.","type":"integer","minimum":0,"maximum":525600}},"required":["workspaceId","connectorType","sourceConfig"],"additionalProperties":false,"title":"Create knowledge connector request","description":"Workspace, connector type, authentication reference, source configuration, and sync schedule.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncIntervalMinutes":1440}]},"Knowledge_V2KnowledgeConnectorSyncLog":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique synchronization log identifier."},"connectorId":{"type":"string","minLength":1,"description":"Connector that produced the log."},"status":{"type":"string","minLength":1,"description":"Synchronization outcome or current state."},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time synchronization started."},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Time synchronization completed, or null while it is running."},"docsAdded":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents added."},"docsUpdated":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents updated."},"docsDeleted":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents deleted."},"docsUnchanged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents unchanged."},"docsSkipped":{"default":0,"description":"Documents intentionally skipped because they could not be indexed safely.","type":"integer","minimum":0,"maximum":9007199254740991},"docsFailed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents that failed to synchronize."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Synchronization error, or null."}},"required":["id","connectorId","status","startedAt","completedAt","docsAdded","docsUpdated","docsDeleted","docsUnchanged","docsSkipped","docsFailed","errorMessage"],"additionalProperties":false,"title":"Knowledge connector sync log","description":"One synchronization attempt for a knowledge connector."},"Knowledge_V2KnowledgeConnectorDetail":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique connector identifier."},"knowledgeBaseId":{"type":"string","minLength":1,"description":"Knowledge base synced by the connector."},"connectorType":{"type":"string","minLength":1,"description":"Registered external source type."},"credentialId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OAuth credential identifier, or null for API-key and unauthenticated sources."},"sourceConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Connector-specific source configuration value."},"description":"Connector-specific source selection and filtering configuration."},"syncMode":{"type":"string","description":"Synchronization mode used by the connector."},"syncIntervalMinutes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Scheduled synchronization interval in minutes; zero disables scheduled syncs."},"status":{"type":"string","enum":["active","paused","pending","syncing","error","disabled"],"description":"Current connector state. `pending` means a sync is queued but not yet running."},"lastSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Time of the most recent synchronization, or null before the first sync."},"lastSyncError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Most recent synchronization error, or null when none is recorded."},"lastSyncDocCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Documents observed by the most recent synchronization."},"nextSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Next scheduled synchronization time, or null when not scheduled."},"consecutiveFailures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of consecutive synchronization failures."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time the connector was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time the connector was last updated."},"syncLogs":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorSyncLog"},"description":"The ten most recent synchronization attempts."}},"required":["id","knowledgeBaseId","connectorType","credentialId","sourceConfig","syncMode","syncIntervalMinutes","status","lastSyncAt","lastSyncError","lastSyncDocCount","nextSyncAt","consecutiveFailures","createdAt","updatedAt","syncLogs"],"additionalProperties":false,"title":"Knowledge connector detail","description":"A knowledge connector and its recent synchronization history."},"Knowledge_V2KnowledgeConnectorDetailResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDetail"}},"required":["data"],"additionalProperties":false,"title":"Knowledge connector detail response","description":"A connector and recent synchronization history without secret material.","examples":[{"data":{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"active","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","syncLogs":[]}}]},"Knowledge_UpdateKnowledgeConnectorResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeConnector"}},"required":["data"],"additionalProperties":false,"title":"Update knowledge connector response","description":"A single connector without secret material.","examples":[{"data":{"id":"kc-9f8e7d6c","knowledgeBaseId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","connectorType":"notion","credentialId":"cred-4b3a2c1d","sourceConfig":{"pageIds":["page-123"]},"syncMode":"full","syncIntervalMinutes":1440,"status":"paused","lastSyncAt":"2026-06-20T14:02:11.000Z","lastSyncError":null,"lastSyncDocCount":42,"nextSyncAt":"2026-06-21T14:02:11.000Z","consecutiveFailures":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:03:00.000Z"}}]},"Knowledge_UpdateKnowledgeConnectorRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"sourceConfig":{"description":"Replacement source selection and filtering configuration. Updating a runnable connector queues synchronization; paused connectors remain paused.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Connector-specific source configuration value."}},"syncIntervalMinutes":{"description":"New scheduled synchronization interval in minutes.","type":"integer","minimum":0,"maximum":525600},"status":{"description":"New connector state.","type":"string","enum":["active","paused"]}},"required":["workspaceId"],"additionalProperties":false,"title":"Update knowledge connector request","description":"Workspace scope and at least one mutable connector field.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","status":"paused"}]},"Knowledge_V2KnowledgeConnectorDeleteData":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Deleted connector identifier."},"deleted":{"type":"boolean","const":true,"description":"Whether the connector was deleted."},"documentsDeleted":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Connector documents deleted."},"documentsKept":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Connector documents retained."}},"required":["id","deleted","documentsDeleted","documentsKept"],"additionalProperties":false,"title":"Knowledge connector deletion data","description":"Connector deletion acknowledgement and affected document counts."},"Knowledge_V2KnowledgeConnectorDeleteResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Knowledge connector delete response","description":"Deletion acknowledgement and affected document counts.","examples":[{"data":{"id":"kc-9f8e7d6c","deleted":true,"documentsDeleted":0,"documentsKept":42}}]},"Knowledge_V2KnowledgeConnectorSyncData":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Connector queued for synchronization."},"syncTriggered":{"type":"boolean","const":true,"description":"Whether synchronization was queued."}},"required":["id","syncTriggered"],"additionalProperties":false,"title":"Knowledge connector sync data","description":"Acknowledgement that connector synchronization was queued."},"Knowledge_V2KnowledgeConnectorSyncResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorSyncData"}},"required":["data"],"additionalProperties":false,"title":"Knowledge connector sync response","description":"Acknowledgement that synchronization was queued.","examples":[{"data":{"id":"kc-9f8e7d6c","syncTriggered":true}}]},"Knowledge_SyncKnowledgeConnectorRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"rehydrate":{"default":false,"description":"Re-fetch and re-index every existing connector document.","type":"boolean"}},"required":["workspaceId"],"additionalProperties":false,"title":"Sync knowledge connector request","description":"Workspace scope and optional full rehydration control.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","rehydrate":false}]},"Knowledge_V2KnowledgeConnectorDocument":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique document identifier."},"filename":{"type":"string","minLength":1,"description":"Document filename."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Identifier assigned by the external source."},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original external source URL."},"enabled":{"type":"boolean","description":"Whether the document is enabled for knowledge search."},"userExcluded":{"type":"boolean","description":"Whether a user explicitly excluded the document from connector sync results."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time the document was first synchronized."},"processingStatus":{"type":"string","description":"Current document processing state."}},"required":["id","filename","externalId","sourceUrl","enabled","userExcluded","createdAt","processingStatus"],"additionalProperties":false,"title":"Knowledge connector document","description":"A knowledge document produced by an external connector."},"Knowledge_V2KnowledgeConnectorDocumentListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDocument"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge connector document list response","description":"A cursor-paginated page of connector documents.","examples":[{"data":[{"id":"doc-8a7b6c5d","filename":"Product requirements","externalId":"page-123","sourceUrl":"https://www.notion.so/page-123","enabled":true,"userExcluded":false,"createdAt":"2026-06-01T09:15:00.000Z","processingStatus":"completed"}],"nextCursor":null}]},"Knowledge_V2KnowledgeConnectorDocumentsUpdateData":{"type":"object","properties":{"operation":{"type":"string","enum":["restore","exclude"],"description":"Operation that was applied."},"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents changed."},"documentIds":{"type":"array","items":{"type":"string"},"description":"Identifiers of documents changed."}},"required":["operation","updatedCount","documentIds"],"additionalProperties":false,"title":"Knowledge connector documents update data","description":"Outcome of restoring or excluding connector documents."},"Knowledge_V2KnowledgeConnectorDocumentsUpdateResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeConnectorDocumentsUpdateData"}},"required":["data"],"additionalProperties":false,"title":"Knowledge connector documents update response","description":"Operation result and identifiers actually changed.","examples":[{"data":{"operation":"exclude","updatedCount":1,"documentIds":["doc-8a7b6c5d"]}}]},"Knowledge_UpdateKnowledgeConnectorDocumentsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"operation":{"type":"string","enum":["restore","exclude"],"description":"Whether to restore or exclude the selected documents."},"documentIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Connector document identifiers to update."}},"required":["workspaceId","operation","documentIds"],"additionalProperties":false,"title":"Update knowledge connector documents request","description":"Workspace, restore or exclude operation, and selected document identifiers.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","operation":"exclude","documentIds":["doc-8a7b6c5d"]}]},"Knowledge_V2KnowledgeSearchResult":{"type":"object","properties":{"knowledgeBaseId":{"type":"string","description":"Knowledge base the matching chunk came from; a search may span up to 20.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"documentId":{"type":"string","description":"Identifier of the document containing the matching chunk.","examples":["b2d4f8a0-1c3e-4a5b-9d7c-2e6f0a8b4c12"]},"documentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filename of the source document, or null when unavailable.","examples":["getting-started.pdf"]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original source URL, or null for a directly uploaded document."},"content":{"type":"string","description":"Text content of the matching chunk.","examples":["To reset your password, open Settings and choose Security."]},"chunkIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based chunk index within the document.","examples":[3]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"User-defined string, number, boolean, or date tag value."},"description":"Document tag values keyed by tag display name.","examples":[{"category":"billing","priority":2}]},"similarity":{"type":"number","description":"Cosine similarity between the query embedding and the chunk (1 - cosine distance), reported the same way in `vector` and `hybrid` mode; tag-only matches use 1. In `hybrid` mode results are not ordered by this value — see `rankScore`.","examples":[0.8423]},"rankScore":{"type":"number","description":"The retrieval score, or reranker score when reranked. In `vector` mode it equals `similarity`; in `hybrid` mode it is the reciprocal-rank-fusion score (a sum of 1/(60 + rank) over the lexical and vector legs, so a chunk both legs ranked first scores 2/61); when a reranker ordered the results it is `rerankerScore`. Recency boosting may reorder retrieval results without changing this score; `rank` always reflects returned order.","examples":[0.0328]},"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"1-based position in the returned order.","examples":[1]},"rerankerScore":{"description":"Relevance score assigned by the reranker, present only on results a reranker ordered. Results are ordered by this score when it is present, which is why it can disagree with `similarity`.","examples":[0.9312],"type":"number"}},"required":["knowledgeBaseId","documentId","documentName","sourceUrl","content","chunkIndex","metadata","similarity","rankScore","rank"],"additionalProperties":false,"title":"Knowledge search result","description":"A matching document chunk returned by knowledge search."},"Knowledge_V2KnowledgeSearchData":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeSearchResult"},"description":"Matching chunks ordered by relevance."},"query":{"type":"string","description":"Executed query, or an empty string for tag-only search.","examples":["How do I reset my password?"]},"knowledgeBaseIds":{"type":"array","items":{"type":"string"},"description":"Knowledge base identifiers that were searched.","examples":[["7c9e6679-7425-40de-944b-e07fc1f90ae7"]]},"topK":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum number of results requested.","examples":[10]},"totalResults":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of results returned.","examples":[4]},"rerankerStatus":{"type":"string","enum":["not_requested","skipped","unavailable","applied"],"description":"Reranking outcome. `applied` means results carry `rerankerScore` and follow that score. `unavailable` means reranking could not produce a usable order; the search succeeded in retrieval order without `rerankerScore`. Retry if reranking is needed. `skipped` means there was nothing to rank. `not_requested` means `rerankerEnabled` was absent or false.","examples":["applied"]}},"required":["results","query","knowledgeBaseIds","topK","totalResults","rerankerStatus"],"additionalProperties":false,"title":"Knowledge search data","description":"Results and execution context for a knowledge search."},"Knowledge_V2KnowledgeSearchResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeSearchData"}},"required":["data"],"additionalProperties":false,"title":"Knowledge search response","description":"Matching chunks and search execution context."},"Knowledge_V2KnowledgeSearchTagFilter":{"type":"object","properties":{"tagName":{"type":"string","description":"Display name of the tag to filter.","examples":["category"]},"fieldType":{"description":"Tag field type.","type":"string","enum":["text","number","date","boolean"]},"operator":{"default":"eq","description":"Comparison operator; valid operators depend on the field type. Text tags accept eq, neq, contains, not_contains, starts_with, ends_with; number and date tags accept eq, neq, gt, gte, lt, lte, between; boolean tags accept eq, neq. An operator the tag's field type does not implement is rejected, never ignored.","examples":["eq"],"type":"string","enum":["eq","neq","contains","not_contains","starts_with","ends_with","gt","gte","lt","lte","between"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"Tag value to compare against.","examples":["billing"]},"valueTo":{"description":"Upper bound for the `between` operator, and required whenever that operator is used.","anyOf":[{"type":"string"},{"type":"number"}]}},"required":["tagName","value"],"additionalProperties":false,"title":"Knowledge search tag filter","description":"A structured tag filter applied to knowledge search."},"Knowledge_SearchKnowledgeRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge bases."},"knowledgeBaseIds":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}}],"description":"One knowledge base ID or an array of up to 20 IDs. Query searches require the same embedding model and dimensions across all selected bases; search incompatible bases separately. Tag-only searches do not require this.","examples":[["7c9e6679-7425-40de-944b-e07fc1f90ae7"]]},"query":{"description":"Natural-language query; required when tag filters are omitted. At most 32768 characters — longer text exceeds the embedding model's per-input token ceiling and would be truncated before the billed search ran.","examples":["How do I reset my password?"],"type":"string","maxLength":32768},"topK":{"default":10,"description":"Maximum number of search results to return. Must be a whole number between 1 and 100.","type":"number","minimum":1,"maximum":100},"tagFilters":{"description":"Up to 10 filters combined with AND; repeating a tag narrows results. To express OR, run separate searches. Every tag must exist with the same slot and field type in each selected knowledge base or the request is rejected. List valid names with the knowledge-base tag-list operation.","maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeSearchTagFilter"}},"searchMode":{"description":"Retrieval strategy: `vector` uses semantic search; `hybrid` also runs full-text search. Omit to use the workspace policy.","anyOf":[{"type":"string","enum":["vector","hybrid"]},{"type":"null"}]},"rerankerEnabled":{"description":"Reorder retrieved chunks with a reranking model before truncating to `topK`. Ignored for tag-only searches. A completed reranking call adds a search unit. If reranking is unavailable, results keep their retrieval order; check `rerankerStatus`.","type":"boolean"},"rerankerModel":{"default":"rerank-v4.0-fast","description":"Reranking model to use when `rerankerEnabled` is true. Defaults to `rerank-v4.0-fast`.","type":"string","enum":["rerank-v4.0-pro","rerank-v4.0-fast","rerank-v3.5"]},"rerankerInputCount":{"description":"How many candidate chunks to retrieve before reranking. Defaults to four times `topK`, capped at 100. A larger pool costs more retrieval work but gives the reranker more to choose from.","type":"integer","minimum":1,"maximum":100}},"required":["workspaceId","knowledgeBaseIds"],"additionalProperties":false,"title":"Search knowledge request","description":"Knowledge bases, query, result limit, retrieval mode, and optional tag filters."},"Knowledge_V2KnowledgeTag":{"type":"object","properties":{"id":{"type":"string","description":"Tag definition ID used by Update tag and Delete tag."},"displayName":{"type":"string","description":"Display name used by tag filters and by tag values on document reads.","examples":["category"]},"tagSlot":{"type":"string","description":"Slot used by document updates: `tag1`–`tag7`, `number1`–`number5`, `date1`–`date2`, or `boolean1`–`boolean3`. Upload creation accepts text slots; use Update document for other types.","examples":["tag1"]},"fieldType":{"type":"string","description":"Value type stored in the slot; it determines the valid filter operators.","examples":["text"]}},"required":["id","displayName","tagSlot","fieldType"],"additionalProperties":false,"title":"Knowledge tag","description":"A tag defined on a knowledge base, and the slot it is stored in."},"Knowledge_V2KnowledgeTagListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTag"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge tag list response","description":"The full tag vocabulary of one knowledge base."},"Knowledge_V2KnowledgeTaggedDocument":{"type":"object","properties":{"id":{"type":"string","description":"Unique document identifier.","examples":["b2d4f8a0-1c3e-4a5b-9d7c-2e6f0a8b4c12"]},"knowledgeBaseId":{"type":"string","description":"Knowledge base to which the document belongs.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"filename":{"type":"string","description":"Original filename of the uploaded document.","examples":["getting-started.pdf"]},"fileSize":{"type":"number","description":"File size in bytes.","examples":[248913]},"mimeType":{"type":"string","description":"MIME type of the document file.","examples":["application/pdf"]},"processingStatus":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Current document processing state.","examples":["completed"]},"chunkCount":{"type":"number","description":"Number of indexed chunks; zero until processing completes.","examples":[24]},"tokenCount":{"type":"number","description":"Total tokens extracted from the document.","examples":[8123]},"characterCount":{"type":"number","description":"Total characters extracted from the document.","examples":[41205]},"enabled":{"type":"boolean","description":"Whether the document is enabled for search.","examples":[true]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the document was uploaded, or null.","format":"date-time","examples":["2025-06-18T16:45:00Z"]},"tags":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"description":"Tag value; dates are ISO 8601 strings and an unset tag is null."},"description":"Document tag values keyed by display name. Writes use slots such as `tag1`; use List tags to map names to slots.","examples":[{"category":"billing","priority":2}]}},"required":["id","knowledgeBaseId","filename","fileSize","mimeType","processingStatus","chunkCount","tokenCount","characterCount","enabled","createdAt","tags"],"additionalProperties":false,"title":"Knowledge document list item","description":"Document summary with the document tag values keyed by display name."},"Knowledge_V2KnowledgeDocumentListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTaggedDocument"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge document list response","description":"A cursor-paginated page of knowledge documents."},"Knowledge_V2BulkKnowledgeDocumentsData":{"type":"object","properties":{"operation":{"type":"string","enum":["enable","disable"],"description":"Operation that was applied."},"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of documents the operation changed.","examples":[42]},"documentIds":{"description":"Identifiers of the documents the operation changed. Present only for an explicit `documentIds` request, which is bounded to 100 documents; a `selectAll` request omits it because the selection is unbounded, and reports `updatedCount` instead.","type":"array","items":{"type":"string"}}},"required":["operation","updatedCount"],"additionalProperties":false,"title":"Bulk knowledge document update data","description":"Outcome of a bulk enable or disable across knowledge documents."},"Knowledge_V2BulkKnowledgeDocumentsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2BulkKnowledgeDocumentsData"}},"required":["data"],"additionalProperties":false,"title":"Bulk knowledge document response","description":"Outcome of a bulk enable or disable."},"Knowledge_BulkUpdateKnowledgeDocumentsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"operation":{"type":"string","enum":["enable","disable"],"description":"Whether the selected documents become enabled or disabled for search."},"documentIds":{"description":"Documents to update, by identifier.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"selectAll":{"description":"Update every document in the knowledge base instead of an explicit list, narrowed by `enabledFilter`.","type":"boolean","const":true},"enabledFilter":{"description":"With `selectAll`, restrict the update to documents in this state.","type":"string","enum":["all","enabled","disabled"]}},"required":["workspaceId","operation"],"additionalProperties":false,"title":"Bulk knowledge document request","description":"Operation and the documents it applies to.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","operation":"disable","documentIds":["b2d4f8a0-1c3e-4a5b-9d7c-2e6f0a8b4c12"]}]},"Knowledge_V2KnowledgeDocumentSummary":{"type":"object","properties":{"id":{"type":"string","description":"Unique document identifier.","examples":["b2d4f8a0-1c3e-4a5b-9d7c-2e6f0a8b4c12"]},"knowledgeBaseId":{"type":"string","description":"Knowledge base to which the document belongs.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"filename":{"type":"string","description":"Original filename of the uploaded document.","examples":["getting-started.pdf"]},"fileSize":{"type":"number","description":"File size in bytes.","examples":[248913]},"mimeType":{"type":"string","description":"MIME type of the document file.","examples":["application/pdf"]},"processingStatus":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Current document processing state.","examples":["completed"]},"chunkCount":{"type":"number","description":"Number of indexed chunks; zero until processing completes.","examples":[24]},"tokenCount":{"type":"number","description":"Total tokens extracted from the document.","examples":[8123]},"characterCount":{"type":"number","description":"Total characters extracted from the document.","examples":[41205]},"enabled":{"type":"boolean","description":"Whether the document is enabled for search.","examples":[true]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the document was uploaded, or null.","format":"date-time","examples":["2025-06-18T16:45:00Z"]}},"required":["id","knowledgeBaseId","filename","fileSize","mimeType","processingStatus","chunkCount","tokenCount","characterCount","enabled","createdAt"],"additionalProperties":false,"title":"Knowledge document summary","description":"Summary returned by document lists and upload acknowledgements."},"Knowledge_V2KnowledgeDocumentSummaryResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentSummary"}},"required":["data"],"additionalProperties":false,"title":"Knowledge document summary response","description":"An accepted knowledge document summary."},"Knowledge_UploadKnowledgeDocumentForm":{"type":"object","properties":{"file":{"type":"string","format":"binary","contentEncoding":"binary","maxLength":104857600,"description":"Document file to upload; the maximum size is 100 MiB."}},"required":["file"],"additionalProperties":{"description":"Additional multipart form fields are ignored."},"title":"Upload knowledge document form","description":"Multipart form containing the document file."},"Knowledge_V2KnowledgeDocumentUpload":{"type":"object","properties":{"id":{"type":"string","description":"Upload session identifier."},"knowledgeBaseId":{"type":"string","description":"Knowledge base that will own the document."},"status":{"type":"string","enum":["uploading","completing","finalizing","completed","failed","aborting","aborted","expired"],"description":"Current upload-session state."},"name":{"type":"string","description":"Filename recorded on the knowledge document."},"contentType":{"type":"string","description":"MIME type declared for the document."},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Exact file size in bytes."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 upload-session expiration time."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Terminal upload error, or null when none occurred."},"document":{"anyOf":[{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentSummary"},{"type":"null"}],"description":"Queued document after completion, or null before completion."}},"required":["id","knowledgeBaseId","status","name","contentType","size","expiresAt","error","document"],"additionalProperties":false,"title":"Knowledge document upload","description":"State of a resumable knowledge-document upload session."},"Knowledge_V2KnowledgeUploadTransfer":{"oneOf":[{"$ref":"#/components/schemas/Knowledge_V2PutUploadTransfer"},{"$ref":"#/components/schemas/Knowledge_V2MultipartUploadTransfer"}],"description":"Provider transfer strategy for a knowledge document upload.","title":"Knowledge upload transfer"},"Knowledge_V2PutUploadTransfer":{"type":"object","properties":{"method":{"type":"string","const":"put","description":"Upload strategy discriminator."},"url":{"type":"string","format":"uri","description":"Signed URL to which the file bytes are uploaded. Upload bytes with `PUT` and exactly the supplied headers; never construct or modify the signed URL. Treat any `2xx` as success. Sim-hosted URLs return an empty `204` and v2 JSON errors. Object-storage URLs may return `200` or `201` and provider-specific errors, often XML."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Headers that must be included with the upload request."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 expiration time for this signed URL. This is the URL's own expiry and is normally earlier than the upload session's expiresAt: the session stays open for later part, status, completion, and abort requests, but the bytes must be uploaded before this time. Once it passes, the storage provider rejects the upload and a new upload session must be created."}},"required":["method","url","headers","expiresAt"],"additionalProperties":false,"title":"Direct upload transfer","description":"Instructions for uploading bytes to one signed URL."},"Knowledge_V2MultipartUploadTransfer":{"type":"object","properties":{"method":{"type":"string","const":"multipart","description":"Upload strategy discriminator."},"partSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Required size of each non-final part in bytes."},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":640,"description":"Total number of upload parts."}},"required":["method","partSize","partCount"],"additionalProperties":false,"title":"Multipart upload transfer","description":"Instructions for splitting bytes into a multipart upload."},"Knowledge_V2CreateKnowledgeDocumentUploadData":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentUpload"},"uploadToken":{"type":"string","minLength":1,"description":"Signed control token required by subsequent upload-session requests."},"transfer":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeUploadTransfer"}},"required":["session","uploadToken","transfer"],"additionalProperties":false,"title":"Create knowledge document upload data","description":"Upload session, signed control token, and transfer instructions."},"Knowledge_V2CreateKnowledgeDocumentUploadResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2CreateKnowledgeDocumentUploadData"}},"required":["data"],"additionalProperties":false,"title":"Create knowledge document upload response","description":"Upload session, signed control token, and transfer instructions."},"Knowledge_CreateKnowledgeDocumentUploadRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Filename recorded on the knowledge document.","examples":["getting-started.pdf"]},"contentType":{"type":"string","minLength":1,"maxLength":255,"description":"Supported MIME type for the document.","examples":["application/pdf"]},"size":{"type":"integer","minimum":1,"maximum":104857600,"description":"Exact file size in bytes.","examples":[248913]},"tag1":{"description":"Value for tag slot 1.","type":"string","maxLength":1000},"tag2":{"description":"Value for tag slot 2.","type":"string","maxLength":1000},"tag3":{"description":"Value for tag slot 3.","type":"string","maxLength":1000},"tag4":{"description":"Value for tag slot 4.","type":"string","maxLength":1000},"tag5":{"description":"Value for tag slot 5.","type":"string","maxLength":1000},"tag6":{"description":"Value for tag slot 6.","type":"string","maxLength":1000},"tag7":{"description":"Value for tag slot 7.","type":"string","maxLength":1000},"processingOptions":{"description":"Optional processing recipe and language.","type":"object","properties":{"recipe":{"description":"Optional document processing recipe. One of: default, plain, markdown, code.","type":"string","enum":["default","plain","markdown","code"]},"lang":{"description":"Optional document language: hyphen-separated letter and digit subtags such as `en`, `en-US`, or `zh-Hant-TW`. Only that shape is validated, not full BCP-47 conformance.","type":"string","maxLength":35,"pattern":"^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"}},"additionalProperties":false}},"required":["workspaceId","name","contentType","size"],"additionalProperties":false,"title":"Create knowledge document upload request","description":"Document metadata used to authorize and initialize the upload.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"getting-started.pdf","contentType":"application/pdf","size":248913}]},"Knowledge_V2KnowledgeDocumentUploadResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentUpload"}},"required":["data"],"additionalProperties":false,"title":"Knowledge document upload response","description":"Current state of a knowledge document upload session."},"Knowledge_V2UploadPartUrl":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Multipart part number."},"url":{"type":"string","format":"uri","description":"Signed URL for this upload part. Upload bytes with `PUT` and exactly the supplied headers; never construct or modify the signed URL. Treat any `2xx` as success. Sim-hosted URLs return an empty `204` and v2 JSON errors. Object-storage URLs may return `200` or `201` and provider-specific errors, often XML. Do not retain part `ETag` values; after every part succeeds, call the completion endpoint without a request body."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Headers that must be included with the part upload."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 expiration time for the signed URL."}},"required":["partNumber","url","headers","expiresAt"],"additionalProperties":false,"title":"Upload part URL","description":"A signed URL and required headers for one multipart upload part."},"Knowledge_V2PartUrlsData":{"type":"object","properties":{"parts":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2UploadPartUrl"},"description":"Signed URLs for requested parts."}},"required":["parts"],"additionalProperties":false,"title":"Upload part URLs","description":"Signed transfer URLs for the requested multipart upload parts."},"Knowledge_V2KnowledgeDocumentUploadPartUrlsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2PartUrlsData"}},"required":["data"],"additionalProperties":false,"title":"Knowledge document upload part URLs response","description":"Signed provider URLs for requested multipart parts."},"Knowledge_CreateKnowledgeDocumentUploadPartUrlsRequest":{"type":"object","properties":{"partNumbers":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991},"description":"Multipart part numbers for which signed URLs should be created."}},"required":["partNumbers"],"additionalProperties":false,"title":"Create upload part URLs request","description":"Multipart part numbers for which signed URLs should be created.","examples":[{"partNumbers":[1,2,3]}]},"Knowledge_V2KnowledgeDocument":{"type":"object","properties":{"id":{"type":"string","description":"Unique document identifier.","examples":["b2d4f8a0-1c3e-4a5b-9d7c-2e6f0a8b4c12"]},"knowledgeBaseId":{"type":"string","description":"Knowledge base to which the document belongs.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"filename":{"type":"string","description":"Original filename of the uploaded document.","examples":["getting-started.pdf"]},"fileSize":{"type":"number","description":"File size in bytes.","examples":[248913]},"mimeType":{"type":"string","description":"MIME type of the document file.","examples":["application/pdf"]},"processingStatus":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Current document processing state.","examples":["completed"]},"chunkCount":{"type":"number","description":"Number of indexed chunks; zero until processing completes.","examples":[24]},"tokenCount":{"type":"number","description":"Total tokens extracted from the document.","examples":[8123]},"characterCount":{"type":"number","description":"Total characters extracted from the document.","examples":[41205]},"enabled":{"type":"boolean","description":"Whether the document is enabled for search.","examples":[true]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when the document was uploaded, or null.","format":"date-time","examples":["2025-06-18T16:45:00Z"]},"tags":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"description":"Tag value; dates are ISO 8601 strings and an unset tag is null."},"description":"Document tag values keyed by display name. Writes use slots such as `tag1`; use List tags to map names to slots.","examples":[{"category":"billing","priority":2}]},"processingError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Processing error message, or null when processing has not failed."},"processingStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when processing started, or null.","format":"date-time","examples":["2025-06-18T16:45:05Z"]},"processingCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp when processing completed, or null.","format":"date-time","examples":["2025-06-18T16:45:42Z"]},"connectorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector identifier for a synced document, or null for a direct upload."},"connectorType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector type for a synced document, or null for a direct upload."},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original source URL for a synced document, or null for a direct upload."}},"required":["id","knowledgeBaseId","filename","fileSize","mimeType","processingStatus","chunkCount","tokenCount","characterCount","enabled","createdAt","tags","processingError","processingStartedAt","processingCompletedAt","connectorId","connectorType","sourceUrl"],"additionalProperties":false,"title":"Knowledge document","description":"Full document detail including processing state and connector provenance."},"Knowledge_V2KnowledgeDocumentResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeDocument"}},"required":["data"],"additionalProperties":false,"title":"Knowledge document response","description":"Full knowledge document detail."},"Knowledge_V2KnowledgeDocumentProcessing":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the requeued document."},"queued":{"type":"boolean","const":true,"description":"Confirms that processing was requeued."},"processingStatus":{"type":"string","description":"Processing state the document was moved to.","examples":["pending"]},"message":{"type":"string","description":"Human-readable outcome of the requeue."}},"required":["id","queued","processingStatus","message"],"additionalProperties":false,"title":"Knowledge document processing acknowledgement","description":"Acknowledgement returned when a document is requeued for processing."},"Knowledge_V2UpdateKnowledgeDocumentResponse":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTaggedDocument"},{"$ref":"#/components/schemas/Knowledge_V2KnowledgeDocumentProcessing"}],"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Update knowledge document response","description":"The updated document, or the processing requeue acknowledgement."},"Knowledge_UpdateKnowledgeDocumentRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"filename":{"description":"New filename for the document.","examples":["getting-started-v2.pdf"],"type":"string","minLength":1,"maxLength":255},"enabled":{"description":"Whether the document participates in search. Disabling keeps it indexed.","type":"boolean"},"tag1":{"description":"New value for tag slot 1.","type":"string","maxLength":1000},"tag2":{"description":"New value for tag slot 2.","type":"string","maxLength":1000},"tag3":{"description":"New value for tag slot 3.","type":"string","maxLength":1000},"tag4":{"description":"New value for tag slot 4.","type":"string","maxLength":1000},"tag5":{"description":"New value for tag slot 5.","type":"string","maxLength":1000},"tag6":{"description":"New value for tag slot 6.","type":"string","maxLength":1000},"tag7":{"description":"New value for tag slot 7.","type":"string","maxLength":1000},"number1":{"description":"New value for number tag slot 1.","type":"number"},"number2":{"description":"New value for number tag slot 2.","type":"number"},"number3":{"description":"New value for number tag slot 3.","type":"number"},"number4":{"description":"New value for number tag slot 4.","type":"number"},"number5":{"description":"New value for number tag slot 5.","type":"number"},"date1":{"description":"New value for date tag slot 1, formatted YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"date2":{"description":"New value for date tag slot 2, formatted YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"boolean1":{"description":"New value for boolean tag slot 1.","type":"boolean"},"boolean2":{"description":"New value for boolean tag slot 2.","type":"boolean"},"boolean3":{"description":"New value for boolean tag slot 3.","type":"boolean"},"retryProcessing":{"description":"Requeue a failed or stuck document for processing. Send it alone — no other field may accompany it — and it answers with a queue acknowledgement rather than the document.","type":"boolean","const":true}},"required":["workspaceId"],"additionalProperties":false,"title":"Update knowledge document request","description":"Filename, search state, tag slot values, or a processing retry.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","enabled":false,"tag1":"billing"}]},"Knowledge_V2Folder":{"type":"object","properties":{"name":{"type":"string","description":"Folder name."},"path":{"type":"string","title":"Non-root folder path","description":"Canonical folder path used as the public folder identifier.","maxLength":4096},"parentPath":{"type":"string","title":"Folder path","description":"Canonical parent path; `/` is the root.","maxLength":4096},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the folder was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the folder was last updated.","format":"date-time"}},"required":["name","path","parentPath","createdAt","updatedAt"],"additionalProperties":false,"title":"Folder","description":"A canonical workspace folder."},"Knowledge_V2KnowledgeFolderListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2Folder"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge folder list response","description":"The whole bounded set of knowledge-base folders, in one page."},"Knowledge_V2KnowledgeFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2Folder"}},"required":["data"],"additionalProperties":false,"title":"Knowledge folder response","description":"A single knowledge-base folder."},"Knowledge_NonRootFolderPathInput":{"title":"Non-root folder path input","description":"Non-root folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.","maxLength":4096,"type":"string"},"Knowledge_CreateKnowledgeFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the folder."},"path":{"description":"Path of the folder to create.","$ref":"#/components/schemas/Knowledge_NonRootFolderPathInput"}},"required":["workspaceId","path"],"additionalProperties":false,"title":"Create knowledge folder request","description":"Workspace and canonical path for a new knowledge-base folder."},"Knowledge_RelocateKnowledgeFolderRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace containing the folder."},"path":{"description":"Current folder path.","$ref":"#/components/schemas/Knowledge_NonRootFolderPathInput"},"destinationPath":{"description":"Where the folder lands, with `mv` semantics. A path naming an existing folder receives the source as a child under its current name; `/` moves it to the workspace root under its current name; any other path becomes the folder’s new full path (a rename, a relocation, or both).","$ref":"#/components/schemas/Knowledge_FolderPathInput"}},"required":["workspaceId","path","destinationPath"],"additionalProperties":false,"title":"Relocate knowledge folder request","description":"Current and destination canonical paths for a knowledge-base folder."},"Knowledge_V2DeleteKnowledgeFolderData":{"type":"object","properties":{"path":{"type":"string","title":"Folder path","description":"Canonical path of the deleted folder.","maxLength":4096},"deleted":{"type":"boolean","const":true,"description":"Confirms that the folder was deleted."},"deletedItems":{"type":"object","properties":{"folders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of deleted folders."},"knowledgeBases":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of deleted knowledge bases."}},"required":["folders","knowledgeBases"],"additionalProperties":false,"description":"Counts of deleted resources."}},"required":["path","deleted","deletedItems"],"additionalProperties":false,"title":"Delete knowledge folder data","description":"Folder deletion acknowledgement and deleted-resource counts."},"Knowledge_V2DeleteKnowledgeFolderResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2DeleteKnowledgeFolderData"}},"required":["data"],"additionalProperties":false,"title":"Delete knowledge folder response","description":"Folder deletion acknowledgement and deleted-resource counts."},"Knowledge_RestoreKnowledgeBaseRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."}},"required":["workspaceId"],"additionalProperties":false,"title":"Restore knowledge base request","description":"Workspace scope for the knowledge base.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"}]},"Knowledge_V2AddedWorkspaceFileDocument":{"type":"object","properties":{"documentId":{"type":"string","description":"Identifier of the queued knowledge document."},"filename":{"type":"string","description":"Filename recorded on the knowledge document."},"mimeType":{"type":"string","description":"MIME type of the source workspace file."},"fileSize":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."}},"required":["documentId","filename","mimeType","fileSize"],"additionalProperties":false,"title":"Indexed workspace file","description":"A workspace file that was queued for indexing into a knowledge base."},"Knowledge_V2AddWorkspaceFilesToKnowledgeBaseData":{"type":"object","properties":{"knowledgeBaseId":{"type":"string","description":"Knowledge base the files were added to."},"added":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2AddedWorkspaceFileDocument"},"description":"Files queued for indexing, in request order."},"failed":{"type":"array","items":{"type":"string"},"description":"References that could not be indexed, echoed exactly as they were sent."}},"required":["knowledgeBaseId","added","failed"],"additionalProperties":false,"title":"Add workspace files data","description":"Outcome of indexing workspace files into a knowledge base."},"Knowledge_V2AddWorkspaceFilesToKnowledgeBaseResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2AddWorkspaceFilesToKnowledgeBaseData"}},"required":["data"],"additionalProperties":false,"title":"Index workspace files response","description":"Documents queued for indexing and references that could not be."},"Knowledge_AddWorkspaceFilesToKnowledgeBaseRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns both the files and the base."},"fileReferences":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Workspace file IDs or paths to index. Prefer IDs or canonical `files/<folder>/<name>` paths. Duplicates resolving to the same file are indexed once."}},"required":["workspaceId","fileReferences"],"additionalProperties":false,"title":"Index workspace files request","description":"Workspace scope and the workspace file references to index.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","fileReferences":["handbook.pdf"]}]},"Knowledge_V2KnowledgeChunk":{"type":"object","properties":{"id":{"type":"string","description":"Unique chunk identifier.","examples":["4c1f9e77-2b3a-4f8d-9e10-6a2c8d4b1e05"]},"chunkIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based position of the chunk within its document.","examples":[3]},"content":{"type":"string","description":"Text content of the chunk, exactly as it was embedded.","examples":["To reset your password, open Settings and choose Security."]},"contentLength":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Character count of `content`.","examples":[58]},"tokenCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Tokens the chunk consumed when embedded.","examples":[14]},"enabled":{"type":"boolean","description":"Whether the chunk participates in search. A disabled chunk stays indexed."},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Character offset of the chunk within the extracted document text."},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Character offset just past the end of the chunk."},"tag1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"tag2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"tag3":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"tag4":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"tag5":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"tag6":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"tag7":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text tag value inherited from the document, or null when the slot is unset."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the chunk was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the chunk was last modified."}},"required":["id","chunkIndex","content","contentLength","tokenCount","enabled","startOffset","endOffset","tag1","tag2","tag3","tag4","tag5","tag6","tag7","createdAt","updatedAt"],"additionalProperties":false,"title":"Knowledge chunk","description":"One embedded passage of a knowledge document."},"Knowledge_V2KnowledgeChunkListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeChunk"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge chunk list response","description":"A cursor-paginated page of document chunks."},"Knowledge_V2KnowledgeChunkResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeChunk"}},"required":["data"],"additionalProperties":false,"title":"Knowledge chunk response","description":"A single document chunk."},"Knowledge_CreateKnowledgeChunkRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"content":{"type":"string","minLength":1,"maxLength":10000,"description":"Text embedded before the response. Search includes it when the chunk and document are enabled and the document has completed processing."},"enabled":{"default":true,"description":"Whether the new chunk participates in search.","type":"boolean"}},"required":["workspaceId","content"],"additionalProperties":false,"title":"Create knowledge chunk request","description":"Workspace scope and the text to embed.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","content":"To reset your password, open Settings and choose Security."}]},"Knowledge_V2BulkKnowledgeChunksData":{"type":"object","properties":{"operation":{"type":"string","enum":["enable","disable","delete"],"description":"Operation that was applied."},"processed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of chunks in this document the operation matched. Chunks already in the requested state are counted too, so this is not a count of changes.","examples":[12]},"errors":{"type":"array","items":{"type":"string"},"description":"Per-chunk failures, including any identifier that named no chunk in the document. A populated array still answers 200."}},"required":["operation","processed","errors"],"additionalProperties":false,"title":"Bulk knowledge chunk update data","description":"Outcome of a bulk enable, disable, or delete across knowledge chunks."},"Knowledge_V2BulkKnowledgeChunksResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2BulkKnowledgeChunksData"}},"required":["data"],"additionalProperties":false,"title":"Bulk knowledge chunk response","description":"Counts and per-chunk failures from a bulk chunk operation."},"Knowledge_BulkUpdateKnowledgeChunksRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"operation":{"type":"string","enum":["enable","disable","delete"],"description":"What to do with the selected chunks."},"chunkIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Chunks to operate on, by identifier. An id naming no chunk in the document is reported in errors and does not fail the request."}},"required":["workspaceId","operation","chunkIds"],"additionalProperties":false,"title":"Bulk knowledge chunk request","description":"Workspace scope, the operation to apply, and the chunks to apply it to.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","operation":"disable","chunkIds":["4c1f9e77-2b3a-4f8d-9e10-6a2c8d4b1e05"]}]},"Knowledge_UpdateKnowledgeChunkRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"content":{"description":"Replacement text. Changing it re-embeds the chunk and re-derives its token and character counts.","type":"string","minLength":1,"maxLength":10000},"enabled":{"description":"Whether the chunk participates in search. Disabling keeps it indexed.","type":"boolean"}},"required":["workspaceId"],"additionalProperties":false,"title":"Update knowledge chunk request","description":"Workspace scope and the fields to update. At least one is required.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","enabled":false}]},"Knowledge_V2KnowledgeTagResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2KnowledgeTag"}},"required":["data"],"additionalProperties":false,"title":"Knowledge tag response","description":"A single tag definition."},"Knowledge_CreateKnowledgeTagRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"displayName":{"type":"string","minLength":1,"maxLength":100,"description":"Name tag filters and document reads use for this tag.","examples":["category"]},"fieldType":{"default":"text","type":"string","enum":["text","number","date","boolean"],"description":"Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3.","examples":["text"]},"tagSlot":{"description":"Slot to store the tag in. Omit to take the next free slot for the field type; a slot that does not belong to the field type, or one already in use, is rejected.","type":"string","enum":["tag1","tag2","tag3","tag4","tag5","tag6","tag7","number1","number2","number3","number4","number5","date1","date2","boolean1","boolean2","boolean3"],"examples":["tag1"]}},"required":["workspaceId","displayName"],"additionalProperties":false,"title":"Create knowledge tag request","description":"Workspace scope, display name, field type, and optional slot.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","displayName":"category","fieldType":"text"}]},"Knowledge_UpdateKnowledgeTagRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"displayName":{"description":"New tag display name.","type":"string","minLength":1,"maxLength":100,"examples":["category"]},"fieldType":{"description":"New value type for the tag.","type":"string","enum":["text","number","date","boolean"],"examples":["text"]}},"required":["workspaceId"],"additionalProperties":false,"title":"Update knowledge tag request","description":"Workspace scope and the fields to update. At least one is required.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","displayName":"topic"}]},"Knowledge_V2DeleteKnowledgeTagData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted tag definition."},"tagSlot":{"type":"string","description":"Slot the deleted tag occupied; its values are now cleared."},"displayName":{"type":"string","description":"Display name the deleted tag carried."},"deleted":{"type":"boolean","const":true,"description":"Confirms that the tag definition was deleted."}},"required":["id","tagSlot","displayName","deleted"],"additionalProperties":false,"title":"Delete knowledge tag data","description":"Acknowledgement for a deleted tag definition."},"Knowledge_V2DeleteKnowledgeTagResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2DeleteKnowledgeTagData"}},"required":["data"],"additionalProperties":false,"title":"Delete knowledge tag response","description":"Acknowledgement naming the deleted definition and the slot it freed."},"Knowledge_V2NextKnowledgeTagSlotData":{"type":"object","properties":{"nextAvailableSlot":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The free slot a create would take, or null when the field type is exhausted.","examples":["tag3"]},"fieldType":{"type":"string","description":"Field type the slots were counted for."},"usedSlots":{"type":"array","items":{"type":"string"},"description":"Slots of this field type already holding a tag."},"totalSlots":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Total slots this field type has: 7 for text, 5 for number, 2 for date, 3 for boolean."},"availableSlots":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Slots of this field type still free, or 0 when the field type is exhausted."}},"required":["nextAvailableSlot","fieldType","usedSlots","totalSlots","availableSlots"],"additionalProperties":false,"title":"Next knowledge tag slot","description":"Slot availability for one tag field type."},"Knowledge_V2NextKnowledgeTagSlotResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2NextKnowledgeTagSlotData"}},"required":["data"],"additionalProperties":false,"title":"Next knowledge tag slot response","description":"Slot availability for one tag field type."},"Knowledge_V2KnowledgeTagUsage":{"type":"object","properties":{"id":{"type":"string","description":"Tag definition ID used by Update Tag and Delete Tag.","examples":["7c9e6679-7425-40de-944b-e07fc1f90ae7"]},"tagSlot":{"type":"string","description":"Slot the tag occupies.","examples":["tag1"]},"displayName":{"type":"string","description":"Tag display name.","examples":["category"]},"fieldType":{"type":"string","description":"Value type stored in the slot.","examples":["text"]},"documentCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Documents in the knowledge base carrying a value in this slot."},"chunkCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Indexed chunks carrying a value in this slot."}},"required":["id","tagSlot","displayName","fieldType","documentCount","chunkCount"],"additionalProperties":false,"title":"Knowledge tag usage","description":"How widely one tag is populated across a knowledge base."},"Knowledge_V2KnowledgeTagUsageListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTagUsage"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Knowledge tag usage response","description":"Usage counts for every tag defined on one knowledge base."},"Knowledge_V2BulkSaveKnowledgeTagDefinitionsData":{"type":"object","properties":{"created":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTag"},"description":"Definitions that did not previously exist."},"updated":{"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2KnowledgeTag"},"description":"Definitions whose slot was already defined."},"errors":{"type":"array","items":{"type":"string"},"description":"Per-definition failures. A populated array still answers 200."}},"required":["created","updated","errors"],"additionalProperties":false,"title":"Bulk save knowledge tag definitions data","description":"Definitions created and updated by a bulk tag-definition save."},"Knowledge_V2BulkSaveKnowledgeTagDefinitionsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2BulkSaveKnowledgeTagDefinitionsData"}},"required":["data"],"additionalProperties":false,"title":"Bulk save tag definitions response","description":"Definitions created and updated, with any per-definition failures."},"Knowledge_V2BulkSaveKnowledgeTagDefinition":{"type":"object","properties":{"tagSlot":{"type":"string","enum":["tag1","tag2","tag3","tag4","tag5","tag6","tag7","number1","number2","number3","number4","number5","date1","date2","boolean1","boolean2","boolean3"],"description":"Storage slot the tag occupies. It must belong to the tag’s `fieldType`.","examples":["tag1"]},"displayName":{"type":"string","minLength":1,"maxLength":100,"description":"Name tag filters and document reads use for this tag.","examples":["category"]},"fieldType":{"type":"string","enum":["text","number","date","boolean"],"description":"Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3.","examples":["text"]},"originalDisplayName":{"description":"Previous display name, when this entry renames an existing definition.","type":"string","minLength":1,"maxLength":100,"examples":["category"]}},"required":["tagSlot","displayName","fieldType"],"additionalProperties":false,"title":"Knowledge tag definition input","description":"One tag definition declared in a bulk save."},"Knowledge_BulkSaveKnowledgeTagDefinitionsRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the knowledge base."},"definitions":{"minItems":1,"maxItems":17,"type":"array","items":{"$ref":"#/components/schemas/Knowledge_V2BulkSaveKnowledgeTagDefinition"},"description":"Tag definitions to create or update on the knowledge base."}},"required":["workspaceId","definitions"],"additionalProperties":false,"title":"Bulk save tag definitions request","description":"Workspace scope and the tag definitions to create or update.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","definitions":[{"tagSlot":"tag1","displayName":"category","fieldType":"text"}]}]},"Knowledge_V2DeleteKnowledgeTagDefinitionsData":{"type":"object","properties":{"unused":{"type":"boolean","description":"Whether the delete was restricted to definitions no document still uses."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of tag definitions removed."}},"required":["unused","count"],"additionalProperties":false,"title":"Delete knowledge tag definitions data","description":"Outcome of a knowledge-base tag-definition delete."},"Knowledge_V2DeleteKnowledgeTagDefinitionsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Knowledge_V2DeleteKnowledgeTagDefinitionsData"}},"required":["data"],"additionalProperties":false,"title":"Delete tag definitions response","description":"Number of tag definitions that were removed."},"Billing_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Billing_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"Billing_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"Billing_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/Billing_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"Billing_V2BillingStatus":{"type":"object","properties":{"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace whose payer was resolved, or null for account billing."},"period":{"type":"object","properties":{"start":{"type":"string","description":"ISO 8601 start of the current billing period, or 1970-01-01T00:00:00.000Z when no Stripe subscription defines one.","format":"date-time"},"end":{"type":"string","description":"ISO 8601 end of the current billing period, or 9999-12-31T00:00:00.000Z when no Stripe subscription defines one.","format":"date-time"}},"required":["start","end"],"additionalProperties":false,"description":"Current subscription billing period. Without a Stripe subscription, including on Free, the bounds are 1970-01-01 to 9999-12-31; they do not represent a monthly window."},"plan":{"type":"string","description":"Current billing plan."},"status":{"type":"string","enum":["active","limit_exceeded","billing_blocked"],"description":"Current billing standing."},"credits":{"anyOf":[{"type":"object","properties":{"used":{"type":"number","description":"Credits consumed during the current billing period on a paid plan, or over the account’s lifetime on Free."},"limit":{"type":"number","description":"Credit allowance for the reporting window — per billing period on a paid plan, lifetime on the free plan."},"remaining":{"type":"number","description":"Allowance minus consumption, over the same window."}},"required":["used","limit","remaining"],"additionalProperties":false},{"type":"null"}],"description":"The payer’s credit usage and allowance: per billing period on paid plans, lifetime on Free. Null when the caller cannot manage the payer’s billing, including every workspace API key."},"storage":{"anyOf":[{"type":"object","properties":{"usedBytes":{"type":"number","minimum":0,"description":"Storage currently consumed, in bytes."},"limitBytes":{"type":"number","minimum":0,"description":"Storage quota, in bytes."},"percentUsed":{"type":"number","minimum":0,"description":"Percentage of the storage quota consumed."}},"required":["usedBytes","limitBytes","percentUsed"],"additionalProperties":false},{"type":"null"}],"description":"The payer's storage consumption and quota, or null when the caller cannot manage that payer's billing. Always null for a workspace API key."}},"required":["workspaceId","period","plan","status","credits","storage"],"additionalProperties":false,"title":"Billing status","description":"Current billing standing, credit allowance, and storage quota."},"Billing_V2BillingStatusResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Billing_V2BillingStatus"}},"required":["data"],"additionalProperties":false,"title":"Billing status response","description":"Current billing standing, credit allowance, and storage quota.","examples":[{"data":{"workspaceId":null,"period":{"start":"2026-07-01T00:00:00.000Z","end":"2026-08-01T00:00:00.000Z"},"plan":"pro","status":"active","credits":{"used":512,"limit":20000,"remaining":19488},"storage":{"usedBytes":5242880,"limitBytes":1073741824,"percentUsed":0.48828125}}}]},"Billing_V2BillingLogEntry":{"type":"object","properties":{"id":{"type":"string","description":"Unique usage-event identifier."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the usage event was recorded.","format":"date-time"},"source":{"type":"string","enum":["workflow","wand","sim-chat","mcp_copilot","mothership_block","knowledge-base","voice-input","enrichment","voice-output","api-tool"],"description":"Product surface that consumed credits. The legacy `mothership_block` value identifies the Agent block; `sim-chat` identifies Sim Chat."},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace attributed to the event, or null for account-level usage."},"workflow":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Workflow identifier."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow display name, when available."}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"Workflow attributed to the event, when applicable."},"runId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow run attributed to the event, when applicable."},"creditCost":{"type":"number","description":"Credits apportioned to the event so page rows sum to the rounded page total; may be zero for a sub-credit event."}},"required":["id","createdAt","source","workspaceId","workflow","runId","creditCost"],"additionalProperties":false,"title":"Billing log entry","description":"One credit-consuming usage event in the billing ledger."},"Billing_V2BillingLogListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Billing_V2BillingLogEntry"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."},"scope":{"type":"string","enum":["user","workspace"],"description":"Whose usage this page reports. `user` contains only the OAuth or personal-key user's events, optionally narrowed by `workspaceId`; it omits other members. `workspace` contains every member's events for the workspace API key's bound workspace."}},"required":["data","nextCursor","scope"],"additionalProperties":false,"title":"Billing log list response","description":"A cursor-paginated page of credit-consuming usage events.","examples":[{"data":[{"id":"log_1","createdAt":"2026-07-29T18:04:11.000Z","source":"sim-chat","workspaceId":"ws_1","workflow":null,"runId":null,"creditCost":12}],"nextCursor":null,"scope":"workspace"}]},"Resources_V2ActionableForbiddenDetails":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Resources_V2ForbiddenDetailCode"}},"required":["code"],"additionalProperties":{"description":"Additional context for this refusal."},"title":"Actionable forbidden details","description":"Machine-readable cause and optional context for an actionable `403` response."},"Resources_V2ForbiddenDetailCode":{"type":"string","enum":["INSUFFICIENT_WORKSPACE_ROLE","PERSONAL_API_KEYS_DISABLED","WORKSPACE_KEY_OPERATION_NOT_PERMITTED","PRINCIPAL_KIND_NOT_PERMITTED","ORGANIZATION_MEMBERSHIP_REQUIRED","ORGANIZATION_ADMIN_REQUIRED","ENTERPRISE_PLAN_REQUIRED","SSO_DISABLED","SSO_DOMAIN_NOT_VERIFIED","SSO_PROVIDER_LIMIT_REACHED","ORGANIZATION_PLAN_REQUIRED","AUDIT_LOGS_DISABLED","ACCESS_REQUESTS_DISABLED","ACCESS_REQUEST_ORGANIZATION_REQUIRED","SKILL_EDITOR_ACCESS_REQUIRED","SECRET_ADMIN_ACCESS_REQUIRED","WORKSPACE_RESOURCE_LIMIT_REACHED","PUBLIC_SHARING_NOT_ALLOWED","CREDENTIAL_ADMIN_ACCESS_REQUIRED","MCP_SERVER_URL_NOT_ALLOWED","WORKSPACE_PLAN_CAPABILITY_REQUIRED","CHAT_AUTH_MODE_NOT_PERMITTED","CONNECTOR_MANAGED_RESOURCE_READ_ONLY","PERMISSION_GROUP_CAPABILITY_BLOCKED","INTEGRATION_NOT_ALLOWED","INSUFFICIENT_SCOPE","SCIM_MANAGED_MEMBERSHIP"],"title":"Forbidden detail code","description":"Stable cause code for an actionable `403` response."},"Resources_V2Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation of the error."},"details":{"description":"Structured error context whose keys depend on the error. Actionable `403` responses use the `V2ActionableForbiddenDetails` shape; validation failures may return issue arrays instead.","anyOf":[{"$ref":"#/components/schemas/Resources_V2ActionableForbiddenDetails"},{"description":"Other structured context defined by the specific error."}]}},"required":["code","message"],"additionalProperties":false,"description":"Canonical error details."}},"required":["error"],"additionalProperties":false,"title":"v2 error response","description":"Canonical error envelope returned by the public v2 API.","examples":[{"error":{"code":"BAD_REQUEST","message":"The request is invalid."}}]},"Resources_V2Workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},"name":{"type":"string","description":"Workspace display name."},"color":{"type":"string","description":"Workspace color as a hexadecimal color value."},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace logo URL, or null when none is configured."},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of effective members, including inherited organization administrators."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the workspace was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the workspace was last updated."}},"required":["id","name","color","logoUrl","memberCount","createdAt","updatedAt"],"additionalProperties":false,"title":"Workspace","description":"Public metadata for an accessible workspace."},"Resources_ListWorkspacesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2Workspace"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List workspaces response","description":"Metadata for workspaces available to the credential.","examples":[{"data":[{"id":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Engineering","color":"#33C482","logoUrl":null,"memberCount":14,"createdAt":"2026-01-15T10:30:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}]},"Resources_GetWorkspaceResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Workspace"}},"required":["data"],"additionalProperties":false,"title":"Get workspace response","description":"Metadata for one workspace.","examples":[{"data":{"id":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Engineering","color":"#33C482","logoUrl":null,"memberCount":14,"createdAt":"2026-01-15T10:30:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_V2WorkspaceMember":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier; use this identifier for member administration."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Member email address."},"name":{"type":"string","description":"Member display name."},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member profile image URL, or null when absent."},"role":{"type":"string","enum":["admin","write","read"],"description":"Effective role in the workspace."},"isExternal":{"type":"boolean","description":"Whether the member belongs to a different organization than the workspace. True only for an explicitly granted member whose own organization differs; inherited organization-administrator access is always reported as false, so this does not detect every outside caller."},"joinedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when access was granted."}},"required":["userId","email","name","image","role","isExternal","joinedAt"],"additionalProperties":false,"title":"Workspace member","description":"An effective workspace member and their public access role."},"Resources_ListWorkspaceMembersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2WorkspaceMember"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List workspace members response","description":"A cursor-paginated page of effective workspace members.","examples":[{"data":[{"userId":"user-123","email":"jane@example.com","name":"Jane Smith","image":null,"role":"admin","isExternal":false,"joinedAt":"2026-01-15T10:30:00.000Z"}],"nextCursor":null}]},"Resources_V2McpServer":{"type":"object","properties":{"id":{"type":"string","description":"Unique server identifier derived from the workspace and endpoint URL."},"name":{"type":"string","description":"Server display name."},"description":{"description":"Optional server description.","type":"string"},"transport":{"default":"streamable-http","description":"Transport used to communicate with the server.","type":"string","enum":["streamable-http"]},"authType":{"description":"Authentication method used by the server.","type":"string","enum":["none","headers","oauth"]},"url":{"description":"Server endpoint URL.","type":"string"},"timeout":{"description":"Per-request timeout in milliseconds.","type":"number"},"retries":{"description":"Number of retries attempted per request.","type":"number"},"enabled":{"type":"boolean","description":"Whether the server tools are available to workflows."},"connectionStatus":{"description":"Result of the most recent tool connection attempt. New registrations start `disconnected`; re-registration resets this state only when connection inputs change. Authentication probes do not establish a tool connection. Tool discovery updates this state.","type":"string","enum":["connected","disconnected","error"]},"lastError":{"description":"Message from the most recent failed tool connection, or null when absent. Successful discovery or re-registration with changed connection inputs clears it.","anyOf":[{"type":"string"},{"type":"null"}]},"toolCount":{"description":"Number of tools discovered on the server.","type":"number"},"lastToolsRefresh":{"description":"ISO 8601 timestamp of the most recent tool-list refresh.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lastConnected":{"description":"ISO 8601 timestamp of the most recent successful tool connection. Absent until one succeeds, or after re-registration changes connection inputs.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"description":"ISO 8601 timestamp when the server was registered.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"description":"ISO 8601 timestamp when the server was last updated.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"oauthClientId":{"description":"Pre-registered OAuth client identifier, when configured.","type":"string"},"hasHeaders":{"type":"boolean","description":"Whether any request headers are configured."},"headerNames":{"type":"array","items":{"type":"string","description":"Configured header name."},"description":"Names of configured request headers. Header values are never returned."},"hasOauthClientSecret":{"type":"boolean","description":"Whether an OAuth client secret is stored. The value is never returned."}},"required":["id","name","transport","enabled","createdAt","updatedAt","hasHeaders","headerNames","hasOauthClientSecret"],"additionalProperties":false,"title":"MCP server","description":"Public MCP server configuration without write-only credential values."},"Resources_ListMcpServersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2McpServer"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List MCP servers response","description":"MCP servers registered in the workspace.","examples":[{"data":[{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":true,"connectionStatus":"connected","lastError":null,"toolCount":7,"lastToolsRefresh":"2026-06-20T14:02:11.000Z","lastConnected":"2026-06-20T14:02:11.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}],"nextCursor":null}]},"Resources_CreateMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2McpServer"}},"required":["data"],"additionalProperties":false,"title":"Create MCP server response","description":"The registered MCP server without write-only credentials.","examples":[{"data":{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":true,"connectionStatus":"disconnected","lastError":null,"toolCount":0,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}}]},"Resources_CreateMcpServerRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to register the server."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Server display name."},"description":{"description":"Optional server description.","type":"string","maxLength":2000},"transport":{"description":"Transport protocol. Defaults to `streamable-http` on creation.","default":"streamable-http","type":"string","enum":["streamable-http"]},"url":{"type":"string","minLength":1,"maxLength":2048,"description":"Absolute HTTP or HTTPS endpoint URL without `{{ENV_VAR}}` references. It determines server identity and is immutable: delete and recreate the server to change endpoints."},"authType":{"description":"Authentication method. On creation, omission without `headers` probes once: an OAuth challenge selects `oauth`, an unauthenticated success selects `none`, and other outcomes fall back to `headers`. An OAuth client ID selects `oauth` when the method is omitted. Set explicitly to use headers with a server advertising OAuth; adding headers later does not change the saved method.","type":"string","enum":["none","headers","oauth"]},"headers":{"description":"Write-only request headers sent to the server. Replaced wholesale rather than merged on update: sending this field drops every stored header it does not repeat.","writeOnly":true,"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","description":"Header value sent to the MCP server."}},"timeout":{"description":"Per-request timeout in milliseconds. Defaults to 30000 on creation.","default":30000,"type":"integer","minimum":1000,"maximum":300000},"retries":{"description":"Number of retries per request. Defaults to 3 on creation.","default":3,"type":"integer","minimum":0,"maximum":10},"enabled":{"description":"Whether workflows can use the server's tools. Defaults to true on creation.","default":true,"type":"boolean"},"oauthClientId":{"description":"Pre-registered OAuth client identifier. Changing it on update revokes the stored OAuth grant and forces reauthorization.","anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"oauthClientSecret":{"description":"Write-only pre-registered OAuth client secret. Sending it on update as null or a new value revokes the stored OAuth grant and forces reauthorization, as does switching away from OAuth authentication.","writeOnly":true,"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]}},"required":["workspaceId","name","url"],"additionalProperties":false,"title":"Create MCP server request","description":"Configuration for a new MCP server.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"Docs server","url":"https://mcp.example.com/sse","authType":"headers","headers":{"Authorization":"Bearer YOUR_TOKEN"}}]},"Resources_GetMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2McpServer"}},"required":["data"],"additionalProperties":false,"title":"Get MCP server response","description":"One MCP server without write-only credentials.","examples":[{"data":{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":true,"connectionStatus":"connected","lastError":null,"toolCount":7,"lastToolsRefresh":"2026-06-20T14:02:11.000Z","lastConnected":"2026-06-20T14:02:11.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}}]},"Resources_UpdateMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2McpServer"}},"required":["data"],"additionalProperties":false,"title":"Update MCP server response","description":"The updated MCP server.","examples":[{"data":{"id":"mcp-3f7a9c21","name":"Docs server","description":"Internal documentation tools","transport":"streamable-http","authType":"headers","url":"https://mcp.example.com/sse","timeout":30000,"retries":3,"enabled":false,"connectionStatus":"connected","lastError":null,"toolCount":7,"lastToolsRefresh":"2026-06-20T14:02:11.000Z","lastConnected":"2026-06-20T14:02:11.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","hasHeaders":true,"headerNames":["Authorization"],"hasOauthClientSecret":false}}]},"Resources_UpdateMcpServerRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the MCP server."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Server display name."},"description":{"description":"Optional server description.","type":"string","maxLength":2000},"transport":{"description":"Transport protocol. Defaults to `streamable-http` on creation.","default":"streamable-http","type":"string","enum":["streamable-http"]},"url":{"description":"Immutable server URL. When provided, it must equal the current URL; use delete and create to change endpoints.","type":"string","minLength":1,"maxLength":2048},"authType":{"description":"Authentication method. On creation, omission without `headers` probes once: an OAuth challenge selects `oauth`, an unauthenticated success selects `none`, and other outcomes fall back to `headers`. An OAuth client ID selects `oauth` when the method is omitted. Set explicitly to use headers with a server advertising OAuth; adding headers later does not change the saved method.","type":"string","enum":["none","headers","oauth"]},"headers":{"description":"Write-only request headers sent to the server. Replaced wholesale rather than merged on update: sending this field drops every stored header it does not repeat.","writeOnly":true,"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","description":"Header value sent to the MCP server."}},"timeout":{"description":"Per-request timeout in milliseconds. Defaults to 30000 on creation.","default":30000,"type":"integer","minimum":1000,"maximum":300000},"retries":{"description":"Number of retries per request. Defaults to 3 on creation.","default":3,"type":"integer","minimum":0,"maximum":10},"enabled":{"description":"Whether workflows can use the server's tools. Defaults to true on creation.","default":true,"type":"boolean"},"oauthClientId":{"description":"Pre-registered OAuth client identifier. Changing it on update revokes the stored OAuth grant and forces reauthorization.","anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"oauthClientSecret":{"description":"Write-only pre-registered OAuth client secret. Sending it on update as null or a new value revokes the stored OAuth grant and forces reauthorization, as does switching away from OAuth authentication.","writeOnly":true,"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]}},"required":["workspaceId"],"additionalProperties":false,"title":"Update MCP server request","description":"MCP server fields to change; omitted fields retain their stored values.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","enabled":false}]},"Resources_V2McpServerDeleteData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted MCP server."},"deleted":{"type":"boolean","const":true,"description":"Whether the server was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete MCP server data","description":"MCP server deletion acknowledgement."},"Resources_DeleteMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2McpServerDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Delete MCP server response","description":"Acknowledgement that the MCP server was deleted.","examples":[{"data":{"id":"mcp-3f7a9c21","deleted":true}}]},"Resources_V2McpTool":{"type":"object","properties":{"name":{"type":"string","description":"Tool name, as the MCP server reports it."},"description":{"description":"Tool description reported by the server.","type":"string"},"inputSchema":{"type":"object","properties":{"type":{"type":"string","const":"object","description":"JSON Schema type of the argument object. MCP requires `object`."},"properties":{"description":"Argument schemas keyed by argument name.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Server-defined JSON Schema for one tool argument."}},"required":{"description":"Names of the arguments the tool requires.","type":"array","items":{"type":"string","description":"Name of a required argument."}}},"required":["type"],"additionalProperties":{"description":"Additional JSON Schema keyword reported by the server."},"description":"JSON Schema for the tool's arguments, as reported by the server."},"serverId":{"type":"string","description":"Identifier of the MCP server exposing the tool."},"serverName":{"type":"string","description":"Display name of the MCP server exposing the tool."}},"required":["name","inputSchema","serverId","serverName"],"additionalProperties":false,"title":"MCP tool","description":"A tool exposed by a registered MCP server."},"Resources_ListMcpServerToolsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2McpTool"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List MCP server tools response","description":"Tools discovered so far. Limits or later-page failures can leave the inventory incomplete; the response has no truncation indicator or pagination.","examples":[{"data":[{"name":"search_docs","description":"Search the internal documentation","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Search terms"}},"required":["query"]},"serverId":"mcp-3f7a9c21","serverName":"Docs server"}],"nextCursor":null}]},"Resources_V2SkillSummary":{"type":"object","properties":{"id":{"type":"string","description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."},"name":{"type":"string","description":"Kebab-case name that agents use to reference the skill."},"description":{"type":"string","description":"One-line summary of when the skill applies."},"readOnly":{"type":"boolean","description":"Whether this is a built-in skill that cannot be modified or deleted."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the skill was created. Built-in skills report the Unix epoch."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the skill was last updated. Built-in skills report the Unix epoch."}},"required":["id","name","description","readOnly","createdAt","updatedAt"],"additionalProperties":false,"title":"Skill summary","description":"Public summary metadata for a workspace or built-in skill."},"Resources_ListSkillsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2SkillSummary"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List skills response","description":"Skill summaries available in the workspace.","examples":[{"data":[{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"How support should handle refund requests","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}]},"Resources_V2Skill":{"type":"object","properties":{"id":{"type":"string","description":"Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`."},"name":{"type":"string","description":"Kebab-case name that agents use to reference the skill."},"description":{"type":"string","description":"One-line summary of when the skill applies."},"readOnly":{"type":"boolean","description":"Whether this is a built-in skill that cannot be modified or deleted."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the skill was created. Built-in skills report the Unix epoch."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the skill was last updated. Built-in skills report the Unix epoch."},"content":{"type":"string","description":"Skill body containing the instructions given to the agent."}},"required":["id","name","description","readOnly","createdAt","updatedAt","content"],"additionalProperties":false,"title":"Skill","description":"A workspace or built-in skill including its instruction body."},"Resources_CreateSkillResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Skill"}},"required":["data"],"additionalProperties":false,"title":"Create skill response","description":"The created skill including its content.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"How support should handle refund requests","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","content":"# Refund policy\n\nAlways check the order date first."}}]},"Resources_CreateSkillRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the skill."},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Kebab-case name, unique within the workspace and not reserved by a built-in skill."},"description":{"type":"string","minLength":1,"maxLength":1024,"description":"One-line summary of when the skill applies."},"content":{"type":"string","minLength":1,"maxLength":50000,"description":"Skill body containing the instructions given to the agent."}},"required":["workspaceId","name","description","content"],"additionalProperties":false,"title":"Create skill request","description":"Definition of a new skill.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"refund-policy","description":"How support should handle refund requests","content":"# Refund policy\n\nAlways check the order date first."}]},"Resources_GetSkillResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Skill"}},"required":["data"],"additionalProperties":false,"title":"Get skill response","description":"One skill including its full content.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"How support should handle refund requests","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","content":"# Refund policy\n\nAlways check the order date first."}}]},"Resources_UpdateSkillResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Skill"}},"required":["data"],"additionalProperties":false,"title":"Update skill response","description":"The updated skill including its full content.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"refund-policy","description":"Updated refund guidance","readOnly":false,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z","content":"# Refund policy\n\nAlways check the order date first."}}]},"Resources_UpdateSkillRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."},"name":{"description":"New kebab-case skill name.","type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"description":{"description":"New one-line summary of when the skill applies.","type":"string","minLength":1,"maxLength":1024},"content":{"description":"Replacement skill body.","type":"string","minLength":1,"maxLength":50000}},"required":["workspaceId"],"additionalProperties":false,"title":"Update skill request","description":"Skill fields to change; at least one editable field is required.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","description":"Updated refund guidance"}]},"Resources_V2SkillDeleteData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted skill."},"deleted":{"type":"boolean","const":true,"description":"Whether the skill was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete skill data","description":"Skill deletion acknowledgement."},"Resources_DeleteSkillResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2SkillDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Delete skill response","description":"Acknowledgement that the skill was deleted.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","deleted":true}}]},"Resources_V2SkillEditor":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email address of the skill editor."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the skill editor."},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Profile image URL of the skill editor."},"isWorkspaceAdmin":{"type":"boolean","description":"Whether editor access is derived from workspace administration."}},"required":["email","name","image","isWorkspaceAdmin"],"additionalProperties":false,"title":"Skill editor","description":"Public identity fields for a user who can edit a skill."},"Resources_ListSkillEditorsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2SkillEditor"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List skill editors response","description":"Identity fields for users who can edit the skill.","examples":[{"data":[{"email":"jane@example.com","name":"Jane Smith","image":null,"isWorkspaceAdmin":false}],"nextCursor":null}]},"Resources_GrantSkillEditorResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2SkillEditor"}},"required":["data"],"additionalProperties":false,"title":"Grant skill editor response","description":"Identity fields for the editor.","examples":[{"data":{"email":"jane@example.com","name":"Jane Smith","image":null,"isWorkspaceAdmin":false}}]},"Resources_GrantSkillEditorRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the skill."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email address of a current workspace member."}},"required":["workspaceId","email"],"additionalProperties":false,"title":"Grant skill editor request","description":"Workspace scope and email of the member to grant.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","email":"jane@example.com"}]},"Resources_V2SkillEditorDeleteData":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email address whose explicit editor grant was revoked."},"revoked":{"type":"boolean","const":true,"description":"Whether the explicit editor grant was revoked."}},"required":["email","revoked"],"additionalProperties":false,"title":"Revoke skill editor data","description":"Skill editor revocation acknowledgement."},"Resources_RevokeSkillEditorResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2SkillEditorDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Revoke skill editor response","description":"Acknowledgement that the explicit editor grant was revoked.","examples":[{"data":{"email":"jane@example.com","revoked":true}}]},"Resources_V2CustomTool":{"type":"object","properties":{"id":{"type":"string","description":"Unique custom tool identifier."},"title":{"type":"string","description":"Display title, unique within the workspace."},"schema":{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Function declaration discriminator."},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Function name presented to the model."},"description":{"description":"Optional explanation of what the function does.","type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","description":"JSON Schema type for the arguments, usually `object`."},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Caller-defined JSON Schema for one tool argument."},"description":"Caller-defined argument schemas keyed by argument name."},"required":{"description":"Names of required arguments.","type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"JSON Schema describing the arguments accepted by the tool."}},"required":["name","parameters"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"OpenAI-style function definition."}},"required":["type","function"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"OpenAI-style function declaration describing the callable tool surface."},"code":{"type":"string","description":"Tool implementation executed in the sandboxed function runtime."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the tool was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the tool was last updated."}},"required":["id","title","schema","code","createdAt","updatedAt"],"additionalProperties":false,"title":"Custom tool","description":"A workspace custom tool and its callable function declaration."},"Resources_ListCustomToolsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2CustomTool"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List custom tools response","description":"Custom tools defined in the workspace.","examples":[{"data":[{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}]},"Resources_CreateCustomToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2CustomTool"}},"required":["data"],"additionalProperties":false,"title":"Create custom tool response","description":"The created custom tool.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_CreateCustomToolRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the custom tool."},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Display title, unique within the workspace."},"schema":{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Function declaration discriminator."},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Function name presented to the model."},"description":{"description":"Optional explanation of what the function does.","type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","description":"JSON Schema type for the arguments, usually `object`."},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Caller-defined JSON Schema for one tool argument."},"description":"Caller-defined argument schemas keyed by argument name."},"required":{"description":"Names of required arguments.","type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"JSON Schema describing the arguments accepted by the tool."}},"required":["name","parameters"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"OpenAI-style function definition."}},"required":["type","function"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"OpenAI-style function declaration describing the callable tool surface."},"code":{"type":"string","maxLength":100000,"description":"Tool implementation executed in the sandboxed function runtime."}},"required":["workspaceId","title","schema","code"],"additionalProperties":false,"title":"Create custom tool request","description":"Definition and implementation of a new custom tool.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }"}]},"Resources_GetCustomToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2CustomTool"}},"required":["data"],"additionalProperties":false,"title":"Get custom tool response","description":"One custom tool.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: true }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_UpdateCustomToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2CustomTool"}},"required":["data"],"additionalProperties":false,"title":"Update custom tool response","description":"The updated custom tool.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","title":"lookup_order","schema":{"type":"function","function":{"name":"lookup_order","description":"Look up an order by id","parameters":{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}},"code":"return { ok: false }","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_UpdateCustomToolRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the custom tool."},"title":{"description":"New display title for the tool.","type":"string","minLength":1,"maxLength":200},"schema":{"description":"Replacement function declaration.","type":"object","properties":{"type":{"type":"string","const":"function","description":"Function declaration discriminator."},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Function name presented to the model."},"description":{"description":"Optional explanation of what the function does.","type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","description":"JSON Schema type for the arguments, usually `object`."},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Caller-defined JSON Schema for one tool argument."},"description":"Caller-defined argument schemas keyed by argument name."},"required":{"description":"Names of required arguments.","type":"array","items":{"type":"string"}}},"required":["type","properties"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"JSON Schema describing the arguments accepted by the tool."}},"required":["name","parameters"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."},"description":"OpenAI-style function definition."}},"required":["type","function"],"additionalProperties":{"description":"Caller-defined extension value preserved by the public API."}},"code":{"description":"Replacement tool implementation.","type":"string","maxLength":100000}},"required":["workspaceId"],"additionalProperties":false,"title":"Update custom tool request","description":"Custom tool fields to change; at least one editable field is required.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","code":"return { ok: false }"}]},"Resources_V2CustomToolDeleteData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted custom tool."},"deleted":{"type":"boolean","const":true,"description":"Whether the custom tool was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete custom tool data","description":"Custom tool deletion acknowledgement."},"Resources_DeleteCustomToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2CustomToolDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Delete custom tool response","description":"Acknowledgement that the custom tool was deleted.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","deleted":true}}]},"Resources_V2Sandbox":{"type":"object","properties":{"id":{"type":"string","description":"Unique sandbox identifier."},"name":{"type":"string","description":"Display name, unique within the workspace."},"language":{"type":"string","enum":["javascript","python"],"description":"Dependency ecosystem: `javascript` installs from npm, `python` from PyPI."},"dependencies":{"type":"array","items":{"type":"string"},"description":"Package specifiers installed into the sandbox, one per entry."},"cliTools":{"type":"array","items":{"type":"string","enum":["google-cloud-cli@577.0.0-r1","aws-cli@2.36.15-r1","azure-cli@2.89.0-r1","doctl@1.166.0-r1","github-cli@2.97.0-r1","gitlab-cli@1.111.0-r1","kubectl@1.36.3-r1","helm@4.2.3-r1","kustomize@5.8.1-r1","argocd@3.4.6-r1","terraform@1.15.8-r1","pulumi@3.255.0-r1","supabase-cli@2.111.0-r1","firebase-cli@15.25.1-r1","flyctl@0.4.78-r1","railway-cli@5.30.4-r1","stripe-cli@1.45.0-r1","duckdb@1.5.5-r1","rclone@1.75.0-r1","restic@0.19.1-r1","minio-mc@RELEASE.2025-08-13T08-35-41Z-r1","mongosh@2.9.2-r1","sops@3.13.3-r1","age@1.3.1-r1"]},"description":"Pinned managed CLI ids installed into the sandbox, at most 10, no duplicates."},"systemPackages":{"type":"array","items":{"type":"string"},"description":"Debian packages installed into the sandbox, one per entry."},"buildStatus":{"anyOf":[{"type":"string","enum":["pending","building","ready","failed"]},{"type":"null"}],"description":"Image build state. `null` when the deployment installs dependencies at run time and has nothing to build."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Classified build failure code, or `null`."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable build failure summary, or `null`."},"errorDetail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tail of the installer log for a failed build, or `null`."},"builtAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the current image finished building, or `null`."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the sandbox was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the sandbox was last updated."}},"required":["id","name","language","dependencies","cliTools","systemPackages","buildStatus","errorCode","errorMessage","errorDetail","builtAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Sandbox","description":"A workspace sandbox: a reusable dependency set that Function blocks execute against."},"Resources_ListSandboxesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2Sandbox"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List sandboxes response","description":"Sandboxes defined in the workspace.","examples":[{"data":[{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"ready","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":"2026-06-20T14:05:40.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}]},"Resources_CreateSandboxResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Sandbox"}},"required":["data"],"additionalProperties":false,"title":"Create sandbox response","description":"The created sandbox. `buildStatus` is `pending` while an image builds and `null` where nothing is built.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"pending","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":null,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_CreateSandboxRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the sandbox."},"name":{"type":"string","minLength":1,"maxLength":64,"description":"Display name, unique within the workspace; 1 to 64 characters."},"language":{"type":"string","enum":["javascript","python"],"description":"Dependency ecosystem: `javascript` installs from npm, `python` from PyPI."},"dependencies":{"default":[],"description":"Package specifiers installed into the sandbox, one per entry.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":2000}},"cliTools":{"default":[],"description":"Pinned managed CLI ids installed into the sandbox, at most 10, no duplicates.","maxItems":10,"type":"array","items":{"type":"string","enum":["google-cloud-cli@577.0.0-r1","aws-cli@2.36.15-r1","azure-cli@2.89.0-r1","doctl@1.166.0-r1","github-cli@2.97.0-r1","gitlab-cli@1.111.0-r1","kubectl@1.36.3-r1","helm@4.2.3-r1","kustomize@5.8.1-r1","argocd@3.4.6-r1","terraform@1.15.8-r1","pulumi@3.255.0-r1","supabase-cli@2.111.0-r1","firebase-cli@15.25.1-r1","flyctl@0.4.78-r1","railway-cli@5.30.4-r1","stripe-cli@1.45.0-r1","duckdb@1.5.5-r1","rclone@1.75.0-r1","restic@0.19.1-r1","minio-mc@RELEASE.2025-08-13T08-35-41Z-r1","mongosh@2.9.2-r1","sops@3.13.3-r1","age@1.3.1-r1"]}},"systemPackages":{"default":[],"description":"Debian packages installed into the sandbox, one per entry.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":2000}}},"required":["workspaceId","name","language"],"additionalProperties":false,"title":"Create sandbox request","description":"Name, language, and dependency set of a new sandbox.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"systemPackages":["graphviz"]}]},"Resources_GetSandboxResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Sandbox"}},"required":["data"],"additionalProperties":false,"title":"Get sandbox response","description":"One sandbox.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"ready","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":"2026-06-20T14:05:40.000Z","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_UpdateSandboxResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Sandbox"}},"required":["data"],"additionalProperties":false,"title":"Update sandbox response","description":"The updated sandbox. `buildStatus` is `pending` while an image rebuilds and `null` where nothing is built.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","name":"data-tools","language":"python","dependencies":["pandas==2.2.2","requests","pyarrow"],"cliTools":[],"systemPackages":["graphviz"],"buildStatus":"pending","errorCode":null,"errorMessage":null,"errorDetail":null,"builtAt":null,"createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_UpdateSandboxRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that owns the sandbox."},"name":{"description":"New display name, unique within the workspace; 1 to 64 characters.","type":"string","minLength":1,"maxLength":64},"language":{"description":"Replacement dependency ecosystem. The whole spec is revalidated against it, so a Python dependency list does not survive a switch to JavaScript.","type":"string","enum":["javascript","python"]},"dependencies":{"description":"Replacement package list; replaces the whole list.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":2000}},"cliTools":{"description":"Replacement managed CLI list; replaces the whole list.","maxItems":10,"type":"array","items":{"type":"string","enum":["google-cloud-cli@577.0.0-r1","aws-cli@2.36.15-r1","azure-cli@2.89.0-r1","doctl@1.166.0-r1","github-cli@2.97.0-r1","gitlab-cli@1.111.0-r1","kubectl@1.36.3-r1","helm@4.2.3-r1","kustomize@5.8.1-r1","argocd@3.4.6-r1","terraform@1.15.8-r1","pulumi@3.255.0-r1","supabase-cli@2.111.0-r1","firebase-cli@15.25.1-r1","flyctl@0.4.78-r1","railway-cli@5.30.4-r1","stripe-cli@1.45.0-r1","duckdb@1.5.5-r1","rclone@1.75.0-r1","restic@0.19.1-r1","minio-mc@RELEASE.2025-08-13T08-35-41Z-r1","mongosh@2.9.2-r1","sops@3.13.3-r1","age@1.3.1-r1"]}},"systemPackages":{"description":"Replacement Debian package list; replaces the whole list.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":2000}}},"required":["workspaceId"],"additionalProperties":false,"title":"Update sandbox request","description":"Sandbox fields to change; at least one editable field is required.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","dependencies":["pandas==2.2.2","requests","pyarrow"]}]},"Resources_V2SandboxDeleteData":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted sandbox."},"deleted":{"type":"boolean","const":true,"description":"Whether the sandbox was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete sandbox data","description":"Sandbox deletion acknowledgement."},"Resources_DeleteSandboxResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2SandboxDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Delete sandbox response","description":"Acknowledgement that the sandbox was deleted.","examples":[{"data":{"id":"V1StGXR8Z5jdHi6BmyT","deleted":true}}]},"Resources_V2Credential":{"type":"object","properties":{"id":{"type":"string","description":"Unique credential identifier."},"type":{"type":"string","enum":["oauth","service_account"],"description":"Authenticated connection type."},"displayName":{"type":"string","description":"Credential display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional credential description."},"providerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration provider authenticated by this credential."},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Linked account identifier for OAuth credentials."},"hasServiceAccountKey":{"type":"boolean","description":"Whether a service-account payload is stored. Its contents are never returned."},"role":{"type":"string","enum":["admin","member"],"description":"Caller role for the credential."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the credential was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the credential was last updated."}},"required":["id","type","displayName","description","providerId","accountId","hasServiceAccountKey","role","createdAt","updatedAt"],"additionalProperties":false,"title":"Credential","description":"Public authenticated-connection metadata without secret material."},"Resources_ListCredentialsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2Credential"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List credentials response","description":"Credential metadata visible to the caller.","examples":[{"data":[{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}],"nextCursor":null}]},"Resources_V2CredentialProvider":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"oauth","description":"Browser-based OAuth connection method."},"serviceId":{"type":"string","minLength":1,"maxLength":255,"description":"Stable credential-provider identifier."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Credential provider display name."},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Credential provider description."},"providerFamily":{"type":"string","minLength":1,"maxLength":255,"description":"Owning provider family identifier."},"available":{"type":"boolean","description":"Whether this caller can connect the provider in the current deployment."},"supportsReconnect":{"type":"boolean","description":"Whether existing credentials for this service can be reconnected."},"authorizationOptions":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":255,"description":"Exact OAuth provider identifier accepted by the connection endpoint."},"label":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable authorization-server label."}},"required":["providerId","label"],"additionalProperties":false},"description":"Authorization servers available for this OAuth service."},"fields":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255,"description":"Exact create-body field name."},"label":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable field label."},"placeholder":{"type":"string","minLength":1,"maxLength":1000,"description":"Suggested input placeholder."},"required":{"type":"boolean","description":"Whether the field is required for the selected flow."},"secret":{"type":"boolean","description":"Whether the submitted field is write-only secret material."},"multiline":{"type":"boolean","description":"Whether the field is intended for multi-line input."},"requiredForAuthMethods":{"description":"Authentication methods for which this field is required.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"options":{"description":"Fixed values accepted by a selector field.","minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":255,"description":"Submitted option value."},"label":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable option label."}},"required":["value","label"],"additionalProperties":false}},"hint":{"description":"Provider-specific setup guidance.","type":"string","minLength":1,"maxLength":2000}},"required":["id","label","placeholder","required","secret","multiline"],"additionalProperties":false},"description":"Write-only setup fields required before starting this OAuth flow."}},"required":["type","serviceId","name","description","providerFamily","available","supportsReconnect","authorizationOptions","fields"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"service_account","description":"Direct service-account credential method."},"serviceId":{"type":"string","minLength":1,"maxLength":255,"description":"Stable credential-provider identifier."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Credential provider display name."},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Credential provider description."},"providerFamily":{"type":"string","minLength":1,"maxLength":255,"description":"Owning provider family identifier."},"available":{"type":"boolean","description":"Whether this caller can connect the provider in the current deployment."},"providerId":{"type":"string","minLength":1,"maxLength":255,"description":"Exact service-account provider ID accepted by credential creation."},"docsUrl":{"type":"string","format":"uri","description":"Setup guide for the provider."},"helpText":{"description":"Provider-specific setup guidance.","type":"string","minLength":1,"maxLength":2000},"requiresClientGeneratedCredentialId":{"type":"boolean","description":"Whether the caller must generate and submit the credential ID before setup. False for every provider: credential creation mints an ID when none is supplied, and a Slack custom bot may still send one to configure its Request URL ahead of time."},"fields":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255,"description":"Exact create-body field name."},"label":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable field label."},"placeholder":{"type":"string","minLength":1,"maxLength":1000,"description":"Suggested input placeholder."},"required":{"type":"boolean","description":"Whether the field is required for the selected flow."},"secret":{"type":"boolean","description":"Whether the submitted field is write-only secret material."},"multiline":{"type":"boolean","description":"Whether the field is intended for multi-line input."},"requiredForAuthMethods":{"description":"Authentication methods for which this field is required.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"options":{"description":"Fixed values accepted by a selector field.","minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":255,"description":"Submitted option value."},"label":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable option label."}},"required":["value","label"],"additionalProperties":false}},"hint":{"description":"Provider-specific setup guidance.","type":"string","minLength":1,"maxLength":2000}},"required":["id","label","placeholder","required","secret","multiline"],"additionalProperties":false},"description":"Create-body fields accepted by this provider. Secret fields are write-only."}},"required":["type","serviceId","name","description","providerFamily","available","providerId","docsUrl","requiresClientGeneratedCredentialId","fields"],"additionalProperties":false}],"title":"Credential provider","description":"An OAuth or service-account connection method available to a workspace."},"Resources_ListCredentialProvidersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2CredentialProvider"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List credential providers response","description":"OAuth and service-account connection methods.","examples":[{"data":[{"type":"oauth","serviceId":"salesforce","name":"Salesforce","description":"Connect to Salesforce CRM data and operations.","providerFamily":"salesforce","available":true,"supportsReconnect":true,"fields":[],"authorizationOptions":[{"providerId":"salesforce","label":"Production"},{"providerId":"salesforce-sandbox","label":"Sandbox"}]},{"type":"service_account","serviceId":"zoom-service-account","providerId":"zoom-service-account","name":"Zoom server-to-server app","description":"Connect Zoom with a server-to-server app.","providerFamily":"zoom","available":true,"docsUrl":"https://docs.sim.ai/integrations/zoom-service-account","requiresClientGeneratedCredentialId":false,"fields":[{"id":"clientId","label":"Client ID","placeholder":"Paste the client ID","required":true,"secret":false,"multiline":false},{"id":"clientSecret","label":"Client secret","placeholder":"Paste the client secret","required":true,"secret":true,"multiline":false},{"id":"orgId","label":"Account ID","placeholder":"Paste the account ID","required":true,"secret":false,"multiline":false}]}],"nextCursor":null}]},"Resources_CreateServiceAccountCredentialResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Credential"}},"required":["data"],"additionalProperties":false,"title":"Create service-account credential response","description":"Verified credential metadata without secret material.","examples":[{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_CreateServiceAccountCredentialRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that will own the credential."},"type":{"type":"string","const":"service_account","description":"Service-account credential discriminator."},"providerId":{"type":"string","minLength":1,"maxLength":255,"description":"Exact service-account provider ID returned by provider discovery."},"displayName":{"description":"Optional name; providers may derive one from the verified account identity.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Optional credential description.","type":"string","maxLength":500},"id":{"description":"Optional client-generated credential ID. The server mints one when it is omitted, so no provider requires it. A `slack-custom-bot` credential may supply one so its Slack Request URL, which embeds the ID, can be configured before the credential exists; every other provider ignores it.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"credentials":{"type":"string","minLength":1,"maxLength":4325376,"description":"Write-only JSON object string containing the fields declared by credential-provider discovery.","writeOnly":true}},"required":["workspaceId","type","providerId","credentials"],"additionalProperties":false,"title":"Create service-account credential request","description":"Provider identifier, optional display metadata, and a write-only JSON object string containing the fields declared by provider discovery."},"Resources_V2CredentialConnectionAuthorization":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri","description":"Short-lived Sim browser URL that starts the OAuth authorization flow."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the connection link expires."}},"required":["authorizationUrl","expiresAt"],"additionalProperties":false,"title":"Credential connection authorization","description":"A short-lived browser entrypoint for an OAuth connection flow."},"Resources_CreateCredentialConnectionResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2CredentialConnectionAuthorization"}},"required":["data"],"additionalProperties":false,"title":"Create credential connection response","description":"Short-lived Sim browser entrypoint and its expiry.","examples":[{"data":{"authorizationUrl":"https://www.sim.ai/api/auth/oauth2/authorize?draftId=draft-123","expiresAt":"2026-06-20T14:17:11.000Z"}}]},"Resources_CreateCredentialConnectionBody":{"anyOf":[{"anyOf":[{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that will own the credential."},"displayName":{"type":"string","minLength":1,"maxLength":255,"description":"Name shown for the new credential in Sim."},"providerId":{"type":"string","const":"quickbooks","description":"QuickBooks OAuth provider ID returned by credential-provider discovery."},"oauthClientConfig":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":255,"description":"Client ID for the caller-managed Intuit OAuth application."},"clientSecret":{"type":"string","minLength":1,"maxLength":512,"description":"Write-only client secret for the caller-managed Intuit OAuth application.","writeOnly":true},"environment":{"type":"string","enum":["sandbox","production"],"description":"Intuit company environment used for authorization and API requests."},"webhookVerifierToken":{"type":"string","minLength":1,"maxLength":512,"description":"Write-only verifier token for webhook signatures from the caller-managed app.","writeOnly":true}},"required":["clientId","clientSecret","environment","webhookVerifierToken"],"additionalProperties":false,"description":"Write-only caller-managed Intuit OAuth app configuration."}},"required":["workspaceId","displayName","providerId","oauthClientConfig"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace that will own the credential."},"displayName":{"type":"string","minLength":1,"maxLength":255,"description":"Name shown for the new credential in Sim."},"providerId":{"type":"string","enum":["github-repositories","google-email","google-drive","google-docs","google-sheets","google-forms","google-calendar","google-contacts","google-ads","google-bigquery","google-tasks","google-vault","google-groups","google-chat","google-meet","vertex-ai","microsoft-ad","microsoft-dataverse","microsoft-excel","microsoft-intune","microsoft-planner","microsoft-powerbi","microsoft-teams","microsoft-word","outlook","onedrive","sharepoint","x","tiktok","confluence","jira","airtable","bitbucket","notion","clickup","linear","manageengine-sdp","monday","box","dropbox","shopify","slack","reddit","wealthbox","webflow","trello","asana","attio","calcom","docusign","pipedrive","ramp","hubspot","linkedin","instagram","salesforce","salesforce-sandbox","zoho-desk","zoom","wordpress","spotify"],"description":"Exact OAuth provider ID returned by credential-provider discovery."}},"required":["workspaceId","displayName","providerId"],"additionalProperties":false}]},{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace expected to own the credential."},"credentialId":{"type":"string","minLength":1,"maxLength":255,"description":"Existing OAuth credential to reconnect in place. QuickBooks reconnects also require oauthClientConfig with the Intuit client ID, client secret, environment, and webhook verifier token."},"oauthClientConfig":{"description":"Write-only Intuit OAuth app configuration. Required when credentialId identifies a QuickBooks credential; omit it for other providers.","type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":255,"description":"Client ID for the caller-managed Intuit OAuth application."},"clientSecret":{"type":"string","minLength":1,"maxLength":512,"description":"Write-only client secret for the caller-managed Intuit OAuth application.","writeOnly":true},"environment":{"type":"string","enum":["sandbox","production"],"description":"Intuit company environment used for authorization and API requests."},"webhookVerifierToken":{"type":"string","minLength":1,"maxLength":512,"description":"Write-only verifier token for webhook signatures from the caller-managed app.","writeOnly":true}},"required":["clientId","clientSecret","environment","webhookVerifierToken"],"additionalProperties":false}},"required":["workspaceId","credentialId"],"additionalProperties":false}],"title":"Create credential connection body","description":"Provide workspaceId for every flow. For a new connection, send providerId and displayName; for a reconnect, send credentialId and retain the existing name. QuickBooks also requires oauthClientConfig for either flow; omit it for other providers.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","providerId":"slack","displayName":"Support Slack"},{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","credentialId":"7c9e6679-7425-40de-944b-e07fc1f90ae7"},{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","providerId":"quickbooks","displayName":"Accounting","oauthClientConfig":{"clientId":"YOUR_INTUIT_CLIENT_ID","clientSecret":"YOUR_INTUIT_CLIENT_SECRET","environment":"sandbox","webhookVerifierToken":"YOUR_WEBHOOK_VERIFIER_TOKEN"}}]},"Resources_V2CredentialDeleteData":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Disconnected credential identifier."},"deleted":{"type":"boolean","const":true,"description":"Whether the credential was disconnected."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete credential data","description":"Credential disconnection acknowledgement."},"Resources_DeleteCredentialResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2CredentialDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Disconnect credential response","description":"Acknowledgement that the credential was disconnected.","examples":[{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","deleted":true}}]},"Resources_V2SecretWithValue":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_]+$","description":"Secret name containing only letters, numbers, and underscores."},"scope":{"type":"string","enum":["workspace","personal"],"description":"Whether the secret belongs to the workspace or to the caller. A personal secret belongs to the caller across every workspace, not to one workspace."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the secret is for, as set on the workspace secret. Always null for a personal secret, which has no shared audience."},"unredacted":{"type":"boolean","description":"Whether the workspace secret opts out of redaction, so its value appears in plaintext in run logs and model-visible content. Always false for a personal secret."},"role":{"type":"string","enum":["admin","member"],"description":"Caller role for the secret."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the secret was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the secret was last updated."},"value":{"description":"The stored secret value. Present only when the workspace secret is marked visible (unredacted); omitted for every other secret.","type":"string"}},"required":["name","scope","description","unredacted","role","createdAt","updatedAt"],"additionalProperties":false,"title":"Secret metadata with visible value","description":"Secret metadata; the stored value is included only for a workspace secret marked visible (unredacted)."},"Resources_ListSecretsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2SecretWithValue"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List secrets response","description":"Secret metadata visible to the caller; visible (unredacted) workspace secrets carry their value.","examples":[{"data":[{"name":"STRIPE_API_KEY","scope":"workspace","description":"Production billing key — rotate quarterly.","unredacted":false,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"},{"name":"STAGING_BASE_URL","scope":"workspace","description":"Staging environment base URL.","unredacted":true,"role":"member","createdAt":"2026-06-03T11:30:00.000Z","updatedAt":"2026-06-21T08:45:09.000Z","value":"https://staging.example.com"}],"nextCursor":null}]},"Resources_V2Secret":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_]+$","description":"Secret name containing only letters, numbers, and underscores."},"scope":{"type":"string","enum":["workspace","personal"],"description":"Whether the secret belongs to the workspace or to the caller. A personal secret belongs to the caller across every workspace, not to one workspace."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the secret is for, as set on the workspace secret. Always null for a personal secret, which has no shared audience."},"unredacted":{"type":"boolean","description":"Whether the workspace secret opts out of redaction, so its value appears in plaintext in run logs and model-visible content. Always false for a personal secret."},"role":{"type":"string","enum":["admin","member"],"description":"Caller role for the secret."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the secret was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 timestamp when the secret was last updated."}},"required":["name","scope","description","unredacted","role","createdAt","updatedAt"],"additionalProperties":false,"title":"Secret metadata","description":"Secret metadata without the stored value."},"Resources_SetSecretResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Secret"}},"required":["data"],"additionalProperties":false,"title":"Set secret response","description":"Metadata for the created or replaced secret without its value.","examples":[{"data":{"name":"STRIPE_API_KEY","scope":"workspace","description":"Production billing key — rotate quarterly.","unredacted":false,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_SetSecretRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace the request is authorized against. A workspace secret is written to it; a personal secret is written to the caller and is available in all of their workspaces."},"scope":{"type":"string","enum":["workspace","personal"],"description":"Whether the secret belongs to the workspace or to the caller. A personal secret belongs to the caller across every workspace, not to one workspace."},"value":{"description":"Secret value, omitted from the Set secret response. For an existing workspace secret, omit it to change only `description` or `unredacted`. Personal secrets always require a value and accept no writable metadata.","writeOnly":true,"type":"string","minLength":1,"maxLength":65536},"description":{"description":"What the secret is for, shown to teammates. Workspace scope only — sending it for a personal secret is rejected. Omit it to leave an existing description untouched; send null or an empty string to clear one.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"unredacted":{"description":"Opt the workspace secret out of redaction: its value then appears in plaintext in run logs, model-visible content, and files, including publicly shared log links. Workspace scope only — sending it for a personal secret is rejected. Omit it to leave the current setting untouched.","type":"boolean"}},"required":["workspaceId","scope"],"additionalProperties":false,"title":"Set secret request","description":"Ownership scope and write-only value for the secret. A workspace secret may instead send description or unredacted alone, without a value.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","scope":"workspace","value":"YOUR_SECRET_VALUE"},{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","scope":"workspace","unredacted":false}]},"Resources_V2SecretDeleteData":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_]+$","description":"Secret name containing only letters, numbers, and underscores."},"scope":{"type":"string","enum":["workspace","personal"],"description":"Whether the secret belongs to the workspace or to the caller. A personal secret belongs to the caller across every workspace, not to one workspace."},"deleted":{"type":"boolean","const":true,"description":"Whether the secret was deleted."}},"required":["name","scope","deleted"],"additionalProperties":false,"title":"Delete secret data","description":"Secret deletion acknowledgement without the stored value."},"Resources_DeleteSecretResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2SecretDeleteData"}},"required":["data"],"additionalProperties":false,"title":"Delete secret response","description":"Acknowledgement that the secret was deleted.","examples":[{"data":{"name":"STRIPE_API_KEY","scope":"workspace","deleted":true}}]},"Resources_V2Meta":{"type":"object","properties":{"v2Enabled":{"type":"boolean","description":"Whether this API version is available. This is true when the endpoint is served."},"keyType":{"type":"string","enum":["personal","workspace","oauth_access_token"],"description":"Calling credential kind: a personal API key acting for its owner, a key bound to one workspace, or an OAuth access token acting for its user within granted scopes. Resource permissions and credential policies still apply."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"ISO 8601 timestamp when the calling credential expires, or null when it does not."}},"required":["v2Enabled","keyType","expiresAt"],"additionalProperties":false,"title":"API status","description":"API availability and lifecycle facts about the calling credential."},"Resources_GetApiMetaResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Meta"}},"required":["data"],"additionalProperties":false,"title":"API status response","description":"API availability, credential type, and expiry for the caller.","examples":[{"data":{"v2Enabled":true,"keyType":"personal","expiresAt":null}}]},"Resources_WorkflowMcpServerListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow-MCP server identifier."},"name":{"type":"string","description":"Server display name, shown to connecting MCP clients."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional server description, or null when unset."},"isPublic":{"type":"boolean","description":"Whether the server answers MCP clients without a Sim API key."},"mcpServerUrl":{"type":"string","description":"MCP client endpoint. Use this returned URL instead of constructing one.","examples":["https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2"]},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the server was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the server was last modified.","format":"date-time"},"toolCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of returned tool names for this server. It may undercount registrations when the page’s `toolNamesTruncated` flag is true."},"toolNames":{"type":"array","items":{"type":"string"},"description":"Returned registered tool names, ordered alphabetically. The list may be incomplete when toolNamesTruncated is true."}},"required":["id","name","description","isPublic","mcpServerUrl","createdAt","updatedAt","toolCount","toolNames"],"additionalProperties":false,"title":"Workflow MCP server list item","description":"A workflow MCP server and its bounded tool-name inventory."},"Resources_ListWorkflowMcpServersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_WorkflowMcpServerListItem"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."},"toolNamesTruncated":{"type":"boolean","description":"Whether the page-wide tool-name limit left some inventories incomplete. Use List workflow MCP tools for one server and check its `truncated` flag before treating the inventory as complete. `nextCursor` paginates servers, not tool names."}},"required":["data","nextCursor","toolNamesTruncated"],"additionalProperties":false,"title":"List workflow MCP servers response","description":"A page of workflow MCP servers with bounded tool-name inventories.","examples":[{"data":[{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":false,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z","toolCount":1,"toolNames":["triage_ticket"]}],"nextCursor":null,"toolNamesTruncated":false}]},"Resources_WorkflowMcpServer":{"type":"object","properties":{"id":{"type":"string","description":"Unique workflow-MCP server identifier."},"name":{"type":"string","description":"Server display name, shown to connecting MCP clients."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional server description, or null when unset."},"isPublic":{"type":"boolean","description":"Whether the server answers MCP clients without a Sim API key."},"mcpServerUrl":{"type":"string","description":"MCP client endpoint. Use this returned URL instead of constructing one.","examples":["https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2"]},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the server was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the server was last modified.","format":"date-time"}},"required":["id","name","description","isPublic","mcpServerUrl","createdAt","updatedAt"],"additionalProperties":false,"title":"Workflow MCP server","description":"A workflow MCP server exposing deployed workflows as tools."},"Resources_CreateWorkflowMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_WorkflowMcpServer"}},"required":["data"],"additionalProperties":false,"title":"Create workflow MCP server response","description":"The workflow MCP server.","examples":[{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":false,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}]},"Resources_CreateWorkflowMcpServerRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace in which to create the workflow MCP server."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Server display name, shown to connecting MCP clients."},"description":{"description":"Optional server description.","type":"string","maxLength":2000},"isPublic":{"description":"Whether the server accepts MCP clients without a Sim API key. Defaults to false; a public server lets anyone holding its URL execute the workflows it exposes.","default":false,"type":"boolean"},"workflowIds":{"description":"Deployed workflows to expose as MCP tools on the new server.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","name"],"additionalProperties":false,"title":"Create workflow MCP server request","description":"A new workflow MCP server and deployed workflows to expose as tools.","examples":[{"workspaceId":"9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94","name":"Support agents","workflowIds":["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"]}]},"Resources_GetWorkflowMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_WorkflowMcpServer"}},"required":["data"],"additionalProperties":false,"title":"Get workflow MCP server response","description":"One workflow MCP server and its client endpoint.","examples":[{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":false,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}]},"Resources_WorkflowMcpToolListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique tool identifier."},"serverId":{"type":"string","description":"Server exposing this MCP tool."},"workflowId":{"type":"string","description":"Workflow this tool executes."},"toolName":{"type":"string","description":"Name an MCP client calls. Derived from the supplied name or the workflow name, normalized to the MCP tool-name grammar."},"toolDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description shown to MCP clients."},"mcpServerUrl":{"type":"string","description":"Endpoint an MCP client connects to."},"apiEndpoint":{"type":"string","description":"Sim execution endpoint this tool calls through."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the tool was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the tool was last modified.","format":"date-time"},"status":{"type":"string","enum":["active","inactive"],"description":"Whether MCP clients can call the tool. Undeploying its workflow archives the registration as `inactive`; it cannot be called and its name stays reserved. Redeploying the workflow makes it `active` again. Undeploying an inactive MCP tool permanently removes its registration."}},"required":["id","serverId","workflowId","toolName","toolDescription","mcpServerUrl","apiEndpoint","createdAt","updatedAt","status"],"additionalProperties":false,"title":"Workflow MCP tool list item","description":"A tool registration on a workflow MCP server. Archived registrations are included with `status: \"inactive\"`."},"Resources_ListWorkflowMcpToolsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_WorkflowMcpToolListItem"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `null`. This list has no `cursor` or `limit` parameters; see the operation for inventory limits."},"truncated":{"type":"boolean","description":"Whether the tool limit left this inventory incomplete. The list is unpaginated and nextCursor remains null even when truncated; an incomplete inventory does not represent every registration."}},"required":["data","nextCursor","truncated"],"additionalProperties":false,"title":"List workflow MCP tools response","description":"A bounded inventory of tool registrations on the workflow MCP server.","examples":[{"data":[{"id":"wfmcptool_01J8ZK3QW4M6X2R9T7B5C0V3","serverId":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","toolName":"triage_ticket","toolDescription":"Execute Ticket triage workflow","mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","apiEndpoint":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/execute","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z","status":"active"}],"nextCursor":null,"truncated":false}]},"Resources_UpdateWorkflowMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_WorkflowMcpServer"}},"required":["data"],"additionalProperties":false,"title":"Update workflow MCP server response","description":"The updated MCP server.","examples":[{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","name":"Support agents","description":"Ticket triage and escalation workflows.","isPublic":true,"mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}]},"Resources_UpdateWorkflowMcpServerRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Server display name, shown to connecting MCP clients."},"description":{"description":"New server description, or null to clear it.","anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isPublic":{"description":"Whether the server answers MCP clients without a Sim API key.","type":"boolean"}},"additionalProperties":false,"title":"Update workflow MCP server request","description":"Server fields to change. Omitted fields remain unchanged; `description: null` clears the description.","examples":[{"isPublic":true}]},"Resources_DeleteWorkflowMcpServerResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the deleted workflow MCP server."},"deleted":{"type":"boolean","const":true,"description":"Whether the workflow MCP server was deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Delete workflow MCP server result","description":"Workflow MCP server deletion acknowledgement."},"Resources_DeleteWorkflowMcpServerResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_DeleteWorkflowMcpServerResult"}},"required":["data"],"additionalProperties":false,"title":"Delete workflow MCP server response","description":"Acknowledgement that the workflow MCP server was deleted.","examples":[{"data":{"id":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","deleted":true}}]},"Resources_WorkflowMcpTool":{"type":"object","properties":{"id":{"type":"string","description":"Unique tool identifier."},"serverId":{"type":"string","description":"Server exposing this MCP tool."},"workflowId":{"type":"string","description":"Workflow this tool executes."},"toolName":{"type":"string","description":"Name an MCP client calls. Derived from the supplied name or the workflow name, normalized to the MCP tool-name grammar."},"toolDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description shown to MCP clients."},"mcpServerUrl":{"type":"string","description":"Endpoint an MCP client connects to."},"apiEndpoint":{"type":"string","description":"Sim execution endpoint this tool calls through."},"updated":{"type":"boolean","description":"False for a new registration, true when an existing registration for this workflow was replaced. Repeating the operation returns 200 with true instead of a duplicate conflict."},"createdAt":{"type":"string","description":"ISO 8601 timestamp when the tool was created.","format":"date-time"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp when the tool was last modified.","format":"date-time"}},"required":["id","serverId","workflowId","toolName","toolDescription","mcpServerUrl","apiEndpoint","updated","createdAt","updatedAt"],"additionalProperties":false,"title":"Workflow MCP tool","description":"A deployed workflow exposed as a tool on a workflow MCP server."},"Resources_DeployWorkflowMcpToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_WorkflowMcpTool"}},"required":["data"],"additionalProperties":false,"title":"Deploy workflow as MCP tool response","description":"The deployed MCP tool registration.","examples":[{"data":{"id":"wfmcptool_01J8ZK3QW4M6X2R9T7B5C0V3","serverId":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","toolName":"triage_ticket","toolDescription":"Execute Ticket triage workflow","mcpServerUrl":"https://www.sim.ai/api/mcp/serve/wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","apiEndpoint":"https://www.sim.ai/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/execute","updated":false,"createdAt":"2026-06-12T10:30:00.000Z","updatedAt":"2026-06-12T10:30:00.000Z"}}]},"Resources_DeployWorkflowMcpToolRequest":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1,"description":"Workflow to expose as an MCP tool. It must already be deployed."},"toolName":{"description":"Name MCP clients call. Normalized to the MCP tool-name grammar, and derived from the workflow name when omitted.","type":"string","minLength":1,"maxLength":128},"toolDescription":{"description":"Description shown to MCP clients. Derived from the workflow name when omitted.","type":"string","maxLength":2000},"parameterDescriptions":{"description":"Per-field description overrides applied to the schema generated from the deployed workflow inputs. A name matching no input field is ignored.","maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Input field of the deployed workflow to describe."},"description":{"type":"string","minLength":1,"maxLength":2000,"description":"Text MCP clients see for that field."}},"required":["name","description"],"additionalProperties":false}}},"required":["workflowId"],"additionalProperties":false,"title":"Deploy workflow as MCP tool request","description":"The deployed workflow and tool metadata presented to MCP clients.","examples":[{"workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","toolName":"triage_ticket"}]},"Resources_UndeployWorkflowMcpToolResult":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the removed tool."},"serverId":{"type":"string","description":"Server the tool was removed from."},"workflowId":{"type":"string","description":"Workflow whose MCP tool registration was removed."},"deleted":{"type":"boolean","const":true,"description":"Whether the tool was removed."}},"required":["id","serverId","workflowId","deleted"],"additionalProperties":false,"title":"Undeploy workflow MCP tool result","description":"Tool removal acknowledgement."},"Resources_UndeployWorkflowMcpToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_UndeployWorkflowMcpToolResult"}},"required":["data"],"additionalProperties":false,"title":"Undeploy workflow MCP tool response","description":"Acknowledgement that the tool was removed.","examples":[{"data":{"id":"wfmcptool_01J8ZK3QW4M6X2R9T7B5C0V3","serverId":"wfmcp_01J8ZK3QW4M6X2R9T7B5C0V2","workflowId":"3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36","deleted":true}}]},"Resources_UpdateCredentialResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Credential"}},"required":["data"],"additionalProperties":false,"title":"Update credential response","description":"Updated credential metadata without secret material.","examples":[{"data":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","type":"service_account","displayName":"Zoom service account","description":null,"providerId":"zoom-service-account","accountId":null,"hasServiceAccountKey":true,"role":"admin","createdAt":"2026-06-01T09:14:00.000Z","updatedAt":"2026-06-20T14:02:11.000Z"}}]},"Resources_UpdateCredentialRequest":{"type":"object","properties":{"displayName":{"description":"New name shown for the credential in Sim.","type":"string","minLength":1,"maxLength":255},"description":{"description":"New credential description. Send null to clear the stored one.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"serviceAccountJson":{"description":"Write-only provider service-account JSON configuration, including Oracle Database connection fields.","writeOnly":true,"type":"string","minLength":1,"maxLength":2097152},"apiToken":{"description":"Write-only provider API token.","writeOnly":true,"type":"string","minLength":1,"maxLength":8192},"domain":{"description":"Provider account domain.","type":"string","minLength":1,"maxLength":2048},"atlassianProduct":{"description":"Atlassian product to verify; defaults to Jira on create and preserves the saved product on reconnect.","type":"string","enum":["jira","confluence"]},"signingSecret":{"description":"Write-only webhook signing secret.","writeOnly":true,"type":"string","minLength":1,"maxLength":8192},"botToken":{"description":"Write-only bot token.","writeOnly":true,"type":"string","minLength":1,"maxLength":8192},"clientId":{"description":"OAuth client identifier.","type":"string","minLength":1,"maxLength":512},"clientSecret":{"description":"Write-only OAuth client secret.","writeOnly":true,"type":"string","minLength":1,"maxLength":1024},"certificateId":{"description":"Provider certificate mapping identifier.","type":"string","minLength":1,"maxLength":512},"orgId":{"description":"Provider organization ID.","type":"string","minLength":1,"maxLength":255},"dataCenter":{"description":"Provider data center.","type":"string","minLength":1,"maxLength":32},"scope":{"description":"Provider permissions; preserved on reconnect when omitted.","type":"string","minLength":1,"maxLength":512},"authMethod":{"description":"Provider authentication method.","type":"string","minLength":1,"maxLength":64},"privateKey":{"description":"Write-only PEM private key.","writeOnly":true,"type":"string","minLength":1,"maxLength":8192},"username":{"description":"Provider run-as username.","type":"string","minLength":1,"maxLength":255},"tenancyOcid":{"description":"OCI tenancy OCID.","type":"string","minLength":1,"maxLength":255},"userOcid":{"description":"OCI user OCID.","type":"string","minLength":1,"maxLength":255},"fingerprint":{"description":"OCI API-key fingerprint.","type":"string","minLength":1,"maxLength":128},"privateKeyPassphrase":{"description":"Write-only OCI private-key passphrase.","writeOnly":true,"type":"string","maxLength":4096},"region":{"description":"OCI home region.","type":"string","minLength":1,"maxLength":128}},"additionalProperties":false,"title":"Update credential request","description":"Metadata fields to change, or the complete required fields for a service-account secret rotation. Use List credential providers for the selected provider’s fields.","examples":[{"displayName":"Billing automation"},{"clientId":"YOUR_CLIENT_ID","clientSecret":"YOUR_ROTATED_CLIENT_SECRET","orgId":"YOUR_ACCOUNT_ID"}]},"Resources_V2BlockSummary":{"type":"object","properties":{"id":{"type":"string","description":"Block type identifier, used as a workflow block’s `type`."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"One-line summary of what the block does."},"longDescription":{"description":"Extended explanation, when the block has one.","type":"string"},"category":{"type":"string","description":"Toolbar category: `blocks`, `tools`, or `triggers`."},"integrationType":{"description":"Integration category, e.g. `communication`, `databases`.","type":"string"},"source":{"type":"string","enum":["builtin","custom"],"description":"Block source: `builtin` for built-in blocks, or `custom` for workflows this workspace deployed as blocks."},"authMode":{"description":"How the block authenticates: `oauth`, `api_key`, or `bot_token`.","type":"string"},"triggerAllowed":{"type":"boolean","description":"Whether the block declares itself usable as a trigger."},"triggerCapable":{"type":"boolean","description":"Whether the block can start a workflow — a trigger-category block, one declaring `triggerAllowed`, or one with trigger-mode fields."},"triggerIds":{"type":"array","items":{"type":"string"},"description":"Identifiers of the triggers this block supports."},"toolIds":{"type":"array","items":{"type":"string"},"description":"Built-in tools this block can run. Read a tool by its id for the full definition."},"operationIds":{"type":"array","items":{"type":"string"},"description":"Operations this block exposes. Their fields and tools are on the block read."},"preview":{"type":"boolean","description":"Whether the block is unreleased and revealed only to this caller."},"sunset":{"description":"Post-release lifecycle state. Absent for a block in normal support.","type":"object","properties":{"status":{"type":"string","enum":["legacy","deprecated"],"description":"`legacy` is superseded but supported; `deprecated` is slated for removal."},"replacedBy":{"description":"Block type to migrate to, when one exists.","type":"string"}},"required":["status"],"additionalProperties":false},"docsLink":{"description":"Sim documentation page for the integration.","type":"string"},"tags":{"type":"array","items":{"type":"string"},"description":"Catalog tags, e.g. `messaging`, `version-control`."}},"required":["id","name","description","category","source","triggerAllowed","triggerCapable","triggerIds","toolIds","operationIds","preview","tags"],"additionalProperties":false,"title":"Block summary","description":"List view of a block: what it is and what it references, by id."},"Resources_ListBlocksResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2BlockSummary"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List blocks response","description":"Blocks available in the workspace.","examples":[{"data":[{"id":"slack","name":"Slack","description":"Send messages and read channels in Slack.","category":"tools","integrationType":"communication","source":"builtin","authMode":"oauth","triggerAllowed":true,"triggerCapable":true,"triggerIds":["slack_webhook"],"toolIds":["slack_message","slack_canvas_read"],"operationIds":["send","read"],"preview":false,"docsLink":"https://docs.sim.ai/tools/slack","tags":["messaging"]}],"nextCursor":null}]},"Resources_V2BlockField":{"type":"object","properties":{"id":{"type":"string","description":"Field identifier, and the key its value is stored under."},"type":{"type":"string","description":"Editor control the field renders as, e.g. `short-input`."},"title":{"description":"Human-readable label.","type":"string"},"required":{"description":"Whether a value must always be supplied. A field required only under some configuration reports `false` and carries `requiredWhen`.","type":"boolean"},"requiredWhen":{"description":"Condition under which the field is required.","$ref":"#/components/schemas/Resources_V2CatalogCondition"},"description":{"description":"Authored explanation of the field.","type":"string"},"placeholder":{"description":"Placeholder shown in the editor.","type":"string"},"mode":{"description":"Where the field renders: `basic`, `advanced`, `both`, `trigger`, or `trigger-advanced`.","type":"string"},"hidden":{"description":"Whether the field is hidden in the editor.","type":"boolean"},"reactiveCondition":{"description":"Credential-kind requirement for this field or option; inspect the selected credential before using it.","type":"object","properties":{"watchFields":{"type":"array","items":{"type":"string"},"description":"Credential selector fields; the first populated value identifies the credential."},"requiredType":{"type":"string","enum":["oauth","service_account"],"description":"Credential kind required for this field or option to apply."}},"required":["watchFields","requiredType"],"additionalProperties":false},"condition":{"description":"Condition under which the field applies at all.","$ref":"#/components/schemas/Resources_V2CatalogCondition"},"options":{"description":"Selectable options. Absent on fields whose options are fetched per workspace at edit time. A `model` field always carries its options, with `hosted` marking the models a hosted deployment runs without an author-supplied key.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Value stored when this option is selected."},"label":{"description":"Human-readable option label.","type":"string"},"reactiveCondition":{"description":"Credential-kind requirement for this field or option; inspect the selected credential before using it.","type":"object","properties":{"watchFields":{"type":"array","items":{"type":"string"},"description":"Credential selector fields; the first populated value identifies the credential."},"requiredType":{"type":"string","enum":["oauth","service_account"],"description":"Credential kind required for this field or option to apply."}},"required":["watchFields","requiredType"],"additionalProperties":false},"hasIcon":{"description":"Whether the option renders with an icon. The icon itself is not published.","type":"boolean"},"hosted":{"description":"Model options only: whether Sim runs the model with its own key on a hosted deployment, so no provider API key is needed for it.","type":"boolean"}},"required":["id"],"additionalProperties":false}},"min":{"description":"Minimum accepted numeric value.","type":"number"},"max":{"description":"Maximum accepted numeric value.","type":"number"},"step":{"description":"Increment for numeric controls.","type":"number"},"integer":{"description":"Whether the numeric value must be a whole number.","type":"boolean"},"rows":{"description":"Visible row count for multi-line text.","type":"number"},"password":{"description":"Whether the stored value is masked in the editor.","type":"boolean"},"multiSelect":{"description":"Whether more than one option may be selected.","type":"boolean"},"language":{"description":"Language of a code field.","type":"string"},"generationType":{"description":"Kind of content AI assistance generates here.","type":"string"},"serviceId":{"description":"OAuth service this credential field authenticates.","type":"string"},"requiredScopes":{"description":"OAuth scopes the credential selected here must carry.","type":"array","items":{"type":"string"}},"mimeType":{"description":"MIME type filter applied to a file picker.","type":"string"},"acceptedTypes":{"description":"Accepted file extensions for an upload field.","type":"string"},"multiple":{"description":"Whether more than one file may be supplied.","type":"boolean"},"maxSize":{"description":"Maximum upload size in megabytes.","type":"number"},"connectionDroppable":{"description":"Whether another block’s output can be dropped onto this field.","type":"boolean"},"columns":{"description":"Column headings for a table field.","type":"array","items":{"type":"string"}},"dependsOn":{"description":"Sibling fields this field is cleared by when they change.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"all":{"description":"Every listed field must hold a value.","type":"array","items":{"type":"string"}},"any":{"description":"At least one listed field must hold a value.","type":"array","items":{"type":"string"}}},"additionalProperties":false}]},"canonicalParamId":{"description":"Shared key for a picker/manual-entry pair. Both fields write the same value, so supply exactly one of the pair.","type":"string"},"defaultValue":{"description":"Value used when the field is left unset.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Member of an object-valued default. Shape varies by field type."}},{"type":"array","items":{"description":"Element of an array-valued default. Shape varies by field type."}}]},"hasComputedDefault":{"description":"Whether the field derives its value from the block’s other values. The deriving function is not published.","type":"boolean"}},"required":["id","type"],"additionalProperties":false,"title":"Block field","description":"One configuration field on a block."},"Resources_V2CatalogCondition":{"type":"object","properties":{"field":{"type":"string","description":"Sibling field id whose value decides this condition."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}],"description":"Value, or set of accepted values, the named field must hold."},"not":{"description":"Invert the match: every value EXCEPT `value`.","type":"boolean"},"and":{"description":"A second clause that must hold as well.","type":"object","properties":{"field":{"type":"string","description":"Sibling field id for the second clause."},"value":{"description":"Value the second clause matches. Absent means \"holds any value\".","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]},"not":{"description":"Invert the second clause.","type":"boolean"}},"required":["field"],"additionalProperties":false}},"required":["field","value"],"additionalProperties":false,"title":"Catalog condition","description":"When a configuration field applies, expressed against a sibling field."},"Resources_V2OperationInput":{"type":"object","properties":{"type":{"type":"string","description":"Value type."},"required":{"description":"Whether the value must be supplied.","type":"boolean"},"visibility":{"description":"Source of the value in a workflow or Agent block: `user-or-llm`, `user-only`, `llm-only`, or `hidden`. A direct Run tool caller may supply non-hidden parameters; Sim supplies hidden ones.","type":"string"},"description":{"description":"What the value means.","type":"string"},"default":{"description":"Value used when this input is omitted."},"items":{"description":"JSON-Schema-shaped constraints declared by the tool parameter."},"schema":{"description":"JSON-Schema-shaped structure declared by the block input."}},"required":["type"],"additionalProperties":false,"title":"Operation input","description":"One value a block operation needs, from its tool or its block-level inputs."},"Resources_V2ToolOutput":{"type":"object","properties":{"type":{"type":"string","description":"Value type of the output field."},"description":{"description":"What the field holds.","type":"string"},"optional":{"description":"Whether the field may be absent.","type":"boolean"},"nullable":{"description":"Whether the field may be null.","type":"boolean"},"properties":{"description":"Members of an object-typed output, keyed by field name.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Nested output field, in this same shape."}},"items":{"description":"Element shape of an array-typed output.","type":"object","properties":{"type":{"type":"string","description":"Element value type."},"description":{"description":"What an element holds.","type":"string"},"properties":{"description":"Members of an object-typed element, keyed by field name.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"Nested output field, in this same shape."}}},"required":["type"],"additionalProperties":false},"fileConfig":{"description":"File metadata for a file-typed output.","type":"object","properties":{"mimeType":{"description":"MIME type of the produced file.","type":"string"},"extension":{"description":"File extension of the produced file.","type":"string"}},"additionalProperties":false}},"required":["type"],"additionalProperties":false,"title":"Tool output","description":"One declared output field of a built-in tool."},"Resources_V2ToolDetail":{"type":"object","properties":{"id":{"type":"string","description":"Registered tool identifier, including its version suffix."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"What the tool does."},"version":{"description":"Tool version.","type":"string"},"hostedApiKey":{"type":"string","enum":["always","conditional","none"],"description":"API-key hosting on this deployment: `always`, `conditional` for some parameter combinations, or `none` when Sim does not supply a key. Supply your own key only if the tool requires one. Self-hosted deployments report `none` for every tool."},"oauth":{"description":"OAuth requirement, when the tool has one.","type":"object","properties":{"required":{"type":"boolean","description":"Whether the tool cannot run without an OAuth credential."},"provider":{"type":"string","description":"OAuth service the credential must authenticate."},"requiredScopes":{"description":"Scopes the credential must carry.","type":"array","items":{"type":"string"}}},"required":["required","provider"],"additionalProperties":false},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Resources_V2ToolParam"},"description":"Parameters the tool accepts."},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Resources_V2ToolOutput"},"description":"Fields the tool produces."}},"required":["id","name","description","hostedApiKey","params","outputs"],"additionalProperties":false,"title":"Tool","description":"A built-in tool with its declared parameters and outputs."},"Resources_V2ToolParam":{"type":"object","properties":{"type":{"type":"string","description":"Parameter value type."},"required":{"description":"Whether the parameter must be supplied.","type":"boolean"},"visibility":{"description":"Source of the value in a workflow or Agent block: `user-or-llm`, `user-only`, `llm-only`, or `hidden`. A direct Run tool caller may supply non-hidden parameters; Sim supplies hidden ones.","type":"string"},"description":{"description":"What the parameter means.","type":"string"},"default":{"description":"Value used when the parameter is omitted."},"items":{"description":"JSON-Schema-shaped constraints for structured params."}},"required":["type"],"additionalProperties":false,"title":"Tool parameter","description":"One declared parameter of a built-in tool."},"Resources_V2BlockDetail":{"type":"object","properties":{"id":{"type":"string","description":"Block type identifier, used as a workflow block’s `type`."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"One-line summary of what the block does."},"longDescription":{"description":"Extended explanation, when the block has one.","type":"string"},"category":{"type":"string","description":"Toolbar category: `blocks`, `tools`, or `triggers`."},"integrationType":{"description":"Integration category, e.g. `communication`, `databases`.","type":"string"},"source":{"type":"string","enum":["builtin","custom"],"description":"Block source: `builtin` for built-in blocks, or `custom` for workflows this workspace deployed as blocks."},"authMode":{"description":"How the block authenticates: `oauth`, `api_key`, or `bot_token`.","type":"string"},"triggerAllowed":{"type":"boolean","description":"Whether the block declares itself usable as a trigger."},"triggerCapable":{"type":"boolean","description":"Whether the block can start a workflow — a trigger-category block, one declaring `triggerAllowed`, or one with trigger-mode fields."},"triggerIds":{"type":"array","items":{"type":"string"},"description":"Identifiers of the triggers this block supports."},"toolIds":{"type":"array","items":{"type":"string"},"description":"Built-in tools this block can run. Read a tool by its id for the full definition."},"operationIds":{"type":"array","items":{"type":"string"},"description":"Operations this block exposes. Their fields and tools are on the block read."},"preview":{"type":"boolean","description":"Whether the block is unreleased and revealed only to this caller."},"sunset":{"description":"Post-release lifecycle state. Absent for a block in normal support.","type":"object","properties":{"status":{"type":"string","enum":["legacy","deprecated"],"description":"`legacy` is superseded but supported; `deprecated` is slated for removal."},"replacedBy":{"description":"Block type to migrate to, when one exists.","type":"string"}},"required":["status"],"additionalProperties":false},"docsLink":{"description":"Sim documentation page for the integration.","type":"string"},"tags":{"type":"array","items":{"type":"string"},"description":"Catalog tags, e.g. `messaging`, `version-control`."},"bestPractices":{"description":"Authored guidance on using the block correctly.","type":"string"},"inputSchema":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2BlockField"},"description":"Configuration fields that apply regardless of the selected operation."},"operationInputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2BlockField"}},"description":"Configuration fields keyed by the operation that reveals them."},"inputDefinitions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"Value type: `string`, `number`, `boolean`, `json`, `array`, or `file`."},"description":{"description":"What the input means.","type":"string"},"schema":{"description":"JSON-Schema-shaped structure for object and array inputs."}},"required":["type"],"additionalProperties":false},"description":"Block-level input definitions, keyed by parameter name."},"operations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"toolId":{"description":"Built-in tool that performs this operation.","type":"string"},"toolName":{"description":"Display name of that tool.","type":"string"},"description":{"description":"What the operation does.","type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Resources_V2OperationInput"},"description":"Values this operation needs, excluding the ones the block supplies from its own block-level inputs."},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Resources_V2ToolOutput"},"description":"Fields the operation produces."},"inputSchema":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2BlockField"},"description":"Configuration fields that appear when this operation is selected."}},"required":["inputs","outputs","inputSchema"],"additionalProperties":false},"description":"Operations the block exposes, keyed by operation id."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2ToolDetail"},"description":"Every built-in tool the block can run, with parameters and outputs."},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Trigger identifier."},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"Value type of the output."},"description":{"description":"What the output holds.","type":"string"}},"required":["type"],"additionalProperties":false},"description":"Top-level fields the trigger event delivers."},"configFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"Editor control the field renders as."},"required":{"type":"boolean","description":"Whether a value must be supplied."},"title":{"description":"Human-readable label.","type":"string"},"description":{"description":"Authored explanation of the field.","type":"string"},"placeholder":{"description":"Placeholder shown in the editor.","type":"string"},"default":{"description":"Value used when the field is left unset."},"options":{"description":"Selectable options.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Value stored when this option is selected."},"label":{"type":"string","description":"Human-readable option label."},"reactiveCondition":{"description":"Credential-kind requirement for this field or option; inspect the selected credential before using it.","type":"object","properties":{"watchFields":{"type":"array","items":{"type":"string"},"description":"Credential selector fields; the first populated value identifies the credential."},"requiredType":{"type":"string","enum":["oauth","service_account"],"description":"Credential kind required for this field or option to apply."}},"required":["watchFields","requiredType"],"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"reactiveCondition":{"description":"Credential-kind requirement for this field or option; inspect the selected credential before using it.","type":"object","properties":{"watchFields":{"type":"array","items":{"type":"string"},"description":"Credential selector fields; the first populated value identifies the credential."},"requiredType":{"type":"string","enum":["oauth","service_account"],"description":"Credential kind required for this field or option to apply."}},"required":["watchFields","requiredType"],"additionalProperties":false},"condition":{"description":"Condition under which the field applies.","$ref":"#/components/schemas/Resources_V2CatalogCondition"}},"required":["type","required"],"additionalProperties":false},"description":"Fields that configure the trigger, keyed by field id."}},"required":["id","outputs","configFields"],"additionalProperties":false},"description":"Triggers the block can run on."},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"Value type of the output."},"description":{"description":"What the output holds.","type":"string"}},"required":["type"],"additionalProperties":false},"description":"Fields the block produces."}},"required":["id","name","description","category","source","triggerAllowed","triggerCapable","triggerIds","toolIds","operationIds","preview","tags","inputSchema","operationInputSchema","inputDefinitions","operations","tools","triggers","outputs"],"additionalProperties":false,"title":"Block","description":"A block with its configuration fields, operations, tools, and triggers."},"Resources_GetBlockResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2BlockDetail"}},"required":["data"],"additionalProperties":false,"title":"Get block response","description":"One block with its fields, operations, tools, and triggers.","examples":[{"data":{"id":"slack","name":"Slack","description":"Send messages and read channels in Slack.","category":"tools","integrationType":"communication","source":"builtin","authMode":"oauth","triggerAllowed":true,"triggerCapable":true,"triggerIds":["slack_webhook"],"toolIds":["slack_message","slack_canvas_read"],"operationIds":["send","read"],"preview":false,"docsLink":"https://docs.sim.ai/tools/slack","tags":["messaging"],"inputSchema":[{"id":"operation","type":"dropdown","title":"Operation","required":true,"options":[{"id":"send","label":"Send message"},{"id":"read","label":"Read messages"}]}],"operationInputSchema":{"send":[{"id":"text","type":"long-input","title":"Message","required":true}]},"inputDefinitions":{"channel":{"type":"string","description":"Channel to post into."}},"operations":{"send":{"toolId":"slack_message","toolName":"Slack Send Message","description":"Send a message to a Slack channel.","inputs":{"text":{"type":"string","required":true,"description":"Message body."}},"outputs":{"ts":{"type":"string","description":"Message timestamp."}},"inputSchema":[{"id":"text","type":"long-input","title":"Message","required":true}]}},"tools":[{"id":"slack_message","name":"Slack Send Message","description":"Send a message to a Slack channel.","version":"1.0.0","hostedApiKey":"none","oauth":{"required":true,"provider":"slack","requiredScopes":["chat:write"]},"params":{"text":{"type":"string","required":true,"description":"Message body."}},"outputs":{"ts":{"type":"string","description":"Message timestamp."}}}],"triggers":[{"id":"slack_webhook","outputs":{"text":{"type":"string","description":"Message text."}},"configFields":{"channels":{"type":"short-input","required":false,"title":"Channels"}}}],"outputs":{"ts":{"type":"string","description":"Message timestamp."}}}}]},"Resources_V2ToolSummary":{"type":"object","properties":{"id":{"type":"string","description":"Registered tool identifier, including its version suffix."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"What the tool does."},"version":{"description":"Tool version.","type":"string"},"hostedApiKey":{"type":"string","enum":["always","conditional","none"],"description":"API-key hosting on this deployment: `always`, `conditional` for some parameter combinations, or `none` when Sim does not supply a key. Supply your own key only if the tool requires one. Self-hosted deployments report `none` for every tool."},"oauth":{"description":"OAuth requirement, when the tool has one.","type":"object","properties":{"required":{"type":"boolean","description":"Whether the tool cannot run without an OAuth credential."},"provider":{"type":"string","description":"OAuth service the credential must authenticate."},"requiredScopes":{"description":"Scopes the credential must carry.","type":"array","items":{"type":"string"}}},"required":["required","provider"],"additionalProperties":false}},"required":["id","name","description","hostedApiKey"],"additionalProperties":false,"title":"Tool summary","description":"List view of a built-in tool: identity, auth, and key hosting."},"Resources_ListToolsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2ToolSummary"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List tools response","description":"Built-in tools available in the workspace.","examples":[{"data":[{"id":"slack_message","name":"Slack Send Message","description":"Send a message to a Slack channel.","version":"1.0.0","hostedApiKey":"none","oauth":{"required":true,"provider":"slack","requiredScopes":["chat:write"]}}],"nextCursor":null}]},"Resources_GetToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2ToolDetail"}},"required":["data"],"additionalProperties":false,"title":"Get tool response","description":"One built-in tool with its parameters and outputs.","examples":[{"data":{"id":"slack_message","name":"Slack Send Message","description":"Send a message to a Slack channel.","version":"1.0.0","hostedApiKey":"none","oauth":{"required":true,"provider":"slack","requiredScopes":["chat:write"]},"params":{"channel":{"type":"string","required":true,"description":"Channel ID to post into."},"text":{"type":"string","required":true,"description":"Message body."}},"outputs":{"ts":{"type":"string","description":"Message timestamp."}}}}]},"Resources_V2ToolExecution":{"type":"object","properties":{"toolId":{"type":"string","description":"Tool that ran. An unversioned name resolves to the newest version visible in the workspace, so this can differ from the id in the path."},"status":{"type":"string","enum":["succeeded","failed"],"description":"Whether the tool reported success. A failed tool call is still a 200."},"output":{"description":"Whatever the tool produced, shaped by its declared outputs."},"error":{"anyOf":[{"type":"object","properties":{"message":{"type":"string","description":"Why the tool call did not succeed."}},"required":["message"],"additionalProperties":false},{"type":"null"}],"description":"Populated only when `status` is `failed`."}},"required":["toolId","status","output","error"],"additionalProperties":false,"title":"Tool execution","description":"The result of running one built-in tool."},"Resources_ExecuteToolResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2ToolExecution"}},"required":["data"],"additionalProperties":false,"title":"Run tool response","description":"What the tool produced, or why it did not succeed.","examples":[{"data":{"toolId":"slack_message","status":"succeeded","output":{"ts":"1718191234.004500"},"error":null}}]},"Resources_ExecuteToolRequest":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace whose integration allowlist, credentials, and environment variables govern this call."},"input":{"default":{},"description":"Arguments keyed by published parameter IDs. Hidden and undeclared fields are rejected. Send connected credentials as top-level `credentialId`, not `input.credential`, `input.credentialId`, or `input.oauthCredential`. Whole-value `{{VAR_NAME}}` references resolve environment variables only for `user-only` parameters; other values pass through unchanged.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"description":"One argument value. Its shape is declared by the tool parameter."}},"credentialId":{"description":"Connected credential to authenticate with. Required for tools declaring required OAuth or a required credential-selector parameter. Use List credentials to find candidates; do not send credential aliases inside `input`.","type":"string","minLength":1,"maxLength":255},"timeoutSeconds":{"description":"Maximum wait time in seconds; defaults to 120 and cannot exceed 300. Timeout does not guarantee that a third-party side effect was cancelled.","type":"integer","minimum":1,"maximum":300}},"required":["workspaceId"],"additionalProperties":false,"title":"Run tool request","description":"Workspace, accepted tool arguments, and optional connected credential. Hidden fields and credential aliases inside input are rejected.","examples":[{"workspaceId":"a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64","input":{"channel":"C0123456789","text":"Deploy finished."},"credentialId":"cred_01J8ZK3QW4M6X2R9T7B5C0V2"}]},"Resources_V2ConnectorType":{"type":"object","properties":{"connectorType":{"type":"string","description":"Exact identifier to send when creating a connector of this type."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"What the connector syncs."},"version":{"type":"string","description":"Connector version."},"auth":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"oauth","description":"Authenticates with an OAuth credential; pass `credentialId` when creating the connector."},"provider":{"type":"string","description":"OAuth service the credential must authenticate."},"requiredScopes":{"description":"Scopes the credential must carry.","type":"array","items":{"type":"string"}}},"required":["mode","provider"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"apiKey","description":"Authenticates with a stored API key; pass `apiKey`, and no `credentialId`, when creating the connector."},"label":{"description":"Label shown above the key field.","type":"string"},"placeholder":{"description":"Placeholder shown in the key field.","type":"string"},"optional":{"type":"boolean","description":"Whether the key may be left blank, for a source reachable without authentication."}},"required":["mode","optional"],"additionalProperties":false}],"description":"How the connector authenticates against its source: `oauth` connectors take `credentialId` (GitHub also accepts a personal access token as `apiKey`), `apiKey` connectors take `apiKey`."},"configFields":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2ConnectorConfigField"},"description":"Fields that make up the connector’s `sourceConfig`."},"supportsIncrementalSync":{"type":"boolean","description":"Whether syncs after the first fetch only what changed."},"tagDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Semantic tag identifier the connector populates."},"displayName":{"type":"string","description":"Human-readable tag name."},"fieldType":{"type":"string","enum":["text","number","date","boolean"],"description":"Value type, which decides the tag slot pool it draws from."}},"required":["id","displayName","fieldType"],"additionalProperties":false},"description":"Tags this connector writes onto the documents it syncs."}},"required":["connectorType","name","description","version","auth","configFields","supportsIncrementalSync","tagDefinitions"],"additionalProperties":false,"title":"Connector type","description":"A knowledge-base connector type and the configuration it accepts."},"Resources_V2ConnectorConfigField":{"type":"object","properties":{"id":{"type":"string","description":"Field identifier."},"title":{"type":"string","description":"Human-readable label."},"type":{"type":"string","enum":["short-input","dropdown","selector"],"description":"Control the field renders as. A `selector` fetches its options from the connected account."},"placeholder":{"description":"Placeholder shown in the editor.","type":"string"},"required":{"description":"Whether a value must be supplied.","type":"boolean"},"description":{"description":"Authored explanation of the field.","type":"string"},"options":{"description":"Static options, for a `dropdown` field.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Value stored when this option is selected."},"label":{"type":"string","description":"Human-readable option label."}},"required":["id","label"],"additionalProperties":false}},"selectorKey":{"description":"Names the picker a `selector` field renders. Its options are fetched per workspace.","type":"string"},"mimeType":{"description":"MIME type filter applied to the picker.","type":"string"},"dependsOn":{"description":"Sibling fields this field is cleared by when they change.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"all":{"description":"Every listed field must hold a value.","type":"array","items":{"type":"string"}},"any":{"description":"At least one listed field must hold a value.","type":"array","items":{"type":"string"}}},"additionalProperties":false}]},"mode":{"description":"Which half of a canonical pair this field is: `basic` is the picker, `advanced` the manual entry.","type":"string","enum":["basic","advanced"]},"canonicalParamId":{"description":"Shared `sourceConfig` key for a picker/manual-entry pair. Send exactly one of the pair, keyed by this value rather than by the field’s own `id`.","type":"string"},"multi":{"description":"When true the stored `sourceConfig` value is a `string[]`, not a `string`: a `selector` renders a multi-select picker and a `short-input` accepts a comma-separated list.","type":"boolean"}},"required":["id","title","type"],"additionalProperties":false,"title":"Connector config field","description":"One field of a knowledge-base connector’s source configuration."},"Resources_V2ConnectorTypeSummary":{"type":"object","properties":{"connectorType":{"type":"string","description":"Exact identifier to send when creating a connector of this type."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"What the connector syncs."},"auth":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth","apiKey"],"description":"How the connector authenticates against its source: `oauth` connectors take `credentialId` (GitHub also accepts a personal access token as `apiKey`), `apiKey` connectors take `apiKey`."}},"required":["mode"],"additionalProperties":false,"description":"Authentication mode only. `detail=full` adds the OAuth provider and scopes, or the API-key field labels."}},"required":["connectorType","name","description","auth"],"additionalProperties":false,"title":"Connector type summary","description":"A knowledge-base connector type without its configuration schema. Request `detail=full` for the config fields and tag definitions."},"Resources_ListConnectorTypesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/Resources_V2ConnectorType"},{"$ref":"#/components/schemas/Resources_V2ConnectorTypeSummary"}]},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List connector types response","description":"Knowledge-base connector types, as summaries or with their configuration fields.","examples":[{"data":[{"connectorType":"google_drive","name":"Google Drive","description":"Sync documents from Google Drive","auth":{"mode":"oauth"}}],"nextCursor":null},{"data":[{"connectorType":"google_drive","name":"Google Drive","description":"Sync documents from Google Drive","version":"1.0.0","auth":{"mode":"oauth","provider":"google-drive","requiredScopes":["https://www.googleapis.com/auth/drive"]},"configFields":[{"id":"adminEmail","title":"Crawl as","type":"short-input","placeholder":"admin@yourcompany.com","required":false,"description":"The Google Workspace user this service account acts as when fetching content for connected members."},{"id":"userEmails","title":"Users","type":"short-input","placeholder":"All active Google Workspace users","required":false,"description":"Optional primary email addresses, separated by commas (up to 100). Leave blank to index all active users across this Google Workspace customer.","multi":true},{"id":"openSharing","title":"Openly shared files","type":"dropdown","placeholder":"Keep out of search","required":false,"description":"Files shared beyond named people and groups. Kept out of search by default, because a domain-wide or public share is more often an accident than an intention. Never applies to link-only shares, which stay unsearchable.","options":[{"label":"Keep out of search","id":"none"},{"label":"Anyone in the domain can find","id":"domain"},{"label":"Anyone can find","id":"anyone"}]},{"id":"folderSelector","title":"Folders","type":"selector","placeholder":"Select one or more folders (optional)","required":false,"description":"Includes files in each selected folder and its accessible subfolders.","selectorKey":"google.drive","mimeType":"application/vnd.google-apps.folder","mode":"basic","canonicalParamId":"folderId","multi":true},{"id":"folderId","title":"Folder IDs","type":"short-input","placeholder":"e.g. 1aBcDeFg…, 2cDeFgHi… (comma-separated for multiple)","required":false,"description":"Includes files in each selected folder and its accessible subfolders.","mode":"advanced","canonicalParamId":"folderId","multi":true},{"id":"fileType","title":"File Type","type":"dropdown","required":false,"options":[{"label":"All supported files","id":"all"},{"label":"Google Docs only","id":"documents"},{"label":"Google Sheets only","id":"spreadsheets"},{"label":"Google Slides only","id":"presentations"},{"label":"Plain text files only","id":"text"}]},{"id":"maxFiles","title":"Max Files","type":"short-input","placeholder":"e.g. 500 (default: unlimited)","required":false}],"supportsIncrementalSync":false,"tagDefinitions":[{"id":"owners","displayName":"Owner","fieldType":"text"},{"id":"fileType","displayName":"File Type","fieldType":"text"},{"id":"lastModified","displayName":"Last Modified","fieldType":"date"},{"id":"starred","displayName":"Starred","fieldType":"boolean"}]}],"nextCursor":null}]},"Resources_V2PermissionGroup":{"type":"object","properties":{"id":{"type":"string","description":"Permission group identifier."},"organizationId":{"type":"string","description":"Organization that owns the group."},"name":{"type":"string","description":"Group name, unique within the organization."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of the group."},"config":{"type":"object","properties":{"allowedIntegrations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."},"allowedModelProviders":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model providers are limited to this list. Null permits every value; an empty list permits none."},"deniedModels":{"default":[],"type":"array","items":{"type":"string"},"description":"Models listed in this list are blocked."},"deniedTools":{"default":[],"type":"array","items":{"type":"string"},"description":"Integration tools listed in this list are blocked."},"hideTraceSpans":{"type":"boolean","description":"Withhold per-block trace spans from logs and from the API."},"hideKnowledgeBaseTab":{"type":"boolean","description":"Revoke the Knowledge Base module. Members cannot open, search, or query any knowledge base."},"hideTablesTab":{"type":"boolean","description":"Revoke the Tables module. Members cannot read or write any table."},"hideCopilot":{"type":"boolean","description":"Revoke Chat. Members cannot ask Sim to build or edit anything."},"hideIntegrationsTab":{"type":"boolean","description":"Revoke integration connections. Members cannot view, add, or remove an OAuth connection."},"hideSecretsTab":{"type":"boolean","description":"Revoke secrets. Members cannot read, add, or change a workspace environment variable."},"hideApiKeysTab":{"type":"boolean","description":"Revoke workspace API keys. Members cannot list, create, or revoke one."},"hideInboxTab":{"type":"boolean","description":"Revoke the Sim Mailer inbox. Members cannot read or send mail."},"hideFilesTab":{"type":"boolean","description":"Revoke the Files module. Members cannot list, upload, or download workspace files."},"disableMcpTools":{"type":"boolean","description":"Block agents from calling MCP tools."},"disableCustomTools":{"type":"boolean","description":"Block agents from calling user-defined custom tools."},"disableSkills":{"type":"boolean","description":"Block agents from loading skills."},"disableInvitations":{"type":"boolean","description":"Prevent inviting anyone to a workspace or to the organization."},"disablePublicApi":{"type":"boolean","description":"Revoke public API access. Calls to a deployed workflow are refused."},"disablePublicFileSharing":{"type":"boolean","description":"Revoke public file sharing. Members cannot create a share link."},"allowedFileShareAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Public file-share authentication is limited to this list. Null permits every value; an empty list permits none."},"hideDeployApi":{"type":"boolean","description":"Prevent deploying a workflow as an API endpoint."},"hideDeployMcp":{"type":"boolean","description":"Prevent exposing a workflow as an MCP server."},"hideDeployChatbot":{"type":"boolean","description":"Prevent deploying a workflow as a chat."},"allowedChatDeployAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Chat deployment authentication is limited to this list. Null permits every value; an empty list permits none."},"disablePersonalApiKeys":{"type":"boolean","description":"Prevent members from using a personal API key against this workspace."},"disableLogExport":{"type":"boolean","description":"Prevent downloading execution logs as a CSV."},"hideCostInfo":{"type":"boolean","description":"Withhold execution cost. Logs and member exports omit cost and token spend; organization-level data drains, configurable by org admins only, are not projected."},"disableKnowledgeBaseCreation":{"type":"boolean","description":"Prevent creating knowledge bases, leaving existing ones queryable."},"disableKnowledgeBaseFileUpload":{"type":"boolean","description":"Prevent uploading local documents, leaving sanctioned connectors as the only source."},"allowedKnowledgeConnectors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Knowledge base connectors are limited to this list. Null permits every value; an empty list permits none."},"disableTableCreation":{"type":"boolean","description":"Prevent creating tables, leaving existing ones usable."},"disableTableExport":{"type":"boolean","description":"Prevent downloading a whole table as CSV or JSON."},"disableBulkFileDownload":{"type":"boolean","description":"Prevent downloading folders as an archive."},"disablePersonalCredentials":{"type":"boolean","description":"Prevent connecting personal credentials, leaving only workspace-shared ones."},"disableWorkspaceCreation":{"type":"boolean","description":"Prevent creating new workspaces, which no existing group would govern. Read from the organization's default group, because creating a workspace names none."},"hideOrgMemberDirectory":{"type":"boolean","description":"Withhold the member directory. Members cannot see the names or email addresses of other members. Read from the organization's default group, because the directory belongs to the organization and names no workspace."},"disableCliAccess":{"type":"boolean","description":"Prevent approving a CLI login or using Sim CLI OAuth tokens for the public API. A login naming one of this group's workspaces is refused; an account-level login names none, so it is read from the organization's default group."},"disableWebhookTriggers":{"type":"boolean","description":"Prevent making a workflow reachable from an inbound webhook."},"disableToolAutoApproval":{"type":"boolean","description":"Prevent silencing a tool confirmation, so every call is confirmed again."},"hideSandboxesTab":{"type":"boolean","description":"Revoke the Sandboxes module. Members cannot view, create, or change a workspace sandbox."},"disableOAuthAppAccess":{"type":"boolean","description":"Prevent OAuth apps from accessing this group's workspaces. The organization's default group also governs authorizing apps and refreshing their access."},"disableKnowledgeBaseExport":{"type":"boolean","description":"Prevent downloading a whole knowledge base as an archive."},"deniedPartialAccessProjectIssues":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Issues in the listed Projects are unavailable to teammates without access to every active environment."},"defaultAgentModel":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Default model for new Agent blocks. Null uses the platform default."}},"required":["allowedIntegrations","allowedModelProviders","deniedModels","deniedTools","hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","allowedFileShareAuthTypes","hideDeployApi","hideDeployMcp","hideDeployChatbot","allowedChatDeployAuthTypes","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","allowedKnowledgeConnectors","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport","deniedPartialAccessProjectIssues","defaultAgentModel"],"additionalProperties":false,"description":"Resolved group settings. True disables a boolean capability; null allowlists permit every value and empty allowlists permit none. defaultAgentModel selects the default for new Agent blocks without restricting model selection."},"isDefault":{"type":"boolean","description":"Whether this is the organization fallback group. It governs a human caller with no applicable workspace-specific group; its own membership assignments do not limit its audience. Organization-level actions use the default group."},"membershipMode":{"type":"string","description":"When no explicit assignments exist, an `inherit` group governs every member in its targeted workspaces. An empty `explicit` group, including a SCIM-managed group, governs nobody."},"workspaceIds":{"type":"array","items":{"type":"string"},"description":"Workspaces governed by a non-default group. Empty for the default group."},"createdBy":{"type":"string","description":"User who created the group."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the group was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the group was last updated."}},"required":["id","organizationId","name","description","config","isDefault","membershipMode","workspaceIds","createdBy","createdAt","updatedAt"],"additionalProperties":false,"title":"Permission group","description":"An organization permission group and its resolved settings for human callers. Workspace API keys use their workspace role and operation policy without a user permission group."},"Resources_ListPermissionGroupsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2PermissionGroup"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List permission groups response","description":"A page of permission groups with resolved settings.","examples":[{"data":[{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}],"nextCursor":null}]},"Resources_CreatePermissionGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroup"}},"required":["data"],"additionalProperties":false,"title":"Create permission group response","description":"The created group, its resolved settings, and workspace scope.","examples":[{"data":{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}}]},"Resources_CreatePermissionGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Group name, unique within the organization."},"description":{"description":"Optional group description.","type":"string","maxLength":500},"config":{"type":"object","properties":{"allowedIntegrations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."},"allowedModelProviders":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model providers are limited to this list. Null permits every value; an empty list permits none."},"deniedModels":{"type":"array","items":{"type":"string"},"description":"Models listed in this list are blocked."},"deniedTools":{"type":"array","items":{"type":"string"},"description":"Integration tools listed in this list are blocked."},"hideTraceSpans":{"type":"boolean","description":"Withhold per-block trace spans from logs and from the API."},"hideKnowledgeBaseTab":{"type":"boolean","description":"Revoke the Knowledge Base module. Members cannot open, search, or query any knowledge base."},"hideTablesTab":{"type":"boolean","description":"Revoke the Tables module. Members cannot read or write any table."},"hideCopilot":{"type":"boolean","description":"Revoke Chat. Members cannot ask Sim to build or edit anything."},"hideIntegrationsTab":{"type":"boolean","description":"Revoke integration connections. Members cannot view, add, or remove an OAuth connection."},"hideSecretsTab":{"type":"boolean","description":"Revoke secrets. Members cannot read, add, or change a workspace environment variable."},"hideApiKeysTab":{"type":"boolean","description":"Revoke workspace API keys. Members cannot list, create, or revoke one."},"hideInboxTab":{"type":"boolean","description":"Revoke the Sim Mailer inbox. Members cannot read or send mail."},"hideFilesTab":{"type":"boolean","description":"Revoke the Files module. Members cannot list, upload, or download workspace files."},"disableMcpTools":{"type":"boolean","description":"Block agents from calling MCP tools."},"disableCustomTools":{"type":"boolean","description":"Block agents from calling user-defined custom tools."},"disableSkills":{"type":"boolean","description":"Block agents from loading skills."},"disableInvitations":{"type":"boolean","description":"Prevent inviting anyone to a workspace or to the organization."},"disablePublicApi":{"type":"boolean","description":"Revoke public API access. Calls to a deployed workflow are refused."},"disablePublicFileSharing":{"type":"boolean","description":"Revoke public file sharing. Members cannot create a share link."},"allowedFileShareAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Public file-share authentication is limited to this list. Null permits every value; an empty list permits none."},"hideDeployApi":{"type":"boolean","description":"Prevent deploying a workflow as an API endpoint."},"hideDeployMcp":{"type":"boolean","description":"Prevent exposing a workflow as an MCP server."},"hideDeployChatbot":{"type":"boolean","description":"Prevent deploying a workflow as a chat."},"allowedChatDeployAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Chat deployment authentication is limited to this list. Null permits every value; an empty list permits none."},"disablePersonalApiKeys":{"type":"boolean","description":"Prevent members from using a personal API key against this workspace."},"disableLogExport":{"type":"boolean","description":"Prevent downloading execution logs as a CSV."},"hideCostInfo":{"type":"boolean","description":"Withhold execution cost. Logs and member exports omit cost and token spend; organization-level data drains, configurable by org admins only, are not projected."},"disableKnowledgeBaseCreation":{"type":"boolean","description":"Prevent creating knowledge bases, leaving existing ones queryable."},"disableKnowledgeBaseFileUpload":{"type":"boolean","description":"Prevent uploading local documents, leaving sanctioned connectors as the only source."},"allowedKnowledgeConnectors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Knowledge base connectors are limited to this list. Null permits every value; an empty list permits none."},"disableTableCreation":{"type":"boolean","description":"Prevent creating tables, leaving existing ones usable."},"disableTableExport":{"type":"boolean","description":"Prevent downloading a whole table as CSV or JSON."},"disableBulkFileDownload":{"type":"boolean","description":"Prevent downloading folders as an archive."},"disablePersonalCredentials":{"type":"boolean","description":"Prevent connecting personal credentials, leaving only workspace-shared ones."},"disableWorkspaceCreation":{"type":"boolean","description":"Prevent creating new workspaces, which no existing group would govern. Read from the organization's default group, because creating a workspace names none."},"hideOrgMemberDirectory":{"type":"boolean","description":"Withhold the member directory. Members cannot see the names or email addresses of other members. Read from the organization's default group, because the directory belongs to the organization and names no workspace."},"disableCliAccess":{"type":"boolean","description":"Prevent approving a CLI login or using Sim CLI OAuth tokens for the public API. A login naming one of this group's workspaces is refused; an account-level login names none, so it is read from the organization's default group."},"disableWebhookTriggers":{"type":"boolean","description":"Prevent making a workflow reachable from an inbound webhook."},"disableToolAutoApproval":{"type":"boolean","description":"Prevent silencing a tool confirmation, so every call is confirmed again."},"hideSandboxesTab":{"type":"boolean","description":"Revoke the Sandboxes module. Members cannot view, create, or change a workspace sandbox."},"disableOAuthAppAccess":{"type":"boolean","description":"Prevent OAuth apps from accessing this group's workspaces. The organization's default group also governs authorizing apps and refreshing their access."},"disableKnowledgeBaseExport":{"type":"boolean","description":"Prevent downloading a whole knowledge base as an archive."},"deniedPartialAccessProjectIssues":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Issues in the listed Projects are unavailable to teammates without access to every active environment."},"defaultAgentModel":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Default model for new Agent blocks. Null uses the platform default."}},"additionalProperties":false,"description":"Group settings to set. Omitted keys use the default permission configuration."},"isDefault":{"description":"Whether the group is the organization default. Only one group can be the default.","type":"boolean"},"workspaceIds":{"description":"Workspace IDs targeted by a non-default group. Required when creating a non-default group; omit for a default group.","maxItems":500,"type":"array","items":{"type":"string","minLength":1}}},"required":["name"],"additionalProperties":false,"title":"Create permission group request","description":"Group name, initial restrictions, and default or workspace-specific scope.","examples":[{"name":"Restricted","workspaceIds":["workspace-123"]}]},"Resources_GetPermissionGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroup"}},"required":["data"],"additionalProperties":false,"title":"Get permission group response","description":"The group, its resolved settings, and workspace scope.","examples":[{"data":{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}}]},"Resources_UpdatePermissionGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroup"}},"required":["data"],"additionalProperties":false,"title":"Update permission group response","description":"The updated group with resolved settings and workspace scope.","examples":[{"data":{"id":"group-123","organizationId":"org-123","name":"Restricted","description":null,"config":{"allowedIntegrations":null,"allowedModelProviders":null,"deniedModels":[],"deniedTools":[],"hideTraceSpans":false,"hideKnowledgeBaseTab":false,"hideTablesTab":false,"hideCopilot":false,"hideIntegrationsTab":false,"hideSecretsTab":false,"hideApiKeysTab":false,"hideInboxTab":false,"hideFilesTab":false,"disableMcpTools":false,"disableCustomTools":false,"disableSkills":false,"disableInvitations":false,"disablePublicApi":false,"disablePublicFileSharing":false,"allowedFileShareAuthTypes":null,"hideDeployApi":false,"hideDeployMcp":false,"hideDeployChatbot":false,"allowedChatDeployAuthTypes":null,"disablePersonalApiKeys":false,"disableLogExport":false,"hideCostInfo":false,"disableKnowledgeBaseCreation":false,"disableKnowledgeBaseFileUpload":false,"allowedKnowledgeConnectors":null,"disableTableCreation":false,"disableTableExport":false,"disableBulkFileDownload":false,"disablePersonalCredentials":false,"disableWorkspaceCreation":false,"hideOrgMemberDirectory":false,"disableCliAccess":false,"disableWebhookTriggers":false,"disableToolAutoApproval":false,"hideSandboxesTab":false,"disableOAuthAppAccess":false,"disableKnowledgeBaseExport":false,"deniedPartialAccessProjectIssues":[],"defaultAgentModel":null},"isDefault":false,"membershipMode":"inherit","workspaceIds":["workspace-123"],"createdBy":"admin-123","createdAt":"2026-06-01T09:00:00.000Z","updatedAt":"2026-06-01T09:00:00.000Z"}}]},"Resources_UpdatePermissionGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Group name, unique within the organization."},"description":{"description":"Group description. Null or an empty string clears it; omission leaves it unchanged.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"config":{"type":"object","properties":{"allowedIntegrations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."},"allowedModelProviders":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model providers are limited to this list. Null permits every value; an empty list permits none."},"deniedModels":{"type":"array","items":{"type":"string"},"description":"Models listed in this list are blocked."},"deniedTools":{"type":"array","items":{"type":"string"},"description":"Integration tools listed in this list are blocked."},"hideTraceSpans":{"type":"boolean","description":"Withhold per-block trace spans from logs and from the API."},"hideKnowledgeBaseTab":{"type":"boolean","description":"Revoke the Knowledge Base module. Members cannot open, search, or query any knowledge base."},"hideTablesTab":{"type":"boolean","description":"Revoke the Tables module. Members cannot read or write any table."},"hideCopilot":{"type":"boolean","description":"Revoke Chat. Members cannot ask Sim to build or edit anything."},"hideIntegrationsTab":{"type":"boolean","description":"Revoke integration connections. Members cannot view, add, or remove an OAuth connection."},"hideSecretsTab":{"type":"boolean","description":"Revoke secrets. Members cannot read, add, or change a workspace environment variable."},"hideApiKeysTab":{"type":"boolean","description":"Revoke workspace API keys. Members cannot list, create, or revoke one."},"hideInboxTab":{"type":"boolean","description":"Revoke the Sim Mailer inbox. Members cannot read or send mail."},"hideFilesTab":{"type":"boolean","description":"Revoke the Files module. Members cannot list, upload, or download workspace files."},"disableMcpTools":{"type":"boolean","description":"Block agents from calling MCP tools."},"disableCustomTools":{"type":"boolean","description":"Block agents from calling user-defined custom tools."},"disableSkills":{"type":"boolean","description":"Block agents from loading skills."},"disableInvitations":{"type":"boolean","description":"Prevent inviting anyone to a workspace or to the organization."},"disablePublicApi":{"type":"boolean","description":"Revoke public API access. Calls to a deployed workflow are refused."},"disablePublicFileSharing":{"type":"boolean","description":"Revoke public file sharing. Members cannot create a share link."},"allowedFileShareAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Public file-share authentication is limited to this list. Null permits every value; an empty list permits none."},"hideDeployApi":{"type":"boolean","description":"Prevent deploying a workflow as an API endpoint."},"hideDeployMcp":{"type":"boolean","description":"Prevent exposing a workflow as an MCP server."},"hideDeployChatbot":{"type":"boolean","description":"Prevent deploying a workflow as a chat."},"allowedChatDeployAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Chat deployment authentication is limited to this list. Null permits every value; an empty list permits none."},"disablePersonalApiKeys":{"type":"boolean","description":"Prevent members from using a personal API key against this workspace."},"disableLogExport":{"type":"boolean","description":"Prevent downloading execution logs as a CSV."},"hideCostInfo":{"type":"boolean","description":"Withhold execution cost. Logs and member exports omit cost and token spend; organization-level data drains, configurable by org admins only, are not projected."},"disableKnowledgeBaseCreation":{"type":"boolean","description":"Prevent creating knowledge bases, leaving existing ones queryable."},"disableKnowledgeBaseFileUpload":{"type":"boolean","description":"Prevent uploading local documents, leaving sanctioned connectors as the only source."},"allowedKnowledgeConnectors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Knowledge base connectors are limited to this list. Null permits every value; an empty list permits none."},"disableTableCreation":{"type":"boolean","description":"Prevent creating tables, leaving existing ones usable."},"disableTableExport":{"type":"boolean","description":"Prevent downloading a whole table as CSV or JSON."},"disableBulkFileDownload":{"type":"boolean","description":"Prevent downloading folders as an archive."},"disablePersonalCredentials":{"type":"boolean","description":"Prevent connecting personal credentials, leaving only workspace-shared ones."},"disableWorkspaceCreation":{"type":"boolean","description":"Prevent creating new workspaces, which no existing group would govern. Read from the organization's default group, because creating a workspace names none."},"hideOrgMemberDirectory":{"type":"boolean","description":"Withhold the member directory. Members cannot see the names or email addresses of other members. Read from the organization's default group, because the directory belongs to the organization and names no workspace."},"disableCliAccess":{"type":"boolean","description":"Prevent approving a CLI login or using Sim CLI OAuth tokens for the public API. A login naming one of this group's workspaces is refused; an account-level login names none, so it is read from the organization's default group."},"disableWebhookTriggers":{"type":"boolean","description":"Prevent making a workflow reachable from an inbound webhook."},"disableToolAutoApproval":{"type":"boolean","description":"Prevent silencing a tool confirmation, so every call is confirmed again."},"hideSandboxesTab":{"type":"boolean","description":"Revoke the Sandboxes module. Members cannot view, create, or change a workspace sandbox."},"disableOAuthAppAccess":{"type":"boolean","description":"Prevent OAuth apps from accessing this group's workspaces. The organization's default group also governs authorizing apps and refreshing their access."},"disableKnowledgeBaseExport":{"type":"boolean","description":"Prevent downloading a whole knowledge base as an archive."},"deniedPartialAccessProjectIssues":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Issues in the listed Projects are unavailable to teammates without access to every active environment."},"defaultAgentModel":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Default model for new Agent blocks. Null uses the platform default."}},"additionalProperties":false,"description":"Patch of group settings. Omitted keys remain unchanged; each supplied array replaces that entire list."},"isDefault":{"description":"Whether the group is the organization default. Only one group can be the default.","type":"boolean"},"workspaceIds":{"description":"Workspace identifiers for a non-default group. Required on creation; an empty update makes the group inactive.","maxItems":500,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false,"title":"Update permission group request","description":"Group fields and restriction keys to change; supplied lists replace their contents.","examples":[{"description":"Restricted workspace access"}]},"Resources_V2PermissionGroupDeletion":{"type":"object","properties":{"id":{"type":"string","description":"Deleted permission group identifier."},"deleted":{"type":"boolean","const":true,"description":"Whether the group was permanently deleted."}},"required":["id","deleted"],"additionalProperties":false,"title":"Permission group deletion","description":"Acknowledges permanent group deletion."},"Resources_DeletePermissionGroupResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroupDeletion"}},"required":["data"],"additionalProperties":false,"title":"Delete permission group response","description":"Acknowledgement that the group and its assignments were deleted.","examples":[{"data":{"id":"group-123","deleted":true}}]},"Resources_V2PermissionGroupMember":{"type":"object","properties":{"id":{"type":"string","description":"Membership assignment identifier."},"userId":{"type":"string","description":"Organization member assigned to the group."},"assignedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the member was assigned."},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member display name."},"userEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member email address."},"userImage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member avatar URL."}},"required":["id","userId","assignedAt","userName","userEmail","userImage"],"additionalProperties":false,"title":"Permission group member","description":"An explicit permission-group membership assignment."},"Resources_ListPermissionGroupMembersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2PermissionGroupMember"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List permission group members response","description":"A page of explicit group membership assignments.","examples":[{"data":[{"id":"assignment-123","userId":"user-123","assignedAt":"2026-06-01T09:00:00.000Z","userName":"Example Member","userEmail":"member@example.com","userImage":null}],"nextCursor":null}]},"Resources_V2PermissionGroupAssignment":{"type":"object","properties":{"id":{"type":"string","description":"Membership assignment identifier."},"permissionGroupId":{"type":"string","description":"Group receiving the member."},"organizationId":{"type":"string","description":"Organization that owns the group."},"userId":{"type":"string","description":"User assigned to the group."},"assignedBy":{"type":"string","description":"User who made the assignment."},"assignedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the assignment was created."}},"required":["id","permissionGroupId","organizationId","userId","assignedBy","assignedAt"],"additionalProperties":false,"title":"Permission group assignment","description":"The newly created membership assignment."},"Resources_AddPermissionGroupMemberResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroupAssignment"}},"required":["data"],"additionalProperties":false,"title":"Add permission group member response","description":"The new explicit membership assignment.","examples":[{"data":{"id":"assignment-123","permissionGroupId":"group-123","organizationId":"org-123","userId":"user-123","assignedBy":"admin-123","assignedAt":"2026-06-01T09:00:00.000Z"}}]},"Resources_AddPermissionGroupMemberRequest":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"description":"Existing organization member to add."}},"required":["userId"],"additionalProperties":false,"title":"Add permission group member request","description":"The organization member to assign to this group.","examples":[{"userId":"user-123"}]},"Resources_V2PermissionGroupMemberDeletion":{"type":"object","properties":{"userId":{"type":"string","description":"User whose membership assignment was removed."},"deleted":{"type":"boolean","const":true,"description":"Whether the assignment was removed."}},"required":["userId","deleted"],"additionalProperties":false,"title":"Permission group member deletion","description":"Acknowledges membership removal."},"Resources_RemovePermissionGroupMemberResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroupMemberDeletion"}},"required":["data"],"additionalProperties":false,"title":"Remove permission group member response","description":"Acknowledgement that the explicit assignment was removed.","examples":[{"data":{"userId":"user-123","deleted":true}}]},"Resources_V2PermissionGroupBulkAdd":{"type":"object","properties":{"added":{"type":"number","description":"Number of members added."},"skipped":{"type":"number","description":"Number of selected organization members already in the group."}},"required":["added","skipped"],"additionalProperties":false,"title":"Permission group bulk addition","description":"Counts of added and already assigned organization members."},"Resources_BulkAddPermissionGroupMembersResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2PermissionGroupBulkAdd"}},"required":["data"],"additionalProperties":false,"title":"Bulk add permission group members response","description":"Counts of added members and existing assignments skipped.","examples":[{"data":{"added":1,"skipped":0}}]},"Resources_BulkAddPermissionGroupMembersRequest":{"type":"object","properties":{"userIds":{"description":"Organization member identifiers. Existing group members are skipped; users outside the organization are ignored.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"addAllOrganizationMembers":{"description":"Add every current organization member in bounded batches within one transaction. Cannot be combined with userIds.","type":"boolean"}},"additionalProperties":false,"title":"Bulk add permission group members request","description":"Selected organization members or the entire current organization roster.","examples":[{"userIds":["user-123"]}]},"Resources_V2Organization":{"type":"object","properties":{"id":{"type":"string","description":"Organization identifier."},"name":{"type":"string","description":"Organization display name."},"slug":{"type":"string","description":"Organization slug."},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization logo URL, or null when unset."},"role":{"type":"string","enum":["owner","admin","member"],"description":"The acting user’s role in this organization."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the organization was created."}},"required":["id","name","slug","logo","role","createdAt"],"additionalProperties":false,"title":"Organization","description":"An organization the acting user belongs to."},"Resources_ListOrganizationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2Organization"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organizations response","description":"A page of organizations and the acting user’s role in each.","examples":[{"data":[{"id":"org-123","name":"Example Organization","slug":"example","logo":null,"role":"admin","createdAt":"2026-06-01T09:00:00.000Z"}],"nextCursor":null}]},"Resources_GetOrganizationResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2Organization"}},"required":["data"],"additionalProperties":false,"title":"Get organization response","description":"Organization metadata and the acting user’s role.","examples":[{"data":{"id":"org-123","name":"Example Organization","slug":"example","logo":null,"role":"admin","createdAt":"2026-06-01T09:00:00.000Z"}}]},"Resources_V2OrganizationWorkspace":{"type":"object","properties":{"id":{"type":"string","description":"Workspace identifier."},"name":{"type":"string","description":"Workspace display name."}},"required":["id","name"],"additionalProperties":false,"title":"Organization workspace","description":"A workspace owned by the organization."},"Resources_ListOrganizationWorkspacesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2OrganizationWorkspace"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization workspaces response","description":"A page of active workspaces owned by the organization.","examples":[{"data":[{"id":"workspace-123","name":"Engineering"}],"nextCursor":null}]},"Resources_V2OrganizationMember":{"type":"object","properties":{"userId":{"type":"string","description":"User identifier; use this identifier to update or remove the member."},"name":{"type":"string","description":"Member display name."},"email":{"type":"string","description":"Member email address."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Organization role; separate from workspace permissions."},"joinedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the user joined the organization."}},"required":["userId","name","email","role","joinedAt"],"additionalProperties":false,"title":"Organization member","description":"An organization membership identified by user ID."},"Resources_ListOrganizationMembersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2OrganizationMember"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization members response","description":"A page of organization members and their organization roles.","examples":[{"data":[{"userId":"user-123","name":"Example Member","email":"member@example.com","role":"member","joinedAt":"2026-06-01T09:00:00.000Z"}],"nextCursor":null}]},"Resources_UpdateOrganizationMemberResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationMember"}},"required":["data"],"additionalProperties":false,"title":"Update organization member response","description":"The member with the updated organization role.","examples":[{"data":{"userId":"user-123","name":"Example Member","email":"member@example.com","role":"admin","joinedAt":"2026-06-01T09:00:00.000Z"}}]},"Resources_UpdateOrganizationMemberBody":{"type":"object","properties":{"role":{"type":"string","enum":["member","admin"],"description":"New organization role. Ownership transfers use a separate operation."}},"required":["role"],"additionalProperties":false,"title":"Update organization member body","description":"The new organization role for this member.","examples":[{"role":"admin"}]},"Resources_V2OrganizationMemberDeletion":{"type":"object","properties":{"userId":{"type":"string","description":"User removed from the organization."},"deleted":{"type":"boolean","const":true,"description":"Whether membership and organization workspace access were removed."}},"required":["userId","deleted"],"additionalProperties":false,"title":"Organization member removal","description":"Acknowledges removal of an organization member."},"Resources_RemoveOrganizationMemberResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationMemberDeletion"}},"required":["data"],"additionalProperties":false,"title":"Remove organization member response","description":"Acknowledgement that organization access was removed.","examples":[{"data":{"userId":"user-123","deleted":true}}]},"Resources_V2OrganizationInvitation":{"type":"object","properties":{"id":{"type":"string","description":"Invitation identifier."},"organizationId":{"type":"string","description":"Organization that owns the invitation."},"email":{"type":"string","description":"Email address of the invitee."},"role":{"type":"string","enum":["member","admin"],"description":"Organization role offered to an internal invitee."},"kind":{"type":"string","enum":["organization","workspace"],"description":"Whether the invitation originated from organization or workspace administration."},"membershipIntent":{"type":"string","enum":["internal","external"],"description":"Whether acceptance joins the organization or grants workspace access only."},"status":{"type":"string","enum":["pending","accepted","rejected","cancelled","expired"],"description":"Current invitation status; elapsed pending invitations are reported as expired."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the invitation was created."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the invitation expires."}},"required":["id","organizationId","email","role","kind","membershipIntent","status","createdAt","expiresAt"],"additionalProperties":false,"title":"Organization invitation","description":"Invitation metadata without its acceptance token."},"Resources_ListOrganizationInvitationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2OrganizationInvitation"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization invitations response","description":"A page of invitations, including their current status.","examples":[{"data":[{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}],"nextCursor":null}]},"Resources_CreateOrganizationInvitationResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationInvitation"}},"required":["data"],"additionalProperties":false,"title":"Create organization invitation response","description":"The pending organization invitation.","examples":[{"data":{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}}]},"Resources_CreateOrganizationInvitationBody":{"type":"object","properties":{"email":{"type":"string","minLength":1,"maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email address of the person to invite."},"role":{"default":"member","description":"Organization role to offer. Defaults to member; grants no workspace-specific permissions.","type":"string","enum":["member","admin"]}},"required":["email"],"additionalProperties":false,"title":"Create organization invitation body","description":"Invitee email and organization role to offer.","examples":[{"email":"member@example.com","role":"member"}]},"Resources_GetOrganizationInvitationResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationInvitation"}},"required":["data"],"additionalProperties":false,"title":"Get organization invitation response","description":"Invitation metadata without its acceptance token.","examples":[{"data":{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}}]},"Resources_V2OrganizationInvitationWorkspace":{"type":"object","properties":{"id":{"type":"string","description":"Workspace identifier."},"name":{"type":"string","description":"Workspace display name."},"permission":{"type":"string","enum":["admin","write","read"],"description":"Workspace permission offered by the invitation."},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When the workspace was archived, or null while active."}},"required":["id","name","permission","archivedAt"],"additionalProperties":false,"title":"Organization invitation workspace","description":"A workspace grant attached to an invitation, separate from organization membership."},"Resources_ListOrganizationInvitationWorkspacesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2OrganizationInvitationWorkspace"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization invitation workspaces response","description":"Workspace grants retained on an invitation.","examples":[{"data":[{"id":"workspace-123","name":"Engineering","permission":"write","archivedAt":null}],"nextCursor":null}]},"Resources_ResendOrganizationInvitationResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationInvitation"}},"required":["data"],"additionalProperties":false,"title":"Resend organization invitation response","description":"The pending invitation with its renewed expiry.","examples":[{"data":{"id":"invitation-123","organizationId":"org-123","email":"member@example.com","role":"member","kind":"organization","membershipIntent":"internal","status":"pending","createdAt":"2026-06-01T09:00:00.000Z","expiresAt":"2026-06-08T09:00:00.000Z"}}]},"Resources_ResendOrganizationInvitationBody":{"default":{},"title":"Resend organization invitation body","description":"An empty JSON object; the pending invitation supplies the recipient and role.","examples":[{}],"type":"object","properties":{},"additionalProperties":false},"Resources_V2OrganizationInvitationRevocation":{"type":"object","properties":{"id":{"type":"string","description":"Revoked invitation identifier."},"status":{"type":"string","const":"cancelled","description":"Revocation cancels the invitation and prevents acceptance."}},"required":["id","status"],"additionalProperties":false,"title":"Organization invitation revocation","description":"Acknowledges cancellation of a pending invitation."},"Resources_RevokeOrganizationInvitationResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationInvitationRevocation"}},"required":["data"],"additionalProperties":false,"title":"Revoke organization invitation response","description":"Acknowledgement that the pending invitation was cancelled.","examples":[{"data":{"id":"invitation-123","status":"cancelled"}}]},"Resources_ListSsoProvidersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Provider record identifier."},"providerId":{"type":"string","minLength":1,"description":"Globally unique identity provider identifier."},"providerType":{"type":"string","enum":["oidc","saml"],"description":"Identity provider protocol."},"domain":{"type":"string","description":"Email domain served by the provider."},"domainKey":{"type":"string","description":"Normalized email domain used for sign-in."},"issuer":{"type":"string","description":"Identity provider issuer URL."},"oidcConfig":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON configuration with the client secret redacted; null for SAML."},"samlConfig":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON configuration without private keys; null for OIDC."},"jitProvisioningEnabled":{"type":"boolean","description":"Whether successful SSO sign-in may add organization members, subject to membership and seat policies."},"domainVerified":{"type":"boolean","description":"Whether the provider has a verified domain grant."},"isPrimary":{"type":"boolean","description":"Whether this provider currently handles sign-in for its domain."}},"required":["id","providerId","providerType","domain","domainKey","issuer","oidcConfig","samlConfig","jitProvisioningEnabled","domainVerified","isPrimary"],"additionalProperties":false},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List SSO providers response","description":"A page of identity providers with redacted configuration."},"Resources_GetSsoProviderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Provider record identifier."},"providerId":{"type":"string","minLength":1,"description":"Globally unique identity provider identifier."},"providerType":{"type":"string","enum":["oidc","saml"],"description":"Identity provider protocol."},"domain":{"type":"string","description":"Email domain served by the provider."},"domainKey":{"type":"string","description":"Normalized email domain used for sign-in."},"issuer":{"type":"string","description":"Identity provider issuer URL."},"oidcConfig":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON configuration with the client secret redacted; null for SAML."},"samlConfig":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON configuration without private keys; null for OIDC."},"jitProvisioningEnabled":{"type":"boolean","description":"Whether successful SSO sign-in may add organization members, subject to membership and seat policies."},"domainVerified":{"type":"boolean","description":"Whether the provider has a verified domain grant."},"isPrimary":{"type":"boolean","description":"Whether this provider currently handles sign-in for its domain."}},"required":["id","providerId","providerType","domain","domainKey","issuer","oidcConfig","samlConfig","jitProvisioningEnabled","domainVerified","isPrimary"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Get SSO provider response","description":"The identity provider with redacted configuration."},"Resources_SaveSsoProviderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"description":"Saved provider identifier."},"providerType":{"type":"string","enum":["oidc","saml"],"description":"Saved identity provider protocol."},"created":{"type":"boolean","description":"Whether a new provider was created."}},"required":["providerId","providerType","created"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Save SSO provider response","description":"The saved provider ID, protocol, and whether it was created."},"Resources_SaveSsoProviderBody":{"oneOf":[{"type":"object","properties":{"providerType":{"type":"string","const":"oidc","description":"Configure an OpenID Connect identity provider."},"providerId":{"type":"string","minLength":1,"maxLength":255,"description":"Globally unique provider ID; saving an existing provider replaces its supplied configuration."},"issuer":{"type":"string","maxLength":2048,"format":"uri","description":"Identity provider issuer URL."},"domain":{"type":"string","minLength":1,"maxLength":255,"description":"Email domain already verified by this organization."},"jitProvisioningEnabled":{"default":true,"description":"Allow SSO sign-in to provision organization membership, subject to eligibility and available seats.","type":"boolean"},"mapping":{"default":{"id":"sub","email":"email","name":"name","image":"picture"},"description":"Identity-provider claims mapped to user fields.","type":"object","properties":{"id":{"default":"sub","description":"Claim holding the stable identity identifier.","type":"string","minLength":1,"maxLength":255},"email":{"default":"email","description":"Claim holding the email address.","type":"string","minLength":1,"maxLength":255},"name":{"default":"name","description":"Claim holding the display name.","type":"string","minLength":1,"maxLength":255},"image":{"default":"picture","description":"Claim holding the avatar URL.","type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"clientId":{"type":"string","minLength":1,"maxLength":1024,"description":"Identity provider client identifier."},"clientSecret":{"type":"string","minLength":1,"maxLength":8192,"description":"Write-only client secret; the redacted marker from Get SSO Provider preserves an existing secret.","writeOnly":true},"scopes":{"default":["openid","profile","email"],"description":"OIDC scopes; offline_access is omitted.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"pkce":{"default":true,"description":"Use PKCE for the authorization flow.","type":"boolean"},"authorizationEndpoint":{"description":"Optional authorization endpoint; otherwise resolved through issuer discovery.","type":"string","maxLength":2048,"format":"uri"},"tokenEndpoint":{"description":"Optional token endpoint; otherwise resolved through issuer discovery.","type":"string","maxLength":2048,"format":"uri"},"userInfoEndpoint":{"description":"Optional UserInfo endpoint.","type":"string","maxLength":2048,"format":"uri"},"skipUserInfoEndpoint":{"default":false,"description":"Read identity claims from the ID token instead of calling UserInfo.","type":"boolean"},"jwksEndpoint":{"description":"Optional signing-key endpoint; otherwise resolved through issuer discovery.","type":"string","maxLength":2048,"format":"uri"}},"required":["providerType","providerId","issuer","domain","clientId","clientSecret"],"additionalProperties":false},{"type":"object","properties":{"providerType":{"type":"string","const":"saml","description":"Configure a SAML identity provider."},"providerId":{"type":"string","minLength":1,"maxLength":255,"description":"Globally unique provider ID; saving an existing provider replaces its supplied configuration."},"issuer":{"type":"string","maxLength":2048,"format":"uri","description":"Identity provider issuer URL."},"domain":{"type":"string","minLength":1,"maxLength":255,"description":"Email domain already verified by this organization."},"jitProvisioningEnabled":{"default":true,"description":"Allow SSO sign-in to provision organization membership, subject to eligibility and available seats.","type":"boolean"},"mapping":{"default":{"id":"sub","email":"email","name":"name","image":"picture"},"description":"Identity-provider claims mapped to user fields.","type":"object","properties":{"id":{"default":"sub","description":"Claim holding the stable identity identifier.","type":"string","minLength":1,"maxLength":255},"email":{"default":"email","description":"Claim holding the email address.","type":"string","minLength":1,"maxLength":255},"name":{"default":"name","description":"Claim holding the display name.","type":"string","minLength":1,"maxLength":255},"image":{"default":"picture","description":"Claim holding the avatar URL.","type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"entryPoint":{"type":"string","maxLength":2048,"format":"uri","description":"Identity provider SAML sign-in endpoint."},"cert":{"type":"string","minLength":1,"maxLength":65536,"description":"Identity provider signing certificate."},"callbackUrl":{"description":"SAML callback URL; defaults to this provider’s Sim callback.","type":"string","maxLength":2048,"format":"uri"},"audience":{"description":"SAML audience; omission preserves the saved value.","type":"string","maxLength":2048},"wantAssertionsSigned":{"description":"Require signed assertions; omission preserves the saved value.","type":"boolean"},"signatureAlgorithm":{"description":"Signature algorithm accepted by the SAML configuration validator; omission preserves the saved value.","type":"string","maxLength":255},"digestAlgorithm":{"description":"Digest algorithm accepted by the SAML configuration validator; omission preserves the saved value.","type":"string","maxLength":255},"identifierFormat":{"description":"SAML NameID format; omission clears the saved value.","type":"string","maxLength":2048},"idpMetadata":{"description":"Identity provider metadata XML; omission clears the saved document.","type":"string","maxLength":102400}},"required":["providerType","providerId","issuer","domain","entryPoint","cert"],"additionalProperties":false}],"title":"Save SSO provider body","description":"Provider protocol, verified domain, and identity-provider configuration. Omission behavior is field-specific."},"Resources_DeleteSsoProviderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"description":"Removed provider identifier."},"deleted":{"type":"boolean","const":true,"description":"The provider was removed; existing accounts and memberships remain."}},"required":["providerId","deleted"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Delete SSO provider response","description":"Acknowledgement that the identity provider was removed."},"Resources_SetPrimarySsoProviderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"description":"Provider selected for domain sign-in."},"domain":{"type":"string","description":"Verified domain whose primary provider changed."}},"required":["providerId","domain"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Set primary SSO provider response","description":"The provider selected for its verified domain."},"Resources_SetPrimarySsoProviderBody":{"default":{},"title":"Set primary SSO provider body","description":"An empty JSON object; the path identifies the provider to make primary.","type":"object","properties":{},"additionalProperties":false},"Resources_GetSsoPolicyResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"requireSso":{"type":"boolean","description":"Stored single sign-on requirement."},"hasVerifiedProvider":{"type":"boolean","description":"Whether a verified provider can satisfy the requirement."},"isEnforced":{"type":"boolean","description":"Whether sign-in currently enforces the requirement."}},"required":["requireSso","hasVerifiedProvider","isEnforced"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Get SSO policy response","description":"The stored SSO requirement and its effective enforcement state."},"Resources_UpdateSsoPolicyResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"requireSso":{"type":"boolean","description":"Stored single sign-on requirement."},"hasVerifiedProvider":{"type":"boolean","description":"Whether a verified provider can satisfy the requirement."},"isEnforced":{"type":"boolean","description":"Whether sign-in currently enforces the requirement."}},"required":["requireSso","hasVerifiedProvider","isEnforced"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Update SSO policy response","description":"The saved SSO requirement and its effective enforcement state."},"Resources_UpdateSsoPolicyBody":{"type":"object","properties":{"requireSso":{"type":"boolean","description":"Require organization SSO on future sign-ins; existing sessions remain active."}},"required":["requireSso"],"additionalProperties":false,"title":"Update SSO policy body","description":"Whether future sign-ins must use SSO."},"Resources_ListOrganizationDomainsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Domain claim identifier."},"domain":{"type":"string","description":"Normalized email domain."},"status":{"type":"string","enum":["pending","verified"],"description":"DNS ownership verification state."},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When domain ownership was verified."},"challengeHost":{"type":"string","description":"DNS host where the verification TXT record must be published."},"txtRecordValue":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"TXT record value for a pending domain; only administrators receive it."}},"required":["id","domain","status","verifiedAt","challengeHost","txtRecordValue"],"additionalProperties":false},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization domains response","description":"A page of domain claims; pending challenges are limited to Admins."},"Resources_AddOrganizationDomainResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Domain claim identifier."},"domain":{"type":"string","description":"Normalized email domain."},"status":{"type":"string","enum":["pending","verified"],"description":"DNS ownership verification state."},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When domain ownership was verified."},"challengeHost":{"type":"string","description":"DNS host where the verification TXT record must be published."},"txtRecordValue":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"TXT record value for a pending domain; only administrators receive it."}},"required":["id","domain","status","verifiedAt","challengeHost","txtRecordValue"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Add organization domain response","description":"The domain claim and its pending DNS challenge, when applicable."},"Resources_AddOrganizationDomainBody":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"Domain to claim and verify through a DNS TXT record."}},"required":["domain"],"additionalProperties":false,"title":"Add organization domain body","description":"The domain to claim and verify."},"Resources_VerifyOrganizationDomainResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Domain claim identifier."},"domain":{"type":"string","description":"Normalized email domain."},"status":{"type":"string","enum":["pending","verified"],"description":"DNS ownership verification state."},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When domain ownership was verified."},"challengeHost":{"type":"string","description":"DNS host where the verification TXT record must be published."},"txtRecordValue":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"TXT record value for a pending domain; only administrators receive it."}},"required":["id","domain","status","verifiedAt","challengeHost","txtRecordValue"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Verify organization domain response","description":"The domain claim after ownership verification."},"Resources_VerifyOrganizationDomainBody":{"default":{},"title":"Verify organization domain body","description":"An empty JSON object; verification uses the claim’s current DNS challenge.","type":"object","properties":{},"additionalProperties":false},"Resources_RemoveOrganizationDomainResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Removed domain claim identifier."},"deleted":{"type":"boolean","const":true,"description":"The claim was removed; providers on this domain lose verified sign-in authority."}},"required":["id","deleted"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Remove organization domain response","description":"Acknowledgement that the domain claim was removed."},"Resources_ListCredentialMembersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Membership identifier; inherited grants have a derived identifier."},"userId":{"type":"string","minLength":1,"description":"User holding the credential grant."},"role":{"type":"string","enum":["admin","member"],"description":"Effective credential role."},"status":{"type":"string","enum":["active","pending","revoked"],"description":"Explicit grant status, or active for inherited administrators."},"joinedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When the explicit grant started; null for an inherited-only grant."},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member display name."},"userEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member email."},"userImage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member avatar URL."},"roleSource":{"type":"string","enum":["explicit","workspace-admin"],"description":"Whether workspace administrator access supplies the grant."}},"required":["id","userId","role","status","joinedAt","userName","userEmail","userImage","roleSource"],"additionalProperties":false},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List credential members response","description":"A page of explicit and inherited credential grants."},"Resources_UpsertCredentialMemberResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"description":"User whose explicit grant was saved."},"role":{"type":"string","enum":["admin","member"],"description":"Saved explicit credential role."},"created":{"type":"boolean","description":"Whether a new explicit grant was created."}},"required":["userId","role","created"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Upsert credential member response","description":"The saved credential role and whether a grant was created."},"Resources_UpsertCredentialMemberBody":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":255,"description":"Existing workspace member to grant or change access for."},"role":{"type":"string","enum":["admin","member"],"description":"Credential role to grant; workspace administrators cannot be demoted."}},"required":["userId","role"],"additionalProperties":false,"title":"Upsert credential member body","description":"The current workspace member and credential role to grant."},"Resources_RemoveCredentialMemberResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"description":"User whose explicit grant was revoked."},"revoked":{"type":"boolean","const":true,"description":"The grant is revoked; inherited workspace administrator access is preserved."}},"required":["userId","revoked"],"additionalProperties":false,"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Remove credential member response","description":"Acknowledgement that the explicit credential grant was revoked."},"Resources_V2WorkspacePermissionConfig":{"type":"object","properties":{"permissionGroupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Identifier of the group governing the caller; null when no group applies."},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the governing permission group."},"config":{"anyOf":[{"type":"object","properties":{"allowedIntegrations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."},"allowedModelProviders":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model providers are limited to this list. Null permits every value; an empty list permits none."},"deniedModels":{"default":[],"type":"array","items":{"type":"string"},"description":"Models listed in this list are blocked."},"deniedTools":{"default":[],"type":"array","items":{"type":"string"},"description":"Integration tools listed in this list are blocked."},"hideTraceSpans":{"type":"boolean","description":"Withhold per-block trace spans from logs and from the API."},"hideKnowledgeBaseTab":{"type":"boolean","description":"Revoke the Knowledge Base module. Members cannot open, search, or query any knowledge base."},"hideTablesTab":{"type":"boolean","description":"Revoke the Tables module. Members cannot read or write any table."},"hideCopilot":{"type":"boolean","description":"Revoke Chat. Members cannot ask Sim to build or edit anything."},"hideIntegrationsTab":{"type":"boolean","description":"Revoke integration connections. Members cannot view, add, or remove an OAuth connection."},"hideSecretsTab":{"type":"boolean","description":"Revoke secrets. Members cannot read, add, or change a workspace environment variable."},"hideApiKeysTab":{"type":"boolean","description":"Revoke workspace API keys. Members cannot list, create, or revoke one."},"hideInboxTab":{"type":"boolean","description":"Revoke the Sim Mailer inbox. Members cannot read or send mail."},"hideFilesTab":{"type":"boolean","description":"Revoke the Files module. Members cannot list, upload, or download workspace files."},"disableMcpTools":{"type":"boolean","description":"Block agents from calling MCP tools."},"disableCustomTools":{"type":"boolean","description":"Block agents from calling user-defined custom tools."},"disableSkills":{"type":"boolean","description":"Block agents from loading skills."},"disableInvitations":{"type":"boolean","description":"Prevent inviting anyone to a workspace or to the organization."},"disablePublicApi":{"type":"boolean","description":"Revoke public API access. Calls to a deployed workflow are refused."},"disablePublicFileSharing":{"type":"boolean","description":"Revoke public file sharing. Members cannot create a share link."},"allowedFileShareAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Public file-share authentication is limited to this list. Null permits every value; an empty list permits none."},"hideDeployApi":{"type":"boolean","description":"Prevent deploying a workflow as an API endpoint."},"hideDeployMcp":{"type":"boolean","description":"Prevent exposing a workflow as an MCP server."},"hideDeployChatbot":{"type":"boolean","description":"Prevent deploying a workflow as a chat."},"allowedChatDeployAuthTypes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["public","password","email","sso"]}},{"type":"null"}],"description":"Chat deployment authentication is limited to this list. Null permits every value; an empty list permits none."},"disablePersonalApiKeys":{"type":"boolean","description":"Prevent members from using a personal API key against this workspace."},"disableLogExport":{"type":"boolean","description":"Prevent downloading execution logs as a CSV."},"hideCostInfo":{"type":"boolean","description":"Withhold execution cost. Logs and member exports omit cost and token spend; organization-level data drains, configurable by org admins only, are not projected."},"disableKnowledgeBaseCreation":{"type":"boolean","description":"Prevent creating knowledge bases, leaving existing ones queryable."},"disableKnowledgeBaseFileUpload":{"type":"boolean","description":"Prevent uploading local documents, leaving sanctioned connectors as the only source."},"allowedKnowledgeConnectors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Knowledge base connectors are limited to this list. Null permits every value; an empty list permits none."},"disableTableCreation":{"type":"boolean","description":"Prevent creating tables, leaving existing ones usable."},"disableTableExport":{"type":"boolean","description":"Prevent downloading a whole table as CSV or JSON."},"disableBulkFileDownload":{"type":"boolean","description":"Prevent downloading folders as an archive."},"disablePersonalCredentials":{"type":"boolean","description":"Prevent connecting personal credentials, leaving only workspace-shared ones."},"disableWorkspaceCreation":{"type":"boolean","description":"Prevent creating new workspaces, which no existing group would govern. Read from the organization's default group, because creating a workspace names none."},"hideOrgMemberDirectory":{"type":"boolean","description":"Withhold the member directory. Members cannot see the names or email addresses of other members. Read from the organization's default group, because the directory belongs to the organization and names no workspace."},"disableCliAccess":{"type":"boolean","description":"Prevent approving a CLI login or using Sim CLI OAuth tokens for the public API. A login naming one of this group's workspaces is refused; an account-level login names none, so it is read from the organization's default group."},"disableWebhookTriggers":{"type":"boolean","description":"Prevent making a workflow reachable from an inbound webhook."},"disableToolAutoApproval":{"type":"boolean","description":"Prevent silencing a tool confirmation, so every call is confirmed again."},"hideSandboxesTab":{"type":"boolean","description":"Revoke the Sandboxes module. Members cannot view, create, or change a workspace sandbox."},"disableOAuthAppAccess":{"type":"boolean","description":"Prevent OAuth apps from accessing this group's workspaces. The organization's default group also governs authorizing apps and refreshing their access."},"disableKnowledgeBaseExport":{"type":"boolean","description":"Prevent downloading a whole knowledge base as an archive."},"deniedPartialAccessProjectIssues":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Issues in the listed Projects are unavailable to teammates without access to every active environment."},"defaultAgentModel":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Default model for new Agent blocks. Null uses the platform default."}},"required":["allowedIntegrations","allowedModelProviders","deniedModels","deniedTools","hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","allowedFileShareAuthTypes","hideDeployApi","hideDeployMcp","hideDeployChatbot","allowedChatDeployAuthTypes","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","allowedKnowledgeConnectors","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport","deniedPartialAccessProjectIssues","defaultAgentModel"],"additionalProperties":false},{"type":"null"}],"description":"Effective group settings. True disables a boolean capability; null allowlists allow all values and empty allowlists allow none. Null config means no group applies."},"entitled":{"type":"boolean","description":"Whether organization permission governance is active."},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization that owns the workspace; null for a personal workspace."},"isOrgAdmin":{"type":"boolean","description":"Whether the caller is an owner or administrator of the workspace’s organization."}},"required":["permissionGroupId","groupName","config","entitled","organizationId","isOrgAdmin"],"additionalProperties":false},"Resources_GetWorkspacePermissionConfigResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2WorkspacePermissionConfig"}},"required":["data"],"additionalProperties":false,"title":"Get workspace permission config response","description":"Configuration for the acting caller only.","examples":[{"data":{"permissionGroupId":null,"groupName":null,"config":null,"entitled":false,"organizationId":null,"isOrgAdmin":false}}]},"Resources_V2WorkspaceInvitationBatch":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether every recipient succeeded. Inspect failed even when the HTTP response is successful."},"successful":{"type":"array","items":{"type":"string"},"description":"Email addresses that received a pending invitation."},"added":{"type":"array","items":{"type":"string"},"description":"Existing organization members granted workspace access immediately."},"failed":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"Recipient whose operation failed."},"error":{"type":"string","description":"Reason the invitation or access grant could not be completed."}},"required":["email","error"],"additionalProperties":false},"description":"Failures for individual recipients. Earlier successful recipients remain committed."},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Invitation identifier, or direct-grant result identifier when instantAdd is true."},"email":{"type":"string","description":"Recipient email address."},"workspaceIds":{"type":"array","items":{"type":"string"},"description":"Workspaces included in this invitation or direct grant."},"permission":{"type":"string","enum":["admin","write","read"],"description":"Workspace permission offered or granted."},"membershipIntent":{"type":"string","enum":["internal","external"],"description":"Whether the recipient joins the organization or receives only workspace access."},"instantAdd":{"description":"Whether access was granted immediately without a pending invitation.","type":"boolean"},"outcome":{"description":"Result when reconciling access for an existing user.","type":"string","enum":["added","updated","unchanged"]}},"required":["id","email","workspaceIds","permission","membershipIntent"],"additionalProperties":false},"description":"Invitation and immediate-access results for successful recipients."}},"required":["success","successful","added","failed","invitations"],"additionalProperties":false},"Resources_CreateWorkspaceInvitationsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2WorkspaceInvitationBatch"}},"required":["data"],"additionalProperties":false,"title":"Create workspace invitations response","description":"Successful recipients remain committed when later recipients fail.","examples":[{"data":{"success":true,"successful":["member@example.com"],"added":[],"failed":[],"invitations":[{"id":"invitation-123","email":"member@example.com","workspaceIds":["workspace-123"],"permission":"write","membershipIntent":"internal"}]}}]},"Resources_CreateWorkspaceInvitationsBody":{"type":"object","properties":{"emails":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"Email addresses to invite. Each address is processed separately; inspect failed for unsuccessful recipients."},"permission":{"default":"read","description":"Workspace permission to grant. Existing workspace access is preserved.","type":"string","enum":["admin","write","read"]},"membership":{"default":"member","description":"Organization membership: member or admin uses a seat when billing is enabled. External grants workspace access only and requires an eligible paid account when billing is enabled. Existing members of another organization remain external.","type":"string","enum":["member","admin","external"]}},"required":["emails"],"additionalProperties":false,"title":"Create workspace invitations body","description":"Recipients and the access to grant.","examples":[{"emails":["member@example.com"],"permission":"write","membership":"member"}]},"Resources_V2OrganizationMemberUsageLimit":{"type":"object","properties":{"creditsUsed":{"type":"number","description":"Credits used by this person during the organization billing period."},"creditLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Per-person credit cap. Null means no per-person cap; organization limits still apply. Zero prevents further credit-consuming usage."},"billingInterval":{"type":"string","enum":["month","year"],"description":"Organization billing interval used for the credit cap."}},"required":["creditsUsed","creditLimit","billingInterval"],"additionalProperties":false},"Resources_GetOrganizationMemberUsageLimitResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationMemberUsageLimit"}},"required":["data"],"additionalProperties":false,"title":"Get organization member credit limit response","description":"The person’s current credit cap and billing-period consumption.","examples":[{"data":{"creditsUsed":200,"creditLimit":10000,"billingInterval":"month"}}]},"Resources_V2OrganizationMemberUsageLimitUpdate":{"type":"object","properties":{"creditLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Credit cap for this person. Send null to clear the cap or 0 to prevent further credit-consuming usage. Organization limits still apply."}},"required":["creditLimit"],"additionalProperties":false},"Resources_UpdateOrganizationMemberUsageLimitResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationMemberUsageLimitUpdate"}},"required":["data"],"additionalProperties":false,"title":"Update organization member credit limit response","description":"The saved credit cap, or null when the cap was cleared.","examples":[{"data":{"creditLimit":10000}}]},"Resources_UpdateOrganizationMemberUsageLimitBody":{"type":"object","properties":{"creditLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Credit cap for this person. Send null to clear the cap or 0 to prevent further credit-consuming usage. Organization limits still apply."}},"required":["creditLimit"],"additionalProperties":false,"title":"Update organization member credit limit body","description":"Credit cap in whole credits; null clears the cap.","examples":[{"creditLimit":10000},{"creditLimit":null}]},"Resources_V2OrganizationUsageSummary":{"type":"object","properties":{"window":{"type":"object","properties":{"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Inclusive reporting-window start."},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Exclusive reporting-window end."},"source":{"type":"string","enum":["reporting","stripe","default","range"],"description":"How the reporting window was resolved."}},"required":["start","end","source"],"additionalProperties":false,"description":"Resolved reporting window."},"bucket":{"type":"string","enum":["day","week","month"],"description":"Calendar granularity of the usage series."},"totals":{"type":"object","properties":{"credits":{"type":"number","description":"Whole credits attributed to this total or group."}},"required":["credits"],"additionalProperties":false,"description":"Total usage for the selected window."},"previousTotals":{"anyOf":[{"type":"object","properties":{"credits":{"type":"number","description":"Whole credits attributed to this total or group."}},"required":["credits"],"additionalProperties":false},{"type":"null"}],"description":"Exact previous-period total, or null when no exact comparison is available."},"series":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Start of this calendar bucket."},"credits":{"type":"number","description":"Whole credits attributed to this total or group."},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of usage events."}},"required":["timestamp","credits","events"],"additionalProperties":false},"description":"Chronological usage buckets, including buckets with no usage."}},"required":["window","bucket","totals","previousTotals","series"],"additionalProperties":false},"Resources_GetOrganizationUsageSummaryResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationUsageSummary"}},"required":["data"],"additionalProperties":false,"title":"Get organization usage summary response","description":"Reporting bounds, pooled credits, and chronological usage buckets.","examples":[{"data":{"window":{"start":"2026-06-01T00:00:00.000Z","end":"2026-07-01T00:00:00.000Z","source":"range"},"bucket":"day","totals":{"credits":200},"previousTotals":null,"series":[{"timestamp":"2026-06-01T00:00:00.000Z","credits":200,"events":1}]}}]},"Resources_V2OrganizationUsageBreakdown":{"type":"object","properties":{"dimension":{"type":"string","enum":["member","workspace","workflow","model","byok","source"],"description":"Usage grouping dimension."},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Group identifier; an empty ID represents unattributed usage."},"label":{"type":"string","description":"Display label for the usage group."},"credits":{"type":"number","description":"Whole credits attributed to this total or group."},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of usage events."},"share":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of total cost, or total tokens for BYOK, between zero and one."},"providerId":{"description":"Model provider identifier, when applicable.","type":"string"},"tokens":{"description":"Input and output tokens for model or BYOK groups.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","label","credits","events","share"],"additionalProperties":false},"description":"Top usage groups ordered by cost, or tokens for BYOK."},"other":{"type":"object","properties":{"credits":{"type":"number","description":"Whole credits attributed to this total or group."},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of usage events."},"rowCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of groups omitted from rows."},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Input and output tokens attributed to omitted groups."}},"required":["credits","events","rowCount","tokens"],"additionalProperties":false,"description":"Combined usage for groups omitted by the limit."},"totalCredits":{"type":"number","description":"Whole credits represented by this breakdown; workflow includes only workflow-attributed usage."}},"required":["dimension","rows","other","totalCredits"],"additionalProperties":false},"Resources_GetOrganizationUsageBreakdownResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2OrganizationUsageBreakdown"}},"required":["data"],"additionalProperties":false,"title":"Get organization usage breakdown response","description":"Ranked usage groups and the combined remainder.","examples":[{"data":{"dimension":"member","rows":[{"id":"user-123","label":"Example Member","credits":200,"events":1,"share":1}],"other":{"credits":0,"events":0,"rowCount":0,"tokens":0},"totalCredits":200}}]},"Resources_V2OrganizationUsageEvent":{"type":"object","properties":{"id":{"type":"string","description":"Usage event identifier."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the usage event was recorded."},"source":{"type":"string","enum":["workflow","wand","sim-chat","mcp_copilot","mothership_block","knowledge-base","voice-input","enrichment","voice-output","api-tool"],"description":"Product surface that recorded the usage."},"description":{"type":"string","description":"Usage event description, such as a model name."},"workflowName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow name, or null for non-workflow usage or a deleted workflow."},"credits":{"type":"number","description":"Credits consumed by this event, rounded to whole credits."},"hasCost":{"type":"boolean","description":"Whether the event consumed credits before rounding, including sub-credit usage."}},"required":["id","createdAt","source","description","workflowName","credits","hasCost"],"additionalProperties":false},"Resources_ListOrganizationUsageEventsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2OrganizationUsageEvent"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization usage events response","description":"A page of usage events, including zero-cost activity.","examples":[{"data":[{"id":"event-123","createdAt":"2026-06-01T09:00:00.000Z","source":"sim-chat","description":"Model usage","workflowName":null,"credits":200,"hasCost":true}],"nextCursor":null}]},"Resources_V2AccessRequestDiscoveryEntry":{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"feature","description":"Kind of access being requested."},"configKey":{"type":"string","enum":["hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","hideDeployApi","hideDeployMcp","hideDeployChatbot","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport"],"description":"Feature restriction key returned by access discovery."}},"required":["kind","configKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integration","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"provider","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"knowledge_connector","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file_share_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"chat_deploy_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"usage_limit","description":"Kind of access being requested."},"id":{"type":"string","const":"member","description":"Request an increase to the acting user’s member credit cap."}},"required":["kind","id"],"additionalProperties":false}],"description":"Pass this target unchanged to Create Access Request."},"label":{"type":"string","minLength":1,"maxLength":512,"description":"Human-readable access item name."},"state":{"type":"string","enum":["allowed","requestable","unavailable"],"description":"Whether access is already allowed, can be requested, or is unavailable."},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Why access is unavailable or restricted; null when no explanation is needed."},"pendingRequestId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."},{"type":"null"}],"description":"Existing pending request for this item; null when none exists."}},"required":["target","label","state","reason","pendingRequestId"],"additionalProperties":false},"Resources_DiscoverWorkspaceAccessRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2AccessRequestDiscoveryEntry"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Discover workspace access requests response","description":"A page of access targets and the acting user’s current access state.","examples":[{"data":[{"target":{"kind":"feature","configKey":"hideTablesTab"},"label":"Tables","state":"requestable","reason":null,"pendingRequestId":null}],"nextCursor":null}]},"Resources_V2AccessRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."},"organizationId":{"type":"string","minLength":1,"description":"Organization that owns the request."},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},{"type":"null"}],"description":"Workspace where access was requested; null for an organization-level request."},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"feature","description":"Kind of access being requested."},"configKey":{"type":"string","enum":["hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","hideDeployApi","hideDeployMcp","hideDeployChatbot","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport"],"description":"Feature restriction key returned by access discovery."}},"required":["kind","configKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integration","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"provider","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"knowledge_connector","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file_share_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"chat_deploy_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"usage_limit","description":"Kind of access being requested."},"id":{"type":"string","const":"member","description":"Request an increase to the acting user’s member credit cap."}},"required":["kind","id"],"additionalProperties":false}],"description":"The requested feature, integration, model, tool, authentication mode, or member credit cap."},"targetLabel":{"type":"string","minLength":1,"maxLength":512,"description":"Human-readable name of the requested access."},"reason":{"type":"string","maxLength":1000,"description":"Reason supplied by the requester."},"status":{"type":"string","enum":["pending","fulfilled","declined","cancelled","closed"],"description":"Current request status."},"decisionReason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Explanation for a declined or closed request; null when none was recorded."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the request was submitted."},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When the request was resolved; null while pending."},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the governing group when the request was submitted; null for credit-cap requests."},"requester":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Requester user identifier."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Requester display name."},"email":{"type":"string","maxLength":320,"description":"Requester email address."}},"required":["id","name","email"],"additionalProperties":false,"description":"User who submitted the request."}},"required":["id","organizationId","workspaceId","target","targetLabel","reason","status","decisionReason","createdAt","decidedAt","groupName","requester"],"additionalProperties":false},"Resources_ListMyWorkspaceAccessRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2AccessRequest"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List my workspace access requests response","description":"A page of the acting user’s workspace and member-credit requests.","examples":[{"data":[{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}],"nextCursor":null}]},"Resources_CreateWorkspaceAccessRequestResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequest"}},"required":["data"],"additionalProperties":false,"title":"Create workspace access request response","description":"The new request, matching pending request, or existing request closed because access became available.","examples":[{"data":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}]},"Resources_CreateWorkspaceAccessRequestBody":{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"feature","description":"Kind of access being requested."},"configKey":{"type":"string","enum":["hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","hideDeployApi","hideDeployMcp","hideDeployChatbot","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport"],"description":"Feature restriction key returned by access discovery."}},"required":["kind","configKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integration","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"provider","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"knowledge_connector","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file_share_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"chat_deploy_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"usage_limit","description":"Kind of access being requested."},"id":{"type":"string","const":"member","description":"Request an increase to the acting user’s member credit cap."}},"required":["kind","id"],"additionalProperties":false}],"description":"Target returned by Discover Workspace Access Requests or Discover Organization Access Requests. The target must currently be requestable."},"reason":{"default":"","description":"Why the acting user needs this access.","type":"string","maxLength":1000}},"required":["target"],"additionalProperties":false,"title":"Create workspace access request body","description":"A discovered access target and an optional reason for the request.","examples":[{"target":{"kind":"feature","configKey":"hideTablesTab"},"reason":"Maintain team data"}]},"Resources_CancelWorkspaceAccessRequestResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequest"}},"required":["data"],"additionalProperties":false,"title":"Cancel workspace access request response","description":"The cancelled request, or the unchanged request if already resolved.","examples":[{"data":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"cancelled","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":"2026-06-01T10:00:00.000Z","groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}]},"Resources_DiscoverOrganizationAccessRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2AccessRequestDiscoveryEntry"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"Discover organization access requests response","description":"A page of access targets and the acting user’s current access state.","examples":[{"data":[{"target":{"kind":"feature","configKey":"hideTablesTab"},"label":"Tables","state":"requestable","reason":null,"pendingRequestId":null}],"nextCursor":null}]},"Resources_ListMyOrganizationAccessRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2AccessRequest"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List my organization access requests response","description":"A page of the acting user’s organization and member-credit requests.","examples":[{"data":[{"id":"request-123","organizationId":"org-123","workspaceId":null,"target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}],"nextCursor":null}]},"Resources_CreateOrganizationAccessRequestResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequest"}},"required":["data"],"additionalProperties":false,"title":"Create organization access request response","description":"The new request, matching pending request, or existing request closed because access became available.","examples":[{"data":{"id":"request-123","organizationId":"org-123","workspaceId":null,"target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}]},"Resources_CreateOrganizationAccessRequestBody":{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"feature","description":"Kind of access being requested."},"configKey":{"type":"string","enum":["hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","hideDeployApi","hideDeployMcp","hideDeployChatbot","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport"],"description":"Feature restriction key returned by access discovery."}},"required":["kind","configKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integration","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"provider","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"knowledge_connector","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file_share_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"chat_deploy_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"usage_limit","description":"Kind of access being requested."},"id":{"type":"string","const":"member","description":"Request an increase to the acting user’s member credit cap."}},"required":["kind","id"],"additionalProperties":false}],"description":"Target returned by Discover Workspace Access Requests or Discover Organization Access Requests. The target must currently be requestable."},"reason":{"default":"","description":"Why the acting user needs this access.","type":"string","maxLength":1000}},"required":["target"],"additionalProperties":false,"title":"Create organization access request body","description":"A discovered access target and an optional reason for the request.","examples":[{"target":{"kind":"feature","configKey":"hideTablesTab"},"reason":"Maintain team data"}]},"Resources_CancelOrganizationAccessRequestResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequest"}},"required":["data"],"additionalProperties":false,"title":"Cancel organization access request response","description":"The cancelled request, or the unchanged request if already resolved.","examples":[{"data":{"id":"request-123","organizationId":"org-123","workspaceId":null,"target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"cancelled","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":"2026-06-01T10:00:00.000Z","groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}]},"Resources_ListOrganizationAccessRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resources_V2AccessRequest"},"description":"Items in the current page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page. Send it back as `cursor`; `null` means there are no more pages. Do not construct a cursor yourself."}},"required":["data","nextCursor"],"additionalProperties":false,"title":"List organization access requests response","description":"A page of requests across the organization for Admin review.","examples":[{"data":[{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}],"nextCursor":null}]},"Resources_V2PermissionAccessRequestPreview":{"type":"object","properties":{"newLimitCredits":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Applied credit cap for a fulfilled request; null before approval or for permission changes."},"request":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."},"organizationId":{"type":"string","minLength":1,"description":"Organization that owns the request."},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},{"type":"null"}],"description":"Workspace where access was requested; null for an organization-level request."},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"feature","description":"Kind of access being requested."},"configKey":{"type":"string","enum":["hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","hideDeployApi","hideDeployMcp","hideDeployChatbot","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport"],"description":"Feature restriction key returned by access discovery."}},"required":["kind","configKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integration","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"provider","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"knowledge_connector","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file_share_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"chat_deploy_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"usage_limit","description":"Kind of access being requested."},"id":{"type":"string","const":"member","description":"Request an increase to the acting user’s member credit cap."}},"required":["kind","id"],"additionalProperties":false}],"description":"The requested feature, integration, model, tool, authentication mode, or member credit cap."},"targetLabel":{"type":"string","minLength":1,"maxLength":512,"description":"Human-readable name of the requested access."},"reason":{"type":"string","maxLength":1000,"description":"Reason supplied by the requester."},"status":{"type":"string","enum":["pending","fulfilled","declined","cancelled","closed"],"description":"Current request status."},"decisionReason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Explanation for a declined or closed request; null when none was recorded."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the request was submitted."},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When the request was resolved; null while pending."},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the governing group when the request was submitted; null for credit-cap requests."},"requester":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Requester user identifier."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Requester display name."},"email":{"type":"string","maxLength":320,"description":"Requester email address."}},"required":["id","name","email"],"additionalProperties":false,"description":"User who submitted the request."}},"required":["id","organizationId","workspaceId","target","targetLabel","reason","status","decisionReason","createdAt","decidedAt","groupName","requester"],"additionalProperties":false,"description":"Access request being reviewed."},"changes":{"maxItems":43,"type":"array","items":{"type":"object","properties":{"configKey":{"type":"string","enum":["allowedIntegrations","allowedModelProviders","deniedModels","deniedTools","hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","allowedFileShareAuthTypes","hideDeployApi","hideDeployMcp","hideDeployChatbot","allowedChatDeployAuthTypes","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","allowedKnowledgeConnectors","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport","deniedPartialAccessProjectIssues"],"description":"Permission restriction changed by approval."},"label":{"type":"string","minLength":1,"maxLength":512,"description":"Human-readable permission name."},"before":{"anyOf":[{"type":"boolean"},{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."}],"description":"Current value of the restriction."},"after":{"anyOf":[{"type":"boolean"},{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."}],"description":"Value after applying the request."}},"required":["configKey","label","before","after"],"additionalProperties":false},"description":"Permission changes proposed for the whole governing group."},"impact":{"type":"object","properties":{"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of affected members."},"workspaceCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of affected workspaces."},"workspaceNames":{"maxItems":100,"type":"array","items":{"type":"string"},"description":"Names of affected workspaces, capped at 100."},"truncated":{"type":"boolean","description":"Whether the workspace-name list is truncated; counts include the full impact."}},"required":["memberCount","workspaceCount","workspaceNames","truncated"],"additionalProperties":false,"description":"Members and workspaces affected by approval."},"fingerprint":{"type":"string","minLength":1,"maxLength":128,"description":"Pass to Resolve Organization Access Request after reviewing the changes and impact."},"canApply":{"type":"boolean","description":"Whether this request can currently be approved."},"unavailableReason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Why approval is unavailable; null when canApply is true."},"resolutionKind":{"type":"string","const":"permission","description":"Approval changes the governing permission group."},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Governing group identifier."},"name":{"type":"string","description":"Governing group name."}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"Group affected by a permission approval; null for credit-cap changes."},"currentLimitCredits":{"type":"null","description":"Not applicable to permission changes."}},"required":["newLimitCredits","request","changes","impact","fingerprint","canApply","unavailableReason","resolutionKind","group","currentLimitCredits"],"additionalProperties":false},"Resources_V2CreditLimitAccessRequestPreview":{"type":"object","properties":{"newLimitCredits":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Applied credit cap for a fulfilled request; null before approval or for permission changes."},"request":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Access request identifier."},"organizationId":{"type":"string","minLength":1,"description":"Organization that owns the request."},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Unique workspace identifier."},{"type":"null"}],"description":"Workspace where access was requested; null for an organization-level request."},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"feature","description":"Kind of access being requested."},"configKey":{"type":"string","enum":["hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","hideDeployApi","hideDeployMcp","hideDeployChatbot","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport"],"description":"Feature restriction key returned by access discovery."}},"required":["kind","configKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integration","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"provider","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"knowledge_connector","description":"Kind of access being requested."},"id":{"type":"string","minLength":1,"maxLength":512,"description":"Identifier returned by access discovery."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file_share_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"chat_deploy_auth","description":"Kind of access being requested."},"id":{"type":"string","enum":["public","password","email","sso"],"description":"Authentication mode to request."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"usage_limit","description":"Kind of access being requested."},"id":{"type":"string","const":"member","description":"Request an increase to the acting user’s member credit cap."}},"required":["kind","id"],"additionalProperties":false}],"description":"The requested feature, integration, model, tool, authentication mode, or member credit cap."},"targetLabel":{"type":"string","minLength":1,"maxLength":512,"description":"Human-readable name of the requested access."},"reason":{"type":"string","maxLength":1000,"description":"Reason supplied by the requester."},"status":{"type":"string","enum":["pending","fulfilled","declined","cancelled","closed"],"description":"Current request status."},"decisionReason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Explanation for a declined or closed request; null when none was recorded."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the request was submitted."},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"When the request was resolved; null while pending."},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the governing group when the request was submitted; null for credit-cap requests."},"requester":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Requester user identifier."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Requester display name."},"email":{"type":"string","maxLength":320,"description":"Requester email address."}},"required":["id","name","email"],"additionalProperties":false,"description":"User who submitted the request."}},"required":["id","organizationId","workspaceId","target","targetLabel","reason","status","decisionReason","createdAt","decidedAt","groupName","requester"],"additionalProperties":false,"description":"Access request being reviewed."},"changes":{"maxItems":43,"type":"array","items":{"type":"object","properties":{"configKey":{"type":"string","enum":["allowedIntegrations","allowedModelProviders","deniedModels","deniedTools","hideTraceSpans","hideKnowledgeBaseTab","hideTablesTab","hideCopilot","hideIntegrationsTab","hideSecretsTab","hideApiKeysTab","hideInboxTab","hideFilesTab","disableMcpTools","disableCustomTools","disableSkills","disableInvitations","disablePublicApi","disablePublicFileSharing","allowedFileShareAuthTypes","hideDeployApi","hideDeployMcp","hideDeployChatbot","allowedChatDeployAuthTypes","disablePersonalApiKeys","disableLogExport","hideCostInfo","disableKnowledgeBaseCreation","disableKnowledgeBaseFileUpload","allowedKnowledgeConnectors","disableTableCreation","disableTableExport","disableBulkFileDownload","disablePersonalCredentials","disableWorkspaceCreation","hideOrgMemberDirectory","disableCliAccess","disableWebhookTriggers","disableToolAutoApproval","hideSandboxesTab","disableOAuthAppAccess","disableKnowledgeBaseExport","deniedPartialAccessProjectIssues"],"description":"Permission restriction changed by approval."},"label":{"type":"string","minLength":1,"maxLength":512,"description":"Human-readable permission name."},"before":{"anyOf":[{"type":"boolean"},{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."}],"description":"Current value of the restriction."},"after":{"anyOf":[{"type":"boolean"},{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Integrations and blocks are limited to this list. Null permits every value; an empty list permits none."}],"description":"Value after applying the request."}},"required":["configKey","label","before","after"],"additionalProperties":false},"description":"Permission changes proposed for the whole governing group."},"impact":{"type":"object","properties":{"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of affected members."},"workspaceCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of affected workspaces."},"workspaceNames":{"maxItems":100,"type":"array","items":{"type":"string"},"description":"Names of affected workspaces, capped at 100."},"truncated":{"type":"boolean","description":"Whether the workspace-name list is truncated; counts include the full impact."}},"required":["memberCount","workspaceCount","workspaceNames","truncated"],"additionalProperties":false,"description":"Members and workspaces affected by approval."},"fingerprint":{"type":"string","minLength":1,"maxLength":128,"description":"Pass to Resolve Organization Access Request after reviewing the changes and impact."},"canApply":{"type":"boolean","description":"Whether this request can currently be approved."},"unavailableReason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Why approval is unavailable; null when canApply is true."},"resolutionKind":{"type":"string","const":"usage_limit","description":"Approval raises the requester’s member credit cap."},"group":{"type":"null","description":"Credit-cap requests do not change a permission group."},"currentLimitCredits":{"anyOf":[{"type":"number","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Current member credit cap. Approval requires a higher newLimitCredits."}},"required":["newLimitCredits","request","changes","impact","fingerprint","canApply","unavailableReason","resolutionKind","group","currentLimitCredits"],"additionalProperties":false},"Resources_PreviewOrganizationAccessRequestResponse":{"type":"object","properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/Resources_V2PermissionAccessRequestPreview"},{"$ref":"#/components/schemas/Resources_V2CreditLimitAccessRequestPreview"}],"description":"Response data."}},"required":["data"],"additionalProperties":false,"title":"Preview organization access request response","description":"The proposed group or credit-cap change, affected audience, and fingerprint.","examples":[{"data":{"resolutionKind":"permission","request":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"pending","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":null,"groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}},"group":{"id":"group-123","name":"Engineering"},"changes":[{"configKey":"hideTablesTab","label":"Tables","before":true,"after":false}],"impact":{"memberCount":2,"workspaceCount":1,"workspaceNames":["Engineering"],"truncated":false},"fingerprint":"current-preview-fingerprint","canApply":true,"unavailableReason":null,"currentLimitCredits":null,"newLimitCredits":null}}]},"Resources_ResolveOrganizationAccessRequestResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequest"}},"required":["data"],"additionalProperties":false,"title":"Resolve organization access request response","description":"The applied or declined request, or its unchanged resolved state.","examples":[{"data":{"id":"request-123","organizationId":"org-123","workspaceId":"workspace-123","target":{"kind":"feature","configKey":"hideTablesTab"},"targetLabel":"Tables","reason":"Maintain team data","status":"fulfilled","decisionReason":null,"createdAt":"2026-06-01T09:00:00.000Z","decidedAt":"2026-06-01T10:00:00.000Z","groupName":"Engineering","requester":{"id":"user-123","name":"Alex Example","email":"alex@example.com"}}}]},"Resources_ResolveOrganizationAccessRequestBody":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"apply","description":"Apply the reviewed change to the governing group or member credit cap."},"expectedFingerprint":{"type":"string","minLength":1,"maxLength":128,"description":"Fingerprint from Preview Organization Access Request. Review its changes and impact before applying; a stale preview returns a conflict."},"newLimitCredits":{"description":"Required only for a usage-limit request: a whole-number credit cap greater than the current cap. Omit for permission requests.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["action","expectedFingerprint"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"decline","description":"Decline the request without changing permissions or credit limits."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Required explanation for declining this request."}},"required":["action","reason"],"additionalProperties":false}],"title":"Resolve organization access request body","description":"Apply the reviewed fingerprint, with a higher credit cap when applicable, or decline with a reason.","examples":[{"action":"apply","expectedFingerprint":"current-preview-fingerprint"}]},"Resources_V2AccessRequestSettings":{"type":"object","properties":{"allowRequests":{"type":"boolean","description":"Allow new requests and approvals. Disabling requests preserves history and still allows cancellation and decline."}},"required":["allowRequests"],"additionalProperties":false},"Resources_GetOrganizationAccessRequestSettingsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequestSettings"}},"required":["data"],"additionalProperties":false,"title":"Get organization access request settings response","description":"Whether new requests and approvals are allowed.","examples":[{"data":{"allowRequests":true}}]},"Resources_UpdateOrganizationAccessRequestSettingsResponse":{"type":"object","properties":{"data":{"description":"Response data.","$ref":"#/components/schemas/Resources_V2AccessRequestSettings"}},"required":["data"],"additionalProperties":false,"title":"Update organization access request settings response","description":"The saved setting for new requests and approvals.","examples":[{"data":{"allowRequests":false}}]},"Resources_UpdateOrganizationAccessRequestSettingsBody":{"type":"object","properties":{"allowRequests":{"type":"boolean","description":"Allow new requests and approvals. Disabling requests preserves history and still allows cancellation and decline."}},"required":["allowRequests"],"additionalProperties":false,"title":"Update organization access request settings body","description":"Whether new requests and approvals are allowed.","examples":[{"allowRequests":false}]}}},"x-generated-by":"scripts/generate-openapi.ts"}