{"openapi":"3.1.0","info":{"title":"Tembo Public API","description":"Manage agents, sessions, repositories, and organization resources with the Tembo API.","version":"1.0.0"},"servers":[{"url":"https://api.tembo.io/","description":"Tembo API"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"TipTapDocument":{"anyOf":[{"$ref":"#/components/schemas/TipTapNode"},{"$ref":"#/components/schemas/CustomDocument"}],"description":"Rich-text document containing text, formatting, images, and mentions. A document typically has a \"doc\" root with nested content nodes.","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Hello"}]}]}},"TipTapNode":{"anyOf":[{"oneOf":[{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"image"},"attrs":{"$ref":"#/components/schemas/TipTapImageAttributes"},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"mention"},"attrs":{"$ref":"#/components/schemas/TipTapMentionAttributes"},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"heading"},"attrs":{"type":"object","properties":{"level":{"type":"integer","minimum":1,"maximum":6}},"additionalProperties":{}},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"orderedList"},"attrs":{"type":"object","properties":{"start":{"type":"integer"},"type":{"type":["string","null"]}},"additionalProperties":{}},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"taskItem"},"attrs":{"type":"object","properties":{"checked":{"type":"boolean"}},"additionalProperties":{}},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"codeBlock"},"attrs":{"type":"object","properties":{"language":{"type":["string","null"]}},"additionalProperties":{}},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"required":["type"],"additionalProperties":{}}]},{"$ref":"#/components/schemas/TipTapContentNode"}]},"TipTapImageNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"image"},"attrs":{"$ref":"#/components/schemas/TipTapImageAttributes"}},"required":["type"],"additionalProperties":{}},"TipTapLinkMark":{"type":"object","properties":{"type":{"type":"string","const":"link"},"attrs":{"type":"object","properties":{"href":{"type":["string","null"]},"target":{"type":["string","null"]},"rel":{"type":["string","null"]},"class":{"type":["string","null"]},"title":{"type":["string","null"]}},"additionalProperties":{}}},"required":["type"],"additionalProperties":{}},"TipTapMark":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100,"not":{"enum":["link"]}},"attrs":{"$ref":"#/components/schemas/TipTapExtensionAttributes"}},"required":["type"],"additionalProperties":{}},"TipTapExtensionAttributes":{"type":"object","additionalProperties":{}},"TipTapImageAttributes":{"type":"object","properties":{"src":{"type":["string","null"]},"alt":{"type":["string","null"]},"title":{"type":["string","null"]},"width":{"type":["string","null"]},"data-uploading":{"type":["string","null"]},"data-placeholder-id":{"type":["string","null"]},"upload-progress":{"type":["string","null"]}},"additionalProperties":{}},"TipTapMentionNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"mention"},"attrs":{"$ref":"#/components/schemas/TipTapMentionAttributes"}},"required":["type"],"additionalProperties":{}},"TipTapMentionAttributes":{"type":"object","properties":{"id":{"type":["string","null"]},"label":{"type":["string","null"]},"type":{"type":["string","null"]},"mentionSuggestionChar":{"type":["string","null"]},"metadata":{"type":["object","null"],"properties":{"integrationType":{"type":"string"},"codeRepositoryId":{"type":"string"},"isHeader":{"type":"boolean"},"argumentHint":{"type":"string"},"commandName":{"type":"string"},"source":{"type":"string"}},"additionalProperties":{}}},"additionalProperties":{}},"TipTapHeadingNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"heading"},"attrs":{"type":"object","properties":{"level":{"type":"integer","minimum":1,"maximum":6}},"additionalProperties":{}}},"required":["type"],"additionalProperties":{}},"TipTapOrderedListNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"orderedList"},"attrs":{"type":"object","properties":{"start":{"type":"integer"},"type":{"type":["string","null"]}},"additionalProperties":{}}},"required":["type"],"additionalProperties":{}},"TipTapTaskItemNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"taskItem"},"attrs":{"type":"object","properties":{"checked":{"type":"boolean"}},"additionalProperties":{}}},"required":["type"],"additionalProperties":{}},"TipTapCodeBlockNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","const":"codeBlock"},"attrs":{"type":"object","properties":{"language":{"type":["string","null"]}},"additionalProperties":{}}},"required":["type"],"additionalProperties":{}},"TipTapContentNode":{"type":"object","properties":{"text":{"type":"string","maxLength":1000000},"marks":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TipTapLinkMark"},{"$ref":"#/components/schemas/TipTapMark"}]},"maxItems":1000},"type":{"type":"string","minLength":1,"maxLength":100,"not":{"enum":["image","mention","heading","orderedList","taskItem","codeBlock"]}},"attrs":{"$ref":"#/components/schemas/TipTapExtensionAttributes"},"content":{"type":"array","items":{"$ref":"#/components/schemas/TipTapNode"},"maxItems":10000}},"additionalProperties":{}},"CustomDocument":{"type":"object","additionalProperties":{},"description":"Rich-text content with custom document properties and node attributes."},"MessageEventData":{"type":"object","properties":{"type":{"type":"string"},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["foreground","subagent","background"]},"parentToolUseId":{"type":"string"},"taskId":{"type":"string"}},"required":["kind"],"additionalProperties":true},"source":{"type":"string"},"providerEvent":{"type":"boolean"},"delivery":{"type":"string","enum":["realtime","persist"]},"event":{"type":"object","properties":{"event":{"type":"string"},"message":{"type":"string"},"provider":{"type":"string"},"messageId":{"type":"string"}},"required":["event","message"],"additionalProperties":true},"index":{"type":"integer"},"itemId":{"type":"string"},"sequenceNumber":{"type":"integer"},"accumulatedText":{"type":"string"},"deltaType":{"type":"string","enum":["text_delta","input_json_delta"]},"responsePhase":{"type":"string","enum":["commentary","final_answer"]},"toolName":{"type":"string"},"toolResult":{"type":"object","properties":{"status":{"type":"string","enum":["running","completed","error"]},"output":{"type":"string"},"exitCode":{"type":"number"},"error":{"type":"string"}},"required":["status"]},"snapshotId":{"type":"string"},"snapshotCreatedAt":{"type":"string"}},"additionalProperties":true},"CustomMessageEventData":{"type":"object","additionalProperties":{},"description":"Message event data with runtime-specific fields."},"AgentOptionsInput":{"anyOf":[{"type":"object","properties":{"reasoningLevel":{"type":"string","minLength":1,"maxLength":100},"mode":{"type":"string","enum":["normal","planning"],"description":"Use Build (normal) to execute work or Plan (planning) to plan before writing code."},"speed":{"type":"string","enum":["normal","fast","ultrafast"],"description":"Preferred execution speed when supported by the selected runtime."},"goal":{"type":"object","properties":{"enabled":{"type":"boolean"},"objective":{"type":"string","maxLength":100000}},"additionalProperties":false},"ultracode":{"type":"boolean","description":"Whether the agent orchestrates multi-agent workflows for every task when supported by the selected runtime and model."}},"additionalProperties":true},{"$ref":"#/components/schemas/RuntimeAgentOptions"}],"description":"Execution settings for the selected agent runtime, including provider-specific options."},"AgentOptions":{"type":"object","properties":{"reasoningLevel":{"type":"string","minLength":1,"maxLength":100},"mode":{"type":"string","enum":["normal","planning"],"description":"Use Build (normal) to execute work or Plan (planning) to plan before writing code."},"speed":{"type":"string","enum":["normal","fast","ultrafast"],"description":"Preferred execution speed when supported by the selected runtime."},"goal":{"type":"object","properties":{"enabled":{"type":"boolean"},"objective":{"type":"string","maxLength":100000}},"additionalProperties":false},"ultracode":{"type":"boolean","description":"Whether the agent orchestrates multi-agent workflows for every task when supported by the selected runtime and model."}},"additionalProperties":false},"RuntimeAgentOptions":{"type":"object","additionalProperties":{},"description":"Runtime-specific execution settings and provider extensions."},"SessionTipTapDocument":{"allOf":[{"$ref":"#/components/schemas/SessionDocumentNode"},{"$ref":"#/components/schemas/TipTapDocument"}]},"SessionDocumentNode":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","maxLength":1000000},"attrs":{"type":"object","additionalProperties":{}},"marks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"attrs":{"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":false},"maxItems":1000},"content":{"type":"array","items":{"$ref":"#/components/schemas/SessionDocumentNode"},"maxItems":10000}},"additionalProperties":false},"SessionEventData":{"type":"object","properties":{"type":{"type":"string","maxLength":100},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["foreground","subagent","background"]},"parentToolUseId":{"type":"string","maxLength":1000},"taskId":{"type":"string","maxLength":1000}},"required":["kind"]},"source":{"type":"string","maxLength":500},"providerEvent":{"type":"boolean"},"delivery":{"type":"string","enum":["realtime","persist"]},"event":{"type":"object","properties":{"event":{"type":"string","maxLength":500},"message":{"type":"string","maxLength":1000000},"provider":{"type":"string","maxLength":100},"messageId":{"type":"string","maxLength":1000}},"required":["event","message"]},"index":{"type":"integer"},"itemId":{"type":"string","maxLength":1000},"sequenceNumber":{"type":"integer"},"accumulatedText":{"type":"string","maxLength":1000000},"deltaType":{"type":"string","enum":["text_delta","input_json_delta"]},"responsePhase":{"type":"string","enum":["commentary","final_answer"]},"toolName":{"type":"string","maxLength":1000},"toolResult":{"type":"object","properties":{"status":{"type":"string","enum":["running","completed","error"]},"output":{"type":"string"},"exitCode":{"type":"number"},"error":{"type":"string"}},"required":["status"]},"snapshotId":{"type":"string"},"snapshotCreatedAt":{"type":"string"}},"required":["type"]},"AgentState":{"type":"object","additionalProperties":{},"description":"User-defined state keyed by name. Values may be any JSON value, including nested objects and arrays. No application-specific keys are required."},"TriggerFilters":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueAddedToBoardFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueAssignedToUserFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueCommentCreatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueCreatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueLabelAddedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueStatusChangedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/AtlassianIssueUpdatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/BitbucketPullRequestOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubCreateFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubIssueClosedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubIssueCommentCreatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubIssueOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubPullRequestClosedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubPullRequestMergedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubPullRequestOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubPullRequestReadyForReviewFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubReleasePublishedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubPullRequestSynchronizeFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubTemboPullRequestOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubWorkflowRunFailedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GithubWorkflowRunCompletedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabBotMergeRequestCommentFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabIssueClosedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabIssueOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabIssueLabelAddedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabIssueUpdatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestClosedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestMergedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestUpdatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestReadyForReviewFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabPipelineFailedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabRefCreatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/LinearIssueCreateFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/LinearIssueLabelAddedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/LinearIssueStatusChangedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/LinearIssueUpdatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/SentryIssueCreatedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/SlackMessageReactionAddedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/SlackMessageSentInChannelFilters"}],"additionalProperties":{}},{"type":"object","properties":{"spaces":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page is in a space with one of these names or IDs"},"titleContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page title contains one of these substrings"}},"additionalProperties":{}},{"type":"object","properties":{"spaces":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page is in a space with one of these names or IDs"},"titleContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page title contains one of these substrings"},"previousSpaces":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page was moved from a space with one of these names or IDs"}},"additionalProperties":{}},{"type":"object","properties":{"spaces":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page is in a space with one of these names or IDs"},"titleContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page title contains one of these substrings"},"locations":{"type":"array","items":{"type":"string","enum":["footer","inline"]},"description":"Only trigger for footer comments, inline comments, or both"}},"additionalProperties":{}},{"type":"object","properties":{"spaces":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page is in a space with one of these names or IDs"},"titleContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page title contains one of these substrings"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the added label has one of these values"},"commentContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment contains one of these substrings"}},"additionalProperties":{}},{"type":"object","properties":{"spaces":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page is in a space with one of these names or IDs"},"titleContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the page title contains one of these substrings"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the removed label has one of these values"},"commentContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment contains one of these substrings"}},"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/EmptyTriggerFilters"}],"additionalProperties":{}}],"description":"Conditions that determine whether the selected integration event starts the agent. Available fields depend on the integration and event type."},"AtlassianIssueAddedToBoardFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"boards":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is on one of the specified boards"},"statuses":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was moved to one of the specified statuses (board columns)"},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"},"includeNewIssues":{"type":"boolean","description":"Also trigger for newly created issues (not just status changes)"}}},"AtlassianIssueAssignedToUserFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"},"includeNewIssues":{"type":"boolean","description":"Also trigger for newly created issues that are already assigned"}}},"AtlassianIssueCommentCreatedFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"commentedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment was added by one of the specified users"},"messageContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment contains one of these substrings"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"}}},"AtlassianIssueCreatedFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"issueTypes":{"type":"array","items":{"type":"string"},"description":"Only trigger for the specified issue types, such as Story, Bug, or Sub-task."},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"}}},"AtlassianIssueLabelAddedFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"teams":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue belongs to one of these Jira teams. Enter exact team names or team IDs (from the team profile URL)."},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if one of the specified labels was added"}}},"AtlassianIssueStatusChangedFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"statuses":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was moved to one of the specified statuses"},"previousStatuses":{"type":"array","items":{"type":"string"},"description":"Only trigger when the issue changes from one of the specified previous statuses."},"issueTypes":{"type":"array","items":{"type":"string"},"description":"Only trigger for the specified issue types, such as Story, Bug, or Sub-task."},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"}}},"AtlassianIssueUpdatedFilters":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"},"issueTypes":{"type":"array","items":{"type":"string"},"description":"Only trigger for the specified issue types, such as Story, Bug, or Sub-task."},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"}}},"BitbucketPullRequestOpenedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request was opened by one of the specified users"},"temboPrs":{"type":"boolean","description":"Enable agent for Tembo-created pull requests (disabled by default)"}}},"GithubCreateFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"}},"refType":{"type":"array","items":{"type":"string","enum":["branch","tag"]},"description":"Only trigger for the specified Git reference type: branch or tag."},"branchNames":{"type":"array","items":{"type":"string"}},"tagNames":{"type":"array","items":{"type":"string"}}}},"GithubIssueClosedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the repositories"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was opened by one of the specified users"},"temboIssues":{"type":"boolean","description":"Enable agent for Tembo-created issues (disabled by default)"}}},"GithubIssueCommentCreatedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment is in one of the repositories"},"commentedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment was created by one of the specified users"},"commentOn":{"type":"array","items":{"type":"string","enum":["issues","pull_requests"]},"description":"Trigger on comments on issues, pull requests, or both"},"messageContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment contains one of these substrings"}}},"GithubIssueOpenedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the repositories"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was opened by one of the specified users"},"temboIssues":{"type":"boolean","description":"Enable agent for Tembo-created issues (disabled by default)"}}},"GithubPullRequestClosedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request was opened by one of the specified users"},"temboPrs":{"type":"boolean","default":true,"description":"Enable agent for Tembo-created pull requests (enabled by default)"}}},"GithubPullRequestMergedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"mergedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request was merged by one of the specified users"},"temboPrs":{"type":"boolean","default":true,"description":"Enable agent for Tembo-created pull requests (enabled by default)"}}},"GithubPullRequestOpenedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request has at least one of the specified labels"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request was opened by one of the specified users"},"branches":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request targets one of these branches"},"draftPrs":{"type":"boolean","description":"Trigger also for draft pull requests (disabled by default)"},"temboPrs":{"type":"boolean","default":true,"description":"Enable agent for Tembo-created pull requests (enabled by default)"}}},"GithubPullRequestReadyForReviewFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request was opened by one of the specified users"},"temboPrs":{"type":"boolean","default":true,"description":"Enable agent for Tembo-created pull requests (enabled by default)"}}},"GithubReleasePublishedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the release is in one of the repositories"}}},"GithubPullRequestSynchronizeFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"pushedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the commits were pushed by one of the specified users"},"draftPrs":{"type":"boolean","description":"Trigger even if the pull request is a draft"},"temboPrs":{"type":"boolean","default":true,"description":"Enable agent for Tembo-created pull requests (enabled by default)"}}},"GithubTemboPullRequestOpenedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pull request is in one of the repositories"},"draftPrs":{"type":"boolean","description":"Also trigger for draft pull requests"}}},"GithubWorkflowRunFailedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the workflow run is in one of the repositories"},"workflowNames":{"type":"array","items":{"type":"string"},"description":"Only trigger for specific workflow names"},"branches":{"type":"array","items":{"type":"string"},"description":"Only trigger for specific branches"}}},"GithubWorkflowRunCompletedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the workflow run is in one of the repositories"},"workflowNames":{"type":"array","items":{"type":"string"},"description":"Only trigger for specific workflow names"},"branches":{"type":"array","items":{"type":"string"},"description":"Only trigger for specific branches"},"conclusions":{"type":"array","items":{"type":"string","enum":["success","failure","neutral","cancelled","timed_out","action_required","stale","skipped"]},"description":"Only trigger for these completed workflow results, such as success"},"events":{"type":"array","items":{"type":"string","minLength":1},"description":"Only trigger for these originating GitHub events; use schedule for cron runs, not push or pull_request"}}},"GitlabBotMergeRequestCommentFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment is in one of the repositories"},"botUsernames":{"type":"array","items":{"type":"string"},"description":"Only trigger if the comment is from one of these bot usernames"}}},"GitlabIssueClosedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the repositories"},"closedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was closed by one of the specified users"},"temboIssues":{"type":"boolean","description":"Enable agent for Tembo-created issues (disabled by default)"}}},"GitlabIssueOpenedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the repositories"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was opened by one of the specified users"},"temboIssues":{"type":"boolean","description":"Enable agent for Tembo-created issues (disabled by default)"}}},"GitlabIssueLabelAddedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the repositories"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if one of the added labels matches these labels"},"addedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the label was added by one of the specified users"}}},"GitlabIssueUpdatedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the repositories"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"},"updatedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was updated by one of the specified users"}}},"GitlabMergeRequestClosedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request is in one of the repositories"},"closedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request was closed by one of the specified users"},"temboMrs":{"type":"boolean","description":"Enable agent for Tembo-created merge requests (disabled by default)"}}},"GitlabMergeRequestMergedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request is in one of the repositories"},"mergedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request was merged by one of the specified users"},"temboMrs":{"type":"boolean","description":"Enable agent for Tembo-created merge requests (disabled by default)"}}},"GitlabMergeRequestOpenedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request is in one of the repositories"},"draftMrs":{"type":"boolean","description":"Include draft merge requests. Drafts are excluded when omitted or false."},"temboMrs":{"type":"boolean","description":"Enable agent for Tembo-created merge requests (disabled by default)"}}},"GitlabMergeRequestUpdatedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request is in one of the repositories"},"pushedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the commits were pushed by one of the specified users"},"draftMrs":{"type":"boolean","description":"Include draft merge requests. Drafts are excluded when omitted or false."},"temboMrs":{"type":"boolean","description":"Enable agent for Tembo-created merge requests (disabled by default)"}}},"GitlabMergeRequestReadyForReviewFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the merge request is in one of the repositories"},"temboMrs":{"type":"boolean","description":"Enable agent for Tembo-created merge requests (disabled by default)"}}},"GitlabPipelineFailedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"},"description":"Only trigger if the pipeline is in one of the repositories"},"branches":{"type":"array","items":{"type":"string"},"description":"Only trigger for specific branches"}}},"GitlabRefCreatedFilters":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string"}},"refType":{"type":"array","items":{"type":"string","enum":["branch","tag"]},"description":"Only trigger for the specified Git reference type: branch or tag."},"branchNames":{"type":"array","items":{"type":"string"}},"tagNames":{"type":"array","items":{"type":"string"}}}},"LinearIssueCreateFilters":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue belongs to one of the specified teams"},"states":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue state type matches one of the specified types"},"openedBy":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was opened by one of the specified users"},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"},"temboIssues":{"type":"boolean","description":"Enable agent for Tembo-created issues (disabled by default)"}}},"LinearIssueLabelAddedFilters":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue belongs to one of the specified teams"},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if one of the specified labels was added to the issue"}}},"LinearIssueStatusChangedFilters":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue belongs to one of the specified teams"},"statuses":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue was moved to one of the specified statuses"},"previousStatuses":{"type":"array","items":{"type":"string"},"description":"Only trigger when the issue changes from one of the specified previous statuses."},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"}}},"LinearIssueUpdatedFilters":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue belongs to one of the specified teams"},"states":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue state type matches one of the specified types"},"assignedTo":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is assigned to one of the specified users"},"labels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue has at least one of the specified labels"},"temboIssues":{"type":"boolean","description":"Enable agent for Tembo-updated issues (disabled by default)"}}},"SentryIssueCreatedFilters":{"type":"object","properties":{"priorities":{"type":"array","items":{"type":"string","enum":["high","medium","low"]},"description":"Only trigger if the issue has one of the specified priorities"},"projectSlugs":{"type":"array","items":{"type":"string"},"description":"Only trigger if the issue is in one of the specified projects"}}},"SlackMessageReactionAddedFilters":{"type":"object","properties":{"emojis":{"type":"array","items":{"type":"string"},"description":"Only trigger if one of these emoji reactions is added"},"channels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the reaction is added in one of these channels"},"users":{"type":"array","items":{"type":"string"},"description":"Only trigger if the reaction is added by one of these user names"}}},"SlackMessageSentInChannelFilters":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"},"description":"Only trigger if the message is sent in one of the channels"},"users":{"type":"array","items":{"type":"string"},"description":"Only trigger if the message was sent by one of these user names"},"messageContains":{"type":"array","items":{"type":"string"},"description":"Only trigger if the message contains one of these substrings"},"messageNotContains":{"type":"array","items":{"type":"string"},"description":"Skip messages containing any of these case-sensitive substrings (for example, On-call handover:)"}}},"EmptyTriggerFilters":{"type":"object"},"AgentRunEventPayload":{"type":"object","additionalProperties":{},"description":"Custom webhook input. Arbitrary keys and nested JSON values are preserved and passed to the agent."},"GlobalMcpServers":{"type":"object","properties":{"mcpServers":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"stdio"},"command":{"type":"string","minLength":1},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","command"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"http"},"url":{"type":"string","format":"uri"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","url"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"sse"},"url":{"type":"string","format":"uri"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","url"],"additionalProperties":true}]}}},"required":["mcpServers"],"additionalProperties":true},"McpServerConfigurationObject":{"type":"object","additionalProperties":{},"description":"MCP server configuration with transport-specific settings."}}},"paths":{"/oauth/context":{"get":{"operationId":"retrieveOAuthContext","summary":"Get the authenticated OAuth identity","description":"Returns the user, organization, OAuth client, granted scopes, and expiration for the supplied access token. The token must include the user:org:read scope.","tags":["OAuth"],"responses":{"200":{"description":"The identity and authorization details for the access token.","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"organizationId":{"type":"string"},"clientId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"number"}},"required":["userId","organizationId","clientId","scopes","expiresAt"]}}}},"400":{"description":"The Authorization header does not use the Bearer scheme."},"401":{"description":"The access token is missing or invalid."},"403":{"description":"The token lacks a required scope or the user cannot access the organization."},"503":{"description":"The authentication provider is unavailable."}}}},"/auth/context":{"get":{"operationId":"retrieveMcpAuthContext","summary":"Get the authenticated principal","description":"Return the credential identity. Agent credentials require X-Agent-Org-Id.","tags":["Authentication"],"responses":{"200":{"description":"Identity, plus client, scopes and expiry for OAuth. Permissions are on organization detail.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"userId":{"type":"string"},"organizationId":{"type":"string"},"clientId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"number"}},"required":["userId","organizationId","clientId","scopes","expiresAt"]},{"type":"object","properties":{"userId":{"type":"string"},"organizationId":{"type":"string"}},"required":["userId","organizationId"]},{"type":"object","properties":{"principal":{"type":"string","const":"agent"},"organizationId":{"type":"string"}},"required":["principal","organizationId"]}]}}}},"401":{"description":"The credential is missing or invalid."},"403":{"description":"The credential does not grant access to the requested organization."},"503":{"description":"The authentication provider is unavailable."}}}},"/v1/api-keys":{"get":{"operationId":"listApiKeys","summary":"List API keys","description":"List active API keys for the current organization.","tags":["API Keys"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List API keys","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"tokenPreview":{"type":"string"}},"required":["createdAt","expiresAt","id","lastUsedAt","name","updatedAt","userId","tokenPreview"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"API key operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]},"post":{"operationId":"createApiKey","summary":"Create an API key","description":"Create an API key for the current organization. Optionally set `expiresAt` to a future timestamp after which the key stops authenticating requests. The complete token is returned only by this operation.","tags":["API Keys"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an API key","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"tokenPreview":{"type":"string"},"token":{"type":"string"}},"required":["createdAt","expiresAt","id","lastUsedAt","name","updatedAt","userId","tokenPreview","token"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"API key operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"type":["string","null"],"format":"date-time","description":"Future ISO 8601 expiration timestamp. Omit or use null for a key that does not expire."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for identifying this API key."}},"additionalProperties":false}}}}}},"/v1/api-keys/{apiKeyId}":{"get":{"operationId":"retrieveApiKey","summary":"Retrieve an API key","description":"Retrieve an active API key without exposing its complete token.","tags":["API Keys"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an API key","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"tokenPreview":{"type":"string"}},"required":["createdAt","expiresAt","id","lastUsedAt","name","updatedAt","userId","tokenPreview"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"API key operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"apiKeyId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateApiKey","summary":"Update an API key","description":"Rename an active API key.","tags":["API Keys"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an API key","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"tokenPreview":{"type":"string"}},"required":["createdAt","expiresAt","id","lastUsedAt","name","updatedAt","userId","tokenPreview"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"API key operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"apiKeyId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"New display name for the API key. This does not rotate its token."}},"required":["name"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteApiKey","summary":"Delete an API key","description":"Revoke an active API key so it can no longer authenticate requests.","tags":["API Keys"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an API key","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"API key operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"apiKeyId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/audit-logs":{"get":{"operationId":"listAuditLogs","summary":"List organization audit logs","description":"Read retained mutation history for the authenticated organization. Requires organization:audit_log:read.","tags":["Audit logs"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Paginated audit history","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"actorType":{"type":"string"},"actorId":{"type":["string","null"]},"actorLabel":{"type":["string","null"]},"source":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":["string","null"]},"resourceLabel":{"type":["string","null"]},"operation":{"type":"string"},"details":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","actorType","actorId","actorLabel","source","resourceType","resourceId","resourceLabel","operation","details","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"403":{"description":"Audit log read permission is required"}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","maxLength":300},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"actorId","schema":{"type":"string","minLength":1,"maxLength":2000}},{"in":"query","name":"resourceType","schema":{"type":"string","minLength":1,"maxLength":2000}},{"in":"query","name":"resourceId","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"operation","schema":{"type":"string","minLength":1,"maxLength":2000}},{"in":"query","name":"from","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"to","schema":{"type":"string","format":"date-time"}}]}},"/v1/audit-logs/filters":{"get":{"operationId":"listAuditLogFilters","summary":"List audit log filter options","description":"Resource and operation pairs recorded for the authenticated organization. Requires organization:audit_log:read.","tags":["Audit logs"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Recorded resource and operation pairs","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string"},"operation":{"type":"string"}},"required":["resourceType","operation"]}}},"required":["items"]}}}},"403":{"description":"Audit log read permission is required"}}}},"/v1/skills/marketplace":{"get":{"operationId":"listMarketplaceSkills","summary":"List marketplace skills","description":"List popular marketplace skills or search the catalog. Results have no continuation cursor.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List marketplace skills","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9_-]+\\/[a-zA-Z0-9_.-]+$","maxLength":300},{"type":"string","pattern":"^[a-zA-Z0-9_-]+(?:\\.[a-zA-Z0-9_-]+)+$","maxLength":253}]},"skillId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$","maxLength":255},"name":{"type":"string","minLength":1},"installs":{"type":"integer","minimum":0}},"required":["source","skillId","name","installs"],"additionalProperties":false}},"nextCursor":{"type":"null","description":"Always null; marketplace results have no continuation page."}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The skill marketplace is unavailable or returned invalid data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","const":""},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":500},"description":"Search the marketplace catalog. Omit to list popular skills."}]}},"/v1/skills/marketplace/{skillId}":{"get":{"operationId":"retrieveMarketplaceSkill","summary":"Retrieve a marketplace skill","description":"Retrieve the files and content hash for a marketplace skill. This does not install the skill.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a marketplace skill","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9_-]+\\/[a-zA-Z0-9_.-]+$","maxLength":300},{"type":"string","pattern":"^[a-zA-Z0-9_-]+(?:\\.[a-zA-Z0-9_-]+)+$","maxLength":253}]},"skillId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$","maxLength":255},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Complete text content of the skill file."},"filename":{"type":"string","minLength":1,"description":"Relative file path within the skill, such as SKILL.md."}},"required":["content","filename"],"additionalProperties":false},"minItems":1},"hash":{"type":"string","minLength":1}},"required":["source","skillId","files","hash"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The skill marketplace is unavailable or returned invalid data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"skillId","schema":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$","maxLength":255},"required":true},{"in":"query","name":"source","schema":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9_-]+\\/[a-zA-Z0-9_.-]+$","maxLength":300},{"type":"string","pattern":"^[a-zA-Z0-9_-]+(?:\\.[a-zA-Z0-9_-]+)+$","maxLength":253}]},"required":true,"description":"The source repository in owner/repo format. Domain-only sources cannot be downloaded and return 404."}]}},"/v1/skills":{"get":{"operationId":"listSkills","summary":"List skills","description":"List organization skills or skills checked into a repository.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List skills","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["organization","repository"]}},"required":["description","id","name","keywords","source"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"names","schema":{"type":"array","items":{"type":"string","minLength":1}},"description":"Filter by exact skill names."},{"in":"query","name":"repositoryIds","schema":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"description":"Repository IDs to search for checked-in skills, supplied as a comma-separated list."},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Project whose repositories to search for checked-in skills."},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"},"description":"Session whose repositories to search for checked-in skills."},{"in":"query","name":"search","schema":{"type":"string","minLength":1},"description":"Search skills by name, description, or keywords."},{"in":"query","name":"source","schema":{"type":"string","enum":["organization","repository"],"default":"organization"},"description":"organization lists saved organization skills; repository lists checked-in skills from the selected repositories, project, or session."}]},"post":{"operationId":"createSkill","summary":"Create a skill","description":"Create an organization skill with its files.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a skill","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"],"default":"utf8"},"filename":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["content","encoding","filename","id"],"additionalProperties":false}}},"required":["createdAt","description","id","name","updatedAt","files"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Summary of what the skill does and when to use it."},"name":{"type":"string","minLength":1,"description":"Display name of the skill."},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Complete file content: plain text, or base64 when encoding is base64."},"encoding":{"type":"string","enum":["utf8","base64"],"default":"utf8","description":"utf8 for text files; base64 for binary files such as images."},"filename":{"type":"string","minLength":1,"description":"Relative file path within the skill, such as SKILL.md."}},"required":["content","filename"],"additionalProperties":false},"minItems":1,"description":"Complete file set, including a required SKILL.md. On update, replaces all existing files rather than merging them."}},"required":["description","name","files"],"additionalProperties":false}}}}}},"/v1/skills/{skillId}":{"get":{"operationId":"retrieveSkill","summary":"Retrieve a skill","description":"Retrieve an organization skill and all of its files.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a skill","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"],"default":"utf8"},"filename":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["content","encoding","filename","id"],"additionalProperties":false}}},"required":["createdAt","description","id","name","updatedAt","files"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"skillId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateSkill","summary":"Update a skill","description":"Update an organization skill. When files are provided, they replace the complete file set.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a skill","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"],"default":"utf8"},"filename":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["content","encoding","filename","id"],"additionalProperties":false}}},"required":["createdAt","description","id","name","updatedAt","files"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"skillId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Summary of what the skill does and when to use it."},"name":{"type":"string","minLength":1,"description":"Display name of the skill."},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Complete file content: plain text, or base64 when encoding is base64."},"encoding":{"type":"string","enum":["utf8","base64"],"default":"utf8","description":"utf8 for text files; base64 for binary files such as images."},"filename":{"type":"string","minLength":1,"description":"Relative file path within the skill, such as SKILL.md."}},"required":["content","filename"],"additionalProperties":false},"minItems":1,"description":"Complete file set, including a required SKILL.md. On update, replaces all existing files rather than merging them."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteSkill","summary":"Delete a skill","description":"Delete an organization skill.","tags":["Skills"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a skill","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Skill operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"skillId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/insights":{"get":{"operationId":"retrieveInsight","summary":"Retrieve insights","description":"Retrieve pull request contribution insights and their collection status for the current organization.","tags":["Insights"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve insights","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":["string","null"],"format":"uuid"},"status":{"type":["string","null"],"enum":["syncing","ready","failed",null]},"rangeStart":{"type":["string","null"],"format":"date-time"},"rangeEnd":{"type":["string","null"],"format":"date-time"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"enabled":{"type":"boolean"},"data":{"type":["object","null"],"properties":{"range":{"type":"string","enum":["1d","7d","30d","1y"]},"summary":{"type":"object","properties":{"tasksCompleted":{"type":"integer"},"prsCreated":{"type":"integer"},"prsMerged":{"type":"integer"},"modelCostPerPrUsd":{"type":["number","null"],"description":"Recorded model cost plus VM compute fees in USD across the organization divided by Tembo-created PRs in the selected sync window. Excludes subscription fees and inference billing markup. Null when there are no PRs or no recorded costs."},"temboContribution":{"type":"number"},"changes":{"type":"object","properties":{"prsCreated":{"type":["number","null"]},"prsMerged":{"type":["number","null"]},"tasksCompleted":{"type":["number","null"]},"temboContribution":{"type":["number","null"]}},"required":["prsCreated","prsMerged","tasksCompleted","temboContribution"],"additionalProperties":false,"description":"Recent period compared with the previous one. Null when the previous period has no baseline, such as when the organization joined during it."}},"required":["tasksCompleted","prsCreated","prsMerged","modelCostPerPrUsd","temboContribution","changes"],"additionalProperties":false},"timeSeries":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"Bucket key: YYYY-MM for 1y, YYYY-MM-DD (UTC) for 7d and 30d, and an ISO 8601 hour start for 1d."},"prsWithTembo":{"type":"integer"},"prsWithoutTembo":{"type":"number"},"prsMerged":{"type":"integer"},"prsCreated":{"type":"integer"},"temboContribution":{"type":"number"}},"required":["month","prsWithTembo","prsWithoutTembo","prsMerged","prsCreated","temboContribution"],"additionalProperties":false}}},"required":["range","summary","timeSeries"],"additionalProperties":false}},"required":["id","status","rangeStart","rangeEnd","lastSyncedAt","enabled","data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Insight operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Insight operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"range","schema":{"type":"string","enum":["1d","7d","30d","1y"],"default":"1y"},"description":"Time range to aggregate: last day, 7 days, 30 days, or year. Defaults to 1y."}]},"patch":{"operationId":"updateInsight","summary":"Update insights","description":"Enable or disable pull request insight collection. Enabling starts the initial refresh when needed.","tags":["Insights"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update insights","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":["string","null"],"format":"uuid"},"status":{"type":["string","null"],"enum":["syncing","ready","failed",null]},"rangeStart":{"type":["string","null"],"format":"date-time"},"rangeEnd":{"type":["string","null"],"format":"date-time"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"enabled":{"type":"boolean"},"data":{"type":["object","null"],"properties":{"range":{"type":"string","enum":["1d","7d","30d","1y"]},"summary":{"type":"object","properties":{"tasksCompleted":{"type":"integer"},"prsCreated":{"type":"integer"},"prsMerged":{"type":"integer"},"modelCostPerPrUsd":{"type":["number","null"],"description":"Recorded model cost plus VM compute fees in USD across the organization divided by Tembo-created PRs in the selected sync window. Excludes subscription fees and inference billing markup. Null when there are no PRs or no recorded costs."},"temboContribution":{"type":"number"},"changes":{"type":"object","properties":{"prsCreated":{"type":["number","null"]},"prsMerged":{"type":["number","null"]},"tasksCompleted":{"type":["number","null"]},"temboContribution":{"type":["number","null"]}},"required":["prsCreated","prsMerged","tasksCompleted","temboContribution"],"additionalProperties":false,"description":"Recent period compared with the previous one. Null when the previous period has no baseline, such as when the organization joined during it."}},"required":["tasksCompleted","prsCreated","prsMerged","modelCostPerPrUsd","temboContribution","changes"],"additionalProperties":false},"timeSeries":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"Bucket key: YYYY-MM for 1y, YYYY-MM-DD (UTC) for 7d and 30d, and an ISO 8601 hour start for 1d."},"prsWithTembo":{"type":"integer"},"prsWithoutTembo":{"type":"number"},"prsMerged":{"type":"integer"},"prsCreated":{"type":"integer"},"temboContribution":{"type":"number"}},"required":["month","prsWithTembo","prsWithoutTembo","prsMerged","prsCreated","temboContribution"],"additionalProperties":false}}},"required":["range","summary","timeSeries"],"additionalProperties":false}},"required":["id","status","rangeStart","rangeEnd","lastSyncedAt","enabled","data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Insight operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Insight operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable or disable pull request contribution insight collection. Enabling starts the initial refresh when needed."}},"required":["enabled"],"additionalProperties":false}}}}}},"/v1/insights/members":{"get":{"operationId":"listInsightMembers","summary":"List insight members","description":"List organization members included in pull request insights.","tags":["Insights"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List insight members","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"username":{"type":"string"},"name":{"type":["string","null"]},"avatarUrl":{"type":"string"},"prsCreated":{"type":"integer"},"prsMerged":{"type":"integer"},"temboContribution":{"type":"number"}},"required":["provider","username","name","avatarUrl","prsCreated","prsMerged","temboContribution"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Insight operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Insight operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"range","schema":{"type":"string","enum":["1d","7d","30d","1y"],"default":"1y"},"description":"Time range to aggregate: last day, 7 days, 30 days, or year. Defaults to 1y."}]}},"/v1/insights/repositories":{"get":{"operationId":"listInsightRepositories","summary":"List insight repositories","description":"List repositories included in pull request insights for the current organization.","tags":["Insights"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List insight repositories","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"codeRepositoryId":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"provider":{"type":"string"},"prsCreated":{"type":"integer"},"prsMerged":{"type":"integer"},"temboContribution":{"type":"number"}},"required":["codeRepositoryId","name","url","provider","prsCreated","prsMerged","temboContribution"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Insight operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Insight operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"range","schema":{"type":"string","enum":["1d","7d","30d","1y"],"default":"1y"},"description":"Time range to aggregate: last day, 7 days, 30 days, or year. Defaults to 1y."}]}},"/v1/organizations":{"post":{"operationId":"createOrganization","summary":"Create an organization","description":"Create an organization and make the authenticated user its administrator.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an organization","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"logoUrl":{"type":["string","null"],"format":"uri"},"memberCount":{"type":"integer","minimum":0}},"required":["createdAt","id","name","slug","updatedAt","logoUrl","memberCount"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Organization display name."},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","minLength":1,"maxLength":100,"description":"Unique organization URL slug using lowercase letters, numbers, and single hyphens."}},"required":["name"],"additionalProperties":false}}}}}},"/v1/organizations/{organizationId}":{"get":{"operationId":"retrieveOrganization","summary":"Retrieve an organization","description":"Return self membership and workspace eligibility; include the full profile with organization read permission.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an organization","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"logoUrl":{"type":["string","null"],"format":"uri"},"memberCount":{"type":"integer","minimum":0},"currentMembership":{"type":["object","null"],"properties":{"userId":{"type":"string"},"permissions":{"type":"array","items":{"type":"string","enum":["organization:audit_log:read","organization:audit_log:write","organization:read","organization:write","organization:member:read","organization:member:write","organization:invitation:read","organization:invitation:write","organization:role:read","organization:role:write","organization:secret:read","organization:secret:write","organization:setting:read","organization:setting:write","organization:configuration:read","organization:configuration:write","organization:subscription:read","organization:subscription:write","organization:onboarding:read","organization:onboarding:write","organization:logo:read","organization:logo:write","organization:slack_connect:read","organization:slack_connect:write","billing:read","billing:write","billing:trial:read","billing:trial:write","billing:usage:read","billing:usage:write","billing:payment:read","billing:payment:write","billing:payment_method:read","billing:payment_method:write","billing:checkout:read","billing:checkout:write","billing:subscription_checkout:read","billing:subscription_checkout:write","billing:portal:read","billing:portal:write","billing:on_demand:read","billing:on_demand:write","billing:credit:read","billing:credit:write","billing:custom_price:read","billing:custom_price:write","billing:custom_plan:read","billing:custom_plan:write","billing:overage_report:read","billing:overage_report:write","api_key:read","api_key:write","user:read","user:write","user:setting:read","user:setting:write","user:environment_variable:read","user:environment_variable:write","user:subscription:read","user:subscription:write","user:connected_account:read","user:connected_account:write","user:organization:read","user:organization:write","user:profile_picture:read","user:profile_picture:write","user:deletion:read","user:deletion:write","agent:read","agent:write","agent:schedule:read","agent:schedule:write","agent:trigger:read","agent:trigger:write","agent:run:read","agent:run:write","agent:instruction_revision:read","agent:instruction_revision:write","agent:template:read","agent:template:write","session:read","session:write","session:message:read","session:message:write","session:artifact:read","session:artifact:write","session:source:read","session:source:write","session:command:read","session:command:write","session:input:read","session:input:write","session:queue:read","session:queue:write","session:event:read","session:event:write","session:file:read","session:file:write","session:diff:read","session:diff:write","session:workspace:read","session:workspace:write","session:workspace_file:read","session:workspace_file:write","session:workspace_diff:read","session:workspace_diff:write","session:workspace_preview:read","session:workspace_preview:write","pull_request:read","pull_request:write","pull_request:merge:read","pull_request:merge:write","pull_request:attachment:read","pull_request:attachment:write","pull_request:session:read","pull_request:session:write","pull_request:message:read","pull_request:message:write","pull_request:comment:read","pull_request:comment:write","pull_request:review:read","pull_request:review:write","pull_request:reaction:read","pull_request:reaction:write","pull_request:commit:read","pull_request:commit:write","pull_request:check:read","pull_request:check:write","pull_request:file:read","pull_request:file:write","pull_request:reviewer:read","pull_request:reviewer:write","pull_request:label:read","pull_request:label:write","pull_request:thread:read","pull_request:thread:write","pull_request:tour:read","pull_request:tour:write","pull_request:branch_status:read","pull_request:branch_status:write","pull_request:stack:read","pull_request:stack:write","repository:read","repository:write","repository:branch:read","repository:branch:write","repository:file:read","repository:file:write","repository:pull_request:read","repository:pull_request:write","repository:user:read","repository:user:write","repository:label:read","repository:label:write","integration:read","integration:write","integration:trigger:read","integration:trigger:write","integration:provider:read","integration:provider:write","integration:configuration:read","integration:configuration:write","integration:snyk_organization:read","integration:snyk_organization:write","integration:sentry_environment:read","integration:sentry_environment:write","integration:slack_channel:read","integration:slack_channel:write","integration:rate_limit:read","integration:rate_limit:write","mcp_connection:read","mcp_connection:write","mcp_connection:shared:read","mcp_connection:shared:write","model:read","model:write","project:read","project:write","project:environment_variable:read","project:environment_variable:write","project:snapshot:read","project:snapshot:write","project:build:read","project:build:write","project:build_detail:read","project:build_detail:write","project:schedule:read","project:schedule:write","project:default:read","project:default:write","project:system_snapshot:read","project:system_snapshot:write","project:organization_snapshot:read","project:organization_snapshot:write","sandbox:read","sandbox:write","sandbox:metric:read","sandbox:metric:write","sandbox:event:read","sandbox:event:write","sandbox:size:read","sandbox:size:write","sandbox:virtual_machine:read","sandbox:virtual_machine:write","device:read","device:write","skill:read","skill:write","skill:marketplace:read","skill:marketplace:write","insight:read","insight:write","insight:member:read","insight:member:write","insight:repository:read","insight:repository:write","insight:usage:read","insight:usage:write","file:read","file:write","pin:read","pin:write","folder:read","folder:write","queue:job:read","queue:job:write","queue:host_manager_job:read","queue:host_manager_job:write","queue:worker:read","queue:worker:write","queue:scheduled_job:read","queue:scheduled_job:write","queue:triggered_job:read","queue:triggered_job:write","runtime:read","runtime:write","session:source_credential:read","session:source_credential:write","device:all:write","insight:user:read"]}}},"required":["userId","permissions"],"additionalProperties":false},"access":{"type":"object","properties":{"state":{"type":"string","enum":["blocked","trial","paid"]},"canExecute":{"type":"boolean"}},"required":["state","canExecute"],"additionalProperties":false}},"required":["createdAt","id","name","slug","updatedAt","logoUrl","memberCount","currentMembership","access"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"currentMembership":{"type":["object","null"],"properties":{"userId":{"type":"string"},"permissions":{"type":"array","items":{"type":"string","enum":["organization:audit_log:read","organization:audit_log:write","organization:read","organization:write","organization:member:read","organization:member:write","organization:invitation:read","organization:invitation:write","organization:role:read","organization:role:write","organization:secret:read","organization:secret:write","organization:setting:read","organization:setting:write","organization:configuration:read","organization:configuration:write","organization:subscription:read","organization:subscription:write","organization:onboarding:read","organization:onboarding:write","organization:logo:read","organization:logo:write","organization:slack_connect:read","organization:slack_connect:write","billing:read","billing:write","billing:trial:read","billing:trial:write","billing:usage:read","billing:usage:write","billing:payment:read","billing:payment:write","billing:payment_method:read","billing:payment_method:write","billing:checkout:read","billing:checkout:write","billing:subscription_checkout:read","billing:subscription_checkout:write","billing:portal:read","billing:portal:write","billing:on_demand:read","billing:on_demand:write","billing:credit:read","billing:credit:write","billing:custom_price:read","billing:custom_price:write","billing:custom_plan:read","billing:custom_plan:write","billing:overage_report:read","billing:overage_report:write","api_key:read","api_key:write","user:read","user:write","user:setting:read","user:setting:write","user:environment_variable:read","user:environment_variable:write","user:subscription:read","user:subscription:write","user:connected_account:read","user:connected_account:write","user:organization:read","user:organization:write","user:profile_picture:read","user:profile_picture:write","user:deletion:read","user:deletion:write","agent:read","agent:write","agent:schedule:read","agent:schedule:write","agent:trigger:read","agent:trigger:write","agent:run:read","agent:run:write","agent:instruction_revision:read","agent:instruction_revision:write","agent:template:read","agent:template:write","session:read","session:write","session:message:read","session:message:write","session:artifact:read","session:artifact:write","session:source:read","session:source:write","session:command:read","session:command:write","session:input:read","session:input:write","session:queue:read","session:queue:write","session:event:read","session:event:write","session:file:read","session:file:write","session:diff:read","session:diff:write","session:workspace:read","session:workspace:write","session:workspace_file:read","session:workspace_file:write","session:workspace_diff:read","session:workspace_diff:write","session:workspace_preview:read","session:workspace_preview:write","pull_request:read","pull_request:write","pull_request:merge:read","pull_request:merge:write","pull_request:attachment:read","pull_request:attachment:write","pull_request:session:read","pull_request:session:write","pull_request:message:read","pull_request:message:write","pull_request:comment:read","pull_request:comment:write","pull_request:review:read","pull_request:review:write","pull_request:reaction:read","pull_request:reaction:write","pull_request:commit:read","pull_request:commit:write","pull_request:check:read","pull_request:check:write","pull_request:file:read","pull_request:file:write","pull_request:reviewer:read","pull_request:reviewer:write","pull_request:label:read","pull_request:label:write","pull_request:thread:read","pull_request:thread:write","pull_request:tour:read","pull_request:tour:write","pull_request:branch_status:read","pull_request:branch_status:write","pull_request:stack:read","pull_request:stack:write","repository:read","repository:write","repository:branch:read","repository:branch:write","repository:file:read","repository:file:write","repository:pull_request:read","repository:pull_request:write","repository:user:read","repository:user:write","repository:label:read","repository:label:write","integration:read","integration:write","integration:trigger:read","integration:trigger:write","integration:provider:read","integration:provider:write","integration:configuration:read","integration:configuration:write","integration:snyk_organization:read","integration:snyk_organization:write","integration:sentry_environment:read","integration:sentry_environment:write","integration:slack_channel:read","integration:slack_channel:write","integration:rate_limit:read","integration:rate_limit:write","mcp_connection:read","mcp_connection:write","mcp_connection:shared:read","mcp_connection:shared:write","model:read","model:write","project:read","project:write","project:environment_variable:read","project:environment_variable:write","project:snapshot:read","project:snapshot:write","project:build:read","project:build:write","project:build_detail:read","project:build_detail:write","project:schedule:read","project:schedule:write","project:default:read","project:default:write","project:system_snapshot:read","project:system_snapshot:write","project:organization_snapshot:read","project:organization_snapshot:write","sandbox:read","sandbox:write","sandbox:metric:read","sandbox:metric:write","sandbox:event:read","sandbox:event:write","sandbox:size:read","sandbox:size:write","sandbox:virtual_machine:read","sandbox:virtual_machine:write","device:read","device:write","skill:read","skill:write","skill:marketplace:read","skill:marketplace:write","insight:read","insight:write","insight:member:read","insight:member:write","insight:repository:read","insight:repository:write","insight:usage:read","insight:usage:write","file:read","file:write","pin:read","pin:write","folder:read","folder:write","queue:job:read","queue:job:write","queue:host_manager_job:read","queue:host_manager_job:write","queue:worker:read","queue:worker:write","queue:scheduled_job:read","queue:scheduled_job:write","queue:triggered_job:read","queue:triggered_job:write","runtime:read","runtime:write","session:source_credential:read","session:source_credential:write","device:all:write","insight:user:read"]}}},"required":["userId","permissions"],"additionalProperties":false},"access":{"type":"object","properties":{"state":{"type":"string","enum":["blocked","trial","paid"]},"canExecute":{"type":"boolean"}},"required":["state","canExecute"],"additionalProperties":false}},"required":["id","currentMembership","access"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}]},"patch":{"operationId":"updateOrganization","summary":"Update an organization","description":"Update organization profile fields or onboarding state.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an organization","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"logoUrl":{"type":["string","null"],"format":"uri"},"memberCount":{"type":"integer","minimum":0}},"required":["createdAt","id","name","slug","updatedAt","logoUrl","memberCount"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Organization display name."},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","minLength":1,"maxLength":100,"description":"Unique organization URL slug using lowercase letters, numbers, and single hyphens."},"onboardingCompleted":{"type":"boolean","description":"Mark organization onboarding as completed or incomplete."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteOrganization","summary":"Delete an organization","description":"Delete the organization from the identity provider and Tembo.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an organization","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}]}},"/v1/organizations/{organizationId}/members":{"get":{"operationId":"listOrganizationMembers","summary":"List organization members","description":"List active members or pending invitations with cursor pagination.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List organization members","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"active"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"null"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"pending"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false}]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":100},"description":"Search organization members or invitations."},{"in":"query","name":"status","schema":{"type":"string","enum":["active","pending"],"default":"active"},"description":"List active members or pending invitations."}]},"post":{"operationId":"createOrganizationMember","summary":"Create an organization member","description":"Invite or add a user to an organization with a role.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an organization member","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"active"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"null"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"pending"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emailAddress":{"type":"string","format":"email","description":"Email address of the user to add or invite."},"roleId":{"type":"string","minLength":1}},"required":["emailAddress","roleId"],"additionalProperties":false}}}}}},"/v1/organizations/{organizationId}/members/{memberId}":{"get":{"operationId":"retrieveOrganizationMember","summary":"Retrieve an organization member","description":"Retrieve an active member or pending member invitation.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an organization member","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"active"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"null"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"pending"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"path","name":"memberId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"patch":{"operationId":"updateOrganizationMember","summary":"Update an organization member","description":"Update an organization member role.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an organization member","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"active"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"null"},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"role":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","const":"pending"}},"required":["createdAt","id","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","role","status"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"path","name":"memberId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"string"}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteOrganizationMember","summary":"Remove an organization member","description":"Remove an active member or revoke a pending invitation.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Remove an organization member","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"path","name":"memberId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/organizations/{organizationId}/secrets":{"get":{"operationId":"listOrganizationSecrets","summary":"List organization secrets","description":"List redacted organization secret summaries with cursor pagination.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List organization secrets","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"key":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","key","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Search secret names. Secret values are never returned."}]},"post":{"operationId":"createOrganizationSecret","summary":"Create an organization secret","description":"Create an encrypted organization secret.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an organization secret","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"key":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","key","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255,"description":"Secret name used to reference it in the organization."},"value":{"type":"string","minLength":1,"maxLength":64000,"description":"Secret plaintext value to encrypt and store. Retrieve and list operations return redacted summaries, not this value."}},"required":["key","value"],"additionalProperties":false}}}}}},"/v1/organizations/{organizationId}/secrets/{secretId}":{"get":{"operationId":"retrieveOrganizationSecret","summary":"Retrieve an organization secret","description":"Retrieve a redacted organization secret summary.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an organization secret","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"key":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","key","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"path","name":"secretId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateOrganizationSecret","summary":"Update an organization secret","description":"Update a secret name, encrypted value, or both.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an organization secret","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"key":{"type":"string","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","key","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"path","name":"secretId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255,"description":"Secret name used to reference it in the organization."},"value":{"type":"string","minLength":1,"maxLength":64000,"description":"Secret plaintext value to encrypt and store. Retrieve and list operations return redacted summaries, not this value."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteOrganizationSecret","summary":"Delete an organization secret","description":"Delete an organization secret.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an organization secret","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"path","name":"secretId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/organizations/{organizationId}/settings":{"get":{"operationId":"retrieveOrganizationSettings","summary":"Retrieve organization settings","description":"Retrieve effective organization settings, including defaults for settings that have not been configured.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve organization settings","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"settings":{"type":"object","properties":{"cloneDepth":{"type":"integer","exclusiveMinimum":0,"description":"Git clone history depth used for repositories."},"commitInstructions":{"type":"string","maxLength":64000,"description":"Organization instructions for agent commit messages."},"customReviewBots":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]*(\\[bot\\])?$","minLength":1,"maxLength":100},"maxItems":25,"description":"Additional GitHub bot logins Tembo responds to without an @tembo mention."},"customSystemPrompt":{"type":"string","maxLength":64000,"description":"Custom system instructions supplied to organization agents."},"defaultAgent":{"type":"string","maxLength":64000,"description":"Default coding agent and model key for the organization."},"defaultKeepAliveMinutes":{"type":"integer","minimum":0,"maximum":10080,"description":"Default VM keep-alive duration in minutes. 0 preserves built-in per-source durations."},"defaultSandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"],"description":"Default VM size for organization sessions."},"deleteBranchWhenPrClosed":{"type":"boolean","description":"Delete agent-created branches when their pull requests close."},"draftPrs":{"type":"boolean","description":"Create agent pull requests as drafts by default."},"enableCoderabbitBot":{"type":"boolean","description":"Enable handling of CodeRabbit bot feedback."},"enableCursorBot":{"type":"boolean","description":"Enable handling of Cursor bot feedback."},"enableGeminiCodeAssistBot":{"type":"boolean","description":"Enable handling of Gemini Code Assist bot feedback."},"enableGithubActionsBot":{"type":"boolean","description":"Enable handling of GitHub Actions bot feedback."},"enableGraphiteBot":{"type":"boolean","description":"Enable handling of Graphite bot feedback."},"enableGreptileBot":{"type":"boolean","description":"Enable handling of Greptile bot feedback."},"experimentalMcp":{"type":"boolean","description":"Enable experimental MCP features for the organization."},"fallbackToApiOnSubscriptionLimit":{"type":"boolean","description":"Use the API key or Tembo inference when every connected subscription is out of usage."},"featureMentionAuthor":{"type":"boolean","description":"Enable mentioning the author in supported integration responses."},"maxBotReviews":{"type":"integer","minimum":0,"description":"Maximum number of bot review iterations."},"maxSolutions":{"type":"integer","minimum":0,"description":"Maximum number of generated solutions."},"onDemandMaxCreditUsage":{"type":"number","minimum":0},"pgStatStatementsResetFrequency":{"type":"string","maxLength":64000,"description":"Reset frequency for PostgreSQL pg_stat_statements collection."},"pmSystemPrompt":{"type":"string","maxLength":64000,"description":"Custom system instructions for the project-management agent."},"prTitleInstructions":{"type":"string","maxLength":64000,"description":"Organization instructions for agent pull request titles."},"pullRequestInsightsEnabled":{"type":"boolean","description":"Enable or disable pull request contribution insight collection."},"shouldSignCommits":{"type":"boolean","description":"Sign agent-created commits when signing credentials are configured."},"slackReviewOnTembo":{"type":"boolean","description":"Use Tembo review links in Slack review notifications."},"slowQueryThresholdMs":{"type":"number","minimum":0,"description":"Threshold in milliseconds for identifying slow database queries."},"sshPublicKeys":{"type":"string","maxLength":64000,"description":"SSH public keys authorized for organization workspace access."},"weeklyReportEnabled":{"type":"boolean","description":"Enable or disable the organization weekly report."}},"required":["cloneDepth","commitInstructions","customReviewBots","customSystemPrompt","defaultAgent","defaultKeepAliveMinutes","defaultSandboxSize","deleteBranchWhenPrClosed","draftPrs","enableCoderabbitBot","enableCursorBot","enableGeminiCodeAssistBot","enableGithubActionsBot","enableGraphiteBot","enableGreptileBot","experimentalMcp","fallbackToApiOnSubscriptionLimit","featureMentionAuthor","maxBotReviews","maxSolutions","onDemandMaxCreditUsage","pgStatStatementsResetFrequency","pmSystemPrompt","prTitleInstructions","pullRequestInsightsEnabled","shouldSignCommits","slackReviewOnTembo","slowQueryThresholdMs","sshPublicKeys","weeklyReportEnabled"],"additionalProperties":false}},"required":["organizationId","settings"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}]},"patch":{"operationId":"updateOrganizationSettings","summary":"Update organization settings","description":"Configure organization defaults for agent/model, VM size and keep-alive; inference credentials and subscription fallback; agent prompts and commit/PR instructions; bot feedback, signing, reports, and insights. Only supplied settings are changed.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update organization settings","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"settings":{"type":"object","properties":{"cloneDepth":{"type":"integer","exclusiveMinimum":0,"description":"Git clone history depth used for repositories."},"commitInstructions":{"type":"string","maxLength":64000,"description":"Organization instructions for agent commit messages."},"customReviewBots":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]*(\\[bot\\])?$","minLength":1,"maxLength":100},"maxItems":25,"description":"Additional GitHub bot logins Tembo responds to without an @tembo mention."},"customSystemPrompt":{"type":"string","maxLength":64000,"description":"Custom system instructions supplied to organization agents."},"defaultAgent":{"type":"string","maxLength":64000,"description":"Default coding agent and model key for the organization."},"defaultKeepAliveMinutes":{"type":"integer","minimum":0,"maximum":10080,"description":"Default VM keep-alive duration in minutes. 0 preserves built-in per-source durations."},"defaultSandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"],"description":"Default VM size for organization sessions."},"deleteBranchWhenPrClosed":{"type":"boolean","description":"Delete agent-created branches when their pull requests close."},"draftPrs":{"type":"boolean","description":"Create agent pull requests as drafts by default."},"enableCoderabbitBot":{"type":"boolean","description":"Enable handling of CodeRabbit bot feedback."},"enableCursorBot":{"type":"boolean","description":"Enable handling of Cursor bot feedback."},"enableGeminiCodeAssistBot":{"type":"boolean","description":"Enable handling of Gemini Code Assist bot feedback."},"enableGithubActionsBot":{"type":"boolean","description":"Enable handling of GitHub Actions bot feedback."},"enableGraphiteBot":{"type":"boolean","description":"Enable handling of Graphite bot feedback."},"enableGreptileBot":{"type":"boolean","description":"Enable handling of Greptile bot feedback."},"experimentalMcp":{"type":"boolean","description":"Enable experimental MCP features for the organization."},"fallbackToApiOnSubscriptionLimit":{"type":"boolean","description":"Use the API key or Tembo inference when every connected subscription is out of usage."},"featureMentionAuthor":{"type":"boolean","description":"Enable mentioning the author in supported integration responses."},"maxBotReviews":{"type":"integer","minimum":0,"description":"Maximum number of bot review iterations."},"maxSolutions":{"type":"integer","minimum":0,"description":"Maximum number of generated solutions."},"onDemandMaxCreditUsage":{"type":"number","minimum":0},"pgStatStatementsResetFrequency":{"type":"string","maxLength":64000,"description":"Reset frequency for PostgreSQL pg_stat_statements collection."},"pmSystemPrompt":{"type":"string","maxLength":64000,"description":"Custom system instructions for the project-management agent."},"prTitleInstructions":{"type":"string","maxLength":64000,"description":"Organization instructions for agent pull request titles."},"pullRequestInsightsEnabled":{"type":"boolean","description":"Enable or disable pull request contribution insight collection."},"shouldSignCommits":{"type":"boolean","description":"Sign agent-created commits when signing credentials are configured."},"slackReviewOnTembo":{"type":"boolean","description":"Use Tembo review links in Slack review notifications."},"slowQueryThresholdMs":{"type":"number","minimum":0,"description":"Threshold in milliseconds for identifying slow database queries."},"sshPublicKeys":{"type":"string","maxLength":64000,"description":"SSH public keys authorized for organization workspace access."},"weeklyReportEnabled":{"type":"boolean","description":"Enable or disable the organization weekly report."}},"required":["cloneDepth","commitInstructions","customReviewBots","customSystemPrompt","defaultAgent","defaultKeepAliveMinutes","defaultSandboxSize","deleteBranchWhenPrClosed","draftPrs","enableCoderabbitBot","enableCursorBot","enableGeminiCodeAssistBot","enableGithubActionsBot","enableGraphiteBot","enableGreptileBot","experimentalMcp","fallbackToApiOnSubscriptionLimit","featureMentionAuthor","maxBotReviews","maxSolutions","onDemandMaxCreditUsage","pgStatStatementsResetFrequency","pmSystemPrompt","prTitleInstructions","pullRequestInsightsEnabled","shouldSignCommits","slackReviewOnTembo","slowQueryThresholdMs","sshPublicKeys","weeklyReportEnabled"],"additionalProperties":false}},"required":["organizationId","settings"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ampApiKey":{"type":"string","maxLength":64000,"description":"API key for Amp agent access."},"anthropicApiKey":{"type":"string","maxLength":64000,"description":"Anthropic API key for organization-provided inference."},"awsBedrockAccessKeyId":{"type":"string","maxLength":64000,"description":"AWS access key ID for Bedrock inference."},"awsBedrockRegion":{"type":"string","maxLength":64000,"description":"AWS region for Bedrock inference."},"awsBedrockSecretAccessKey":{"type":"string","maxLength":64000,"description":"AWS secret access key for Bedrock inference."},"cloneDepth":{"type":"integer","exclusiveMinimum":0,"description":"Git clone history depth used for repositories."},"commitInstructions":{"type":"string","maxLength":64000,"description":"Organization instructions for agent commit messages."},"cursorApiKey":{"type":"string","maxLength":64000,"description":"API key for Cursor agent access."},"customReviewBots":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]*(\\[bot\\])?$","minLength":1,"maxLength":100},"maxItems":25,"description":"Additional GitHub bot logins Tembo responds to without an @tembo mention."},"customSystemPrompt":{"type":"string","maxLength":64000,"description":"Custom system instructions supplied to organization agents."},"defaultAgent":{"type":"string","maxLength":64000,"description":"Default coding agent and model key for the organization."},"defaultKeepAliveMinutes":{"type":"integer","minimum":0,"maximum":10080,"description":"Default VM keep-alive duration in minutes. 0 preserves built-in per-source durations."},"defaultSandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"],"description":"Default VM size for organization sessions."},"deleteBranchWhenPrClosed":{"type":"boolean","description":"Delete agent-created branches when their pull requests close."},"draftPrs":{"type":"boolean","description":"Create agent pull requests as drafts by default."},"enableCoderabbitBot":{"type":"boolean","description":"Enable handling of CodeRabbit bot feedback."},"enableCursorBot":{"type":"boolean","description":"Enable handling of Cursor bot feedback."},"enableGeminiCodeAssistBot":{"type":"boolean","description":"Enable handling of Gemini Code Assist bot feedback."},"enableGithubActionsBot":{"type":"boolean","description":"Enable handling of GitHub Actions bot feedback."},"enableGraphiteBot":{"type":"boolean","description":"Enable handling of Graphite bot feedback."},"enableGreptileBot":{"type":"boolean","description":"Enable handling of Greptile bot feedback."},"experimentalMcp":{"type":"boolean","description":"Enable experimental MCP features for the organization."},"featureMentionAuthor":{"type":"boolean","description":"Enable mentioning the author in supported integration responses."},"gcpVertexAiLocation":{"type":"string","maxLength":64000,"description":"Google Cloud location for Vertex AI inference."},"gcpVertexAiProject":{"type":"string","maxLength":64000,"description":"Google Cloud project for Vertex AI inference."},"gcpVertexAiServiceAccountJson":{"type":"string","maxLength":64000,"description":"Service-account JSON credentials for Vertex AI inference."},"kernelApiKey":{"type":"string","maxLength":64000,"description":"API key for Kernel browser access."},"maxBotReviews":{"type":"integer","minimum":0,"description":"Maximum number of bot review iterations."},"maxSolutions":{"type":"integer","minimum":0,"description":"Maximum number of generated solutions."},"openaiApiKey":{"type":"string","maxLength":64000,"description":"OpenAI API key for organization-provided inference."},"xaiApiKey":{"type":"string","maxLength":64000,"description":"xAI API key for organization-provided inference."},"openrouterApiKey":{"type":"string","maxLength":64000,"description":"OpenRouter API key for organization-provided inference."},"pgStatStatementsResetFrequency":{"type":"string","maxLength":64000,"description":"Reset frequency for PostgreSQL pg_stat_statements collection."},"pmSystemPrompt":{"type":"string","maxLength":64000,"description":"Custom system instructions for the project-management agent."},"prTitleInstructions":{"type":"string","maxLength":64000,"description":"Organization instructions for agent pull request titles."},"pullRequestInsightsEnabled":{"type":"boolean","description":"Enable or disable pull request contribution insight collection."},"shouldSignCommits":{"type":"boolean","description":"Sign agent-created commits when signing credentials are configured."},"slackReviewOnTembo":{"type":"boolean","description":"Use Tembo review links in Slack review notifications."},"slowQueryThresholdMs":{"type":"number","minimum":0,"description":"Threshold in milliseconds for identifying slow database queries."},"sshPublicKeys":{"type":"string","maxLength":64000,"description":"SSH public keys authorized for organization workspace access."},"weeklyReportEnabled":{"type":"boolean","description":"Enable or disable the organization weekly report."}},"additionalProperties":false}}}}}},"/v1/organizations/{organizationId}/settings/validate-credentials":{"post":{"operationId":"validateOrganizationCredentials","summary":"Validate organization provider credentials","description":"Validate supplied or stored inference provider credentials for an organization without returning them. The provider must be available on the organization’s plan.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Validate organization provider credentials","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the supplied credentials passed provider validation."}},"required":["valid"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","const":"anthropic","description":"Validate Anthropic API credentials without saving them."},"apiKey":{"type":"string","description":"The Anthropic API key."}},"required":["provider","apiKey"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"openai","description":"Validate OpenAI API credentials without saving them."},"apiKey":{"type":"string","description":"The OpenAI API key."}},"required":["provider","apiKey"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"xai","description":"Validate xAI API credentials without saving them."},"apiKey":{"type":"string","description":"The xAI API key."}},"required":["provider","apiKey"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"openrouter","description":"Validate OpenRouter API credentials without saving them."},"apiKey":{"type":"string","description":"The OpenRouter API key."}},"required":["provider","apiKey"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"aws-bedrock","description":"Validate AWS Bedrock credentials without saving them."},"accessKeyId":{"type":"string","description":"The AWS access key ID."},"secretAccessKey":{"type":"string","description":"The AWS secret access key."},"region":{"type":"string","description":"The AWS region."}},"required":["provider","accessKeyId","secretAccessKey","region"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","const":"gcp-vertex-ai","description":"Validate Google Cloud Vertex AI credentials without saving them."},"serviceAccountJson":{"type":"string","description":"The GCP service account JSON."},"project":{"type":"string","description":"The GCP project ID."},"location":{"type":"string","description":"The Vertex AI location."}},"required":["provider","serviceAccountJson","project","location"],"additionalProperties":false}]},{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","aws-bedrock","gcp-vertex-ai"]},"stored":{"type":"boolean","const":true}},"required":["provider","stored"],"additionalProperties":false}]}}}}}},"/v1/organizations/{organizationId}/subscriptions":{"get":{"operationId":"retrieveOrganizationSubscriptions","summary":"Retrieve organization subscriptions","description":"Retrieve connection statuses and available ChatGPT and Claude usage. Provider usage errors are reported without failing the response.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve organization subscriptions","content":{"application/json":{"schema":{"type":"object","properties":{"chatgpt":{"type":"object","properties":{"connected":{"type":"boolean"},"usage":{"type":["object","null"],"properties":{"planType":{"type":"string","enum":["free","go","plus","pro","prolite","promax","team","self_serve_business_prolite","self_serve_business_usage_based","business","ent26","enterprise_cbp_automation","enterprise_cbp_usage_based","enterprise","edu","edu_plus","edu_pro","unknown"]},"rateLimits":{"type":"array","items":{"type":"object","properties":{"limitId":{"type":["string","null"]},"limitName":{"type":["string","null"]},"planType":{"type":["string","null"],"enum":["free","go","plus","pro","prolite","promax","team","self_serve_business_prolite","self_serve_business_usage_based","business","ent26","enterprise_cbp_automation","enterprise_cbp_usage_based","enterprise","edu","edu_plus","edu_pro","unknown",null]},"primary":{"type":["object","null"],"properties":{"usedPercent":{"type":"number"},"windowDurationMins":{"type":["integer","null"],"exclusiveMinimum":0},"resetsAt":{"type":["integer","null"],"minimum":0}},"required":["usedPercent","windowDurationMins","resetsAt"],"additionalProperties":false},"secondary":{"type":["object","null"],"properties":{"usedPercent":{"type":"number"},"windowDurationMins":{"type":["integer","null"],"exclusiveMinimum":0},"resetsAt":{"type":["integer","null"],"minimum":0}},"required":["usedPercent","windowDurationMins","resetsAt"],"additionalProperties":false},"credits":{"type":["object","null"],"properties":{"hasCredits":{"type":"boolean"},"unlimited":{"type":"boolean"},"balance":{"type":["string","null"]}},"required":["hasCredits","unlimited","balance"],"additionalProperties":false},"individualLimit":{"type":["object","null"],"properties":{"limit":{"type":"string"},"used":{"type":"string"},"remainingPercent":{"type":"number"},"resetsAt":{"type":"integer","minimum":0}},"required":["limit","used","remainingPercent","resetsAt"],"additionalProperties":false},"spendControlReached":{"type":["boolean","null"]},"rateLimitReachedType":{"type":["string","null"],"enum":["rate_limit_reached","workspace_owner_credits_depleted","workspace_member_credits_depleted","workspace_owner_usage_limit_reached","workspace_member_usage_limit_reached","unknown",null]}},"required":["limitId","limitName","planType","primary","secondary","credits","individualLimit","spendControlReached","rateLimitReachedType"],"additionalProperties":false}},"rateLimitResetCredits":{"type":["object","null"],"properties":{"availableCount":{"type":"integer","minimum":0},"credits":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string"},"resetType":{"type":"string","enum":["codexRateLimits","unknown"]},"status":{"type":"string","enum":["available","redeeming","redeemed","unknown"]},"grantedAt":{"type":"integer","minimum":0},"expiresAt":{"type":["integer","null"],"minimum":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["id","resetType","status","grantedAt","expiresAt","title","description"],"additionalProperties":false}}},"required":["availableCount","credits"],"additionalProperties":false},"tokenUsage":{"type":"object","properties":{"summary":{"type":"object","properties":{"lifetimeTokens":{"type":["integer","null"],"minimum":0},"peakDailyTokens":{"type":["integer","null"],"minimum":0},"longestRunningTurnSec":{"type":["integer","null"],"minimum":0},"currentStreakDays":{"type":["integer","null"],"minimum":0},"longestStreakDays":{"type":["integer","null"],"minimum":0}},"required":["lifetimeTokens","peakDailyTokens","longestRunningTurnSec","currentStreakDays","longestStreakDays"],"additionalProperties":false},"dailyUsageBuckets":{"type":["array","null"],"items":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"tokens":{"type":"integer","minimum":0}},"required":["startDate","tokens"],"additionalProperties":false}}},"required":["summary","dailyUsageBuckets"],"additionalProperties":false},"fetchedAt":{"type":"string","format":"date-time"}},"required":["planType","rateLimits","rateLimitResetCredits","tokenUsage","fetchedAt"],"additionalProperties":false},"usageError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["reconnectRequired","rateLimited","unavailable"]},"message":{"type":"string"},"retryAfter":{"type":["string","null"]}},"required":["code","message","retryAfter"],"additionalProperties":false}},"required":["connected","usage","usageError"],"additionalProperties":false},"claude":{"type":"object","properties":{"connected":{"type":"boolean"},"reconnectRequired":{"type":"boolean"},"usage":{"type":["object","null"],"properties":{"rateLimits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","const":"five_hour"},"label":{"type":"string","const":"5-hour limit"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day"},"label":{"type":"string","const":"Weekly limit"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_oauth_apps"},"label":{"type":"string","const":"Weekly limit · OAuth apps"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_opus"},"label":{"type":"string","const":"Weekly limit · Opus"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_sonnet"},"label":{"type":"string","const":"Weekly limit · Sonnet"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_cowork"},"label":{"type":"string","const":"Weekly limit · Cowork"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false}]}},"rateLimitResetCredits":{"type":["object","null"],"properties":{"availableCount":{"type":"integer","minimum":0}},"required":["availableCount"],"additionalProperties":false}},"required":["rateLimits","rateLimitResetCredits"],"additionalProperties":false},"usageError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["reconnectRequired","rateLimited","unavailable"]},"message":{"type":"string"},"retryAfter":{"type":["string","null"]}},"required":["code","message","retryAfter"],"additionalProperties":false}},"required":["connected","reconnectRequired","usage","usageError"],"additionalProperties":false},"supergrok":{"type":"object","properties":{"connected":{"type":"boolean"},"usage":{"type":["object","null"],"properties":{"rateLimits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","const":"weekly"},"label":{"type":"string","const":"Weekly limit"},"detail":{"type":["string","null"]},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"monthly"},"label":{"type":"string","const":"Monthly limit"},"detail":{"type":["string","null"]},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"credits"},"label":{"type":"string","const":"Credit usage"},"detail":{"type":["string","null"]},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false}]}}},"required":["rateLimits"],"additionalProperties":false},"usageError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["reconnectRequired","rateLimited","unavailable"]},"message":{"type":"string"},"retryAfter":{"type":["string","null"]}},"required":["code","message","retryAfter"],"additionalProperties":false}},"required":["connected","usage","usageError"],"additionalProperties":false}},"required":["chatgpt","claude","supergrok"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Organization administrator access is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Organization resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Organization operation conflicts with existing state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Organization operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The subscription provider is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Required organization storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"organizationId","schema":{"type":"string"},"required":true}]}},"/v1/organizations/{organizationId}/roles":{"get":{"operationId":"listOrganizationRoles","summary":"List organization roles","tags":["Organization roles"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List organization roles","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":["string","null"]},"color":{"type":"string"},"isDefault":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string","enum":["organization:audit_log:read","organization:audit_log:write","organization:read","organization:write","organization:member:read","organization:member:write","organization:invitation:read","organization:invitation:write","organization:role:read","organization:role:write","organization:secret:read","organization:secret:write","organization:setting:read","organization:setting:write","organization:configuration:read","organization:configuration:write","organization:subscription:read","organization:subscription:write","organization:onboarding:read","organization:onboarding:write","organization:logo:read","organization:logo:write","organization:slack_connect:read","organization:slack_connect:write","billing:read","billing:write","billing:trial:read","billing:trial:write","billing:usage:read","billing:usage:write","billing:payment:read","billing:payment:write","billing:payment_method:read","billing:payment_method:write","billing:checkout:read","billing:checkout:write","billing:subscription_checkout:read","billing:subscription_checkout:write","billing:portal:read","billing:portal:write","billing:on_demand:read","billing:on_demand:write","billing:credit:read","billing:credit:write","billing:custom_price:read","billing:custom_price:write","billing:custom_plan:read","billing:custom_plan:write","billing:overage_report:read","billing:overage_report:write","api_key:read","api_key:write","user:read","user:write","user:setting:read","user:setting:write","user:environment_variable:read","user:environment_variable:write","user:subscription:read","user:subscription:write","user:connected_account:read","user:connected_account:write","user:organization:read","user:organization:write","user:profile_picture:read","user:profile_picture:write","user:deletion:read","user:deletion:write","agent:read","agent:write","agent:schedule:read","agent:schedule:write","agent:trigger:read","agent:trigger:write","agent:run:read","agent:run:write","agent:instruction_revision:read","agent:instruction_revision:write","agent:template:read","agent:template:write","session:read","session:write","session:message:read","session:message:write","session:artifact:read","session:artifact:write","session:source:read","session:source:write","session:command:read","session:command:write","session:input:read","session:input:write","session:queue:read","session:queue:write","session:event:read","session:event:write","session:file:read","session:file:write","session:diff:read","session:diff:write","session:workspace:read","session:workspace:write","session:workspace_file:read","session:workspace_file:write","session:workspace_diff:read","session:workspace_diff:write","session:workspace_preview:read","session:workspace_preview:write","pull_request:read","pull_request:write","pull_request:merge:read","pull_request:merge:write","pull_request:attachment:read","pull_request:attachment:write","pull_request:session:read","pull_request:session:write","pull_request:message:read","pull_request:message:write","pull_request:comment:read","pull_request:comment:write","pull_request:review:read","pull_request:review:write","pull_request:reaction:read","pull_request:reaction:write","pull_request:commit:read","pull_request:commit:write","pull_request:check:read","pull_request:check:write","pull_request:file:read","pull_request:file:write","pull_request:reviewer:read","pull_request:reviewer:write","pull_request:label:read","pull_request:label:write","pull_request:thread:read","pull_request:thread:write","pull_request:tour:read","pull_request:tour:write","pull_request:branch_status:read","pull_request:branch_status:write","pull_request:stack:read","pull_request:stack:write","repository:read","repository:write","repository:branch:read","repository:branch:write","repository:file:read","repository:file:write","repository:pull_request:read","repository:pull_request:write","repository:user:read","repository:user:write","repository:label:read","repository:label:write","integration:read","integration:write","integration:trigger:read","integration:trigger:write","integration:provider:read","integration:provider:write","integration:configuration:read","integration:configuration:write","integration:snyk_organization:read","integration:snyk_organization:write","integration:sentry_environment:read","integration:sentry_environment:write","integration:slack_channel:read","integration:slack_channel:write","integration:rate_limit:read","integration:rate_limit:write","mcp_connection:read","mcp_connection:write","mcp_connection:shared:read","mcp_connection:shared:write","model:read","model:write","project:read","project:write","project:environment_variable:read","project:environment_variable:write","project:snapshot:read","project:snapshot:write","project:build:read","project:build:write","project:build_detail:read","project:build_detail:write","project:schedule:read","project:schedule:write","project:default:read","project:default:write","project:system_snapshot:read","project:system_snapshot:write","project:organization_snapshot:read","project:organization_snapshot:write","sandbox:read","sandbox:write","sandbox:metric:read","sandbox:metric:write","sandbox:event:read","sandbox:event:write","sandbox:size:read","sandbox:size:write","sandbox:virtual_machine:read","sandbox:virtual_machine:write","device:read","device:write","skill:read","skill:write","skill:marketplace:read","skill:marketplace:write","insight:read","insight:write","insight:member:read","insight:member:write","insight:repository:read","insight:repository:write","insight:usage:read","insight:usage:write","file:read","file:write","pin:read","pin:write","folder:read","folder:write","queue:job:read","queue:job:write","queue:host_manager_job:read","queue:host_manager_job:write","queue:worker:read","queue:worker:write","queue:scheduled_job:read","queue:scheduled_job:write","queue:triggered_job:read","queue:triggered_job:write","runtime:read","runtime:write","session:source_credential:read","session:source_credential:write","device:all:write","insight:user:read"]},"maxItems":240},"memberCount":{"type":"integer","minimum":0},"isCurrentRole":{"type":"boolean"}},"required":["id","name","description","icon","color","isDefault","permissions","memberCount","isCurrentRole"]}}}}},"400":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}]},"post":{"operationId":"createOrganizationRole","summary":"Create a organization role","tags":["Organization roles"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a organization role","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000,"default":""},"icon":{"type":["string","null"],"enum":["key","crown","shield","star","rocket","user","people","eye","code","bug","tools","megaphone","graduate","heart","fire","diamond","magic","robot",null]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"permissions":{"type":"array","items":{"type":"string","enum":["organization:audit_log:read","organization:audit_log:write","organization:read","organization:write","organization:member:read","organization:member:write","organization:invitation:read","organization:invitation:write","organization:role:read","organization:role:write","organization:secret:read","organization:secret:write","organization:setting:read","organization:setting:write","organization:configuration:read","organization:configuration:write","organization:subscription:read","organization:subscription:write","organization:onboarding:read","organization:onboarding:write","organization:logo:read","organization:logo:write","organization:slack_connect:read","organization:slack_connect:write","billing:read","billing:write","billing:trial:read","billing:trial:write","billing:usage:read","billing:usage:write","billing:payment:read","billing:payment:write","billing:payment_method:read","billing:payment_method:write","billing:checkout:read","billing:checkout:write","billing:subscription_checkout:read","billing:subscription_checkout:write","billing:portal:read","billing:portal:write","billing:on_demand:read","billing:on_demand:write","billing:credit:read","billing:credit:write","billing:custom_price:read","billing:custom_price:write","billing:custom_plan:read","billing:custom_plan:write","billing:overage_report:read","billing:overage_report:write","api_key:read","api_key:write","user:read","user:write","user:setting:read","user:setting:write","user:environment_variable:read","user:environment_variable:write","user:subscription:read","user:subscription:write","user:connected_account:read","user:connected_account:write","user:organization:read","user:organization:write","user:profile_picture:read","user:profile_picture:write","user:deletion:read","user:deletion:write","agent:read","agent:write","agent:schedule:read","agent:schedule:write","agent:trigger:read","agent:trigger:write","agent:run:read","agent:run:write","agent:instruction_revision:read","agent:instruction_revision:write","agent:template:read","agent:template:write","session:read","session:write","session:message:read","session:message:write","session:artifact:read","session:artifact:write","session:source:read","session:source:write","session:command:read","session:command:write","session:input:read","session:input:write","session:queue:read","session:queue:write","session:event:read","session:event:write","session:file:read","session:file:write","session:diff:read","session:diff:write","session:workspace:read","session:workspace:write","session:workspace_file:read","session:workspace_file:write","session:workspace_diff:read","session:workspace_diff:write","session:workspace_preview:read","session:workspace_preview:write","pull_request:read","pull_request:write","pull_request:merge:read","pull_request:merge:write","pull_request:attachment:read","pull_request:attachment:write","pull_request:session:read","pull_request:session:write","pull_request:message:read","pull_request:message:write","pull_request:comment:read","pull_request:comment:write","pull_request:review:read","pull_request:review:write","pull_request:reaction:read","pull_request:reaction:write","pull_request:commit:read","pull_request:commit:write","pull_request:check:read","pull_request:check:write","pull_request:file:read","pull_request:file:write","pull_request:reviewer:read","pull_request:reviewer:write","pull_request:label:read","pull_request:label:write","pull_request:thread:read","pull_request:thread:write","pull_request:tour:read","pull_request:tour:write","pull_request:branch_status:read","pull_request:branch_status:write","pull_request:stack:read","pull_request:stack:write","repository:read","repository:write","repository:branch:read","repository:branch:write","repository:file:read","repository:file:write","repository:pull_request:read","repository:pull_request:write","repository:user:read","repository:user:write","repository:label:read","repository:label:write","integration:read","integration:write","integration:trigger:read","integration:trigger:write","integration:provider:read","integration:provider:write","integration:configuration:read","integration:configuration:write","integration:snyk_organization:read","integration:snyk_organization:write","integration:sentry_environment:read","integration:sentry_environment:write","integration:slack_channel:read","integration:slack_channel:write","integration:rate_limit:read","integration:rate_limit:write","mcp_connection:read","mcp_connection:write","mcp_connection:shared:read","mcp_connection:shared:write","model:read","model:write","project:read","project:write","project:environment_variable:read","project:environment_variable:write","project:snapshot:read","project:snapshot:write","project:build:read","project:build:write","project:build_detail:read","project:build_detail:write","project:schedule:read","project:schedule:write","project:default:read","project:default:write","project:system_snapshot:read","project:system_snapshot:write","project:organization_snapshot:read","project:organization_snapshot:write","sandbox:read","sandbox:write","sandbox:metric:read","sandbox:metric:write","sandbox:event:read","sandbox:event:write","sandbox:size:read","sandbox:size:write","sandbox:virtual_machine:read","sandbox:virtual_machine:write","device:read","device:write","skill:read","skill:write","skill:marketplace:read","skill:marketplace:write","insight:read","insight:write","insight:member:read","insight:member:write","insight:repository:read","insight:repository:write","insight:usage:read","insight:usage:write","file:read","file:write","pin:read","pin:write","folder:read","folder:write","queue:job:read","queue:job:write","queue:host_manager_job:read","queue:host_manager_job:write","queue:worker:read","queue:worker:write","queue:scheduled_job:read","queue:scheduled_job:write","queue:triggered_job:read","queue:triggered_job:write","runtime:read","runtime:write","session:source_credential:read","session:source_credential:write","device:all:write","insight:user:read"]},"maxItems":240}},"required":["name","permissions"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}]}},"/v1/organizations/{organizationId}/roles/{roleId}":{"get":{"operationId":"retrieveOrganizationRole","summary":"Retrieve an organization role","tags":["Organization roles"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an organization role","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":["string","null"]},"color":{"type":"string"},"isDefault":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string","enum":["organization:audit_log:read","organization:audit_log:write","organization:read","organization:write","organization:member:read","organization:member:write","organization:invitation:read","organization:invitation:write","organization:role:read","organization:role:write","organization:secret:read","organization:secret:write","organization:setting:read","organization:setting:write","organization:configuration:read","organization:configuration:write","organization:subscription:read","organization:subscription:write","organization:onboarding:read","organization:onboarding:write","organization:logo:read","organization:logo:write","organization:slack_connect:read","organization:slack_connect:write","billing:read","billing:write","billing:trial:read","billing:trial:write","billing:usage:read","billing:usage:write","billing:payment:read","billing:payment:write","billing:payment_method:read","billing:payment_method:write","billing:checkout:read","billing:checkout:write","billing:subscription_checkout:read","billing:subscription_checkout:write","billing:portal:read","billing:portal:write","billing:on_demand:read","billing:on_demand:write","billing:credit:read","billing:credit:write","billing:custom_price:read","billing:custom_price:write","billing:custom_plan:read","billing:custom_plan:write","billing:overage_report:read","billing:overage_report:write","api_key:read","api_key:write","user:read","user:write","user:setting:read","user:setting:write","user:environment_variable:read","user:environment_variable:write","user:subscription:read","user:subscription:write","user:connected_account:read","user:connected_account:write","user:organization:read","user:organization:write","user:profile_picture:read","user:profile_picture:write","user:deletion:read","user:deletion:write","agent:read","agent:write","agent:schedule:read","agent:schedule:write","agent:trigger:read","agent:trigger:write","agent:run:read","agent:run:write","agent:instruction_revision:read","agent:instruction_revision:write","agent:template:read","agent:template:write","session:read","session:write","session:message:read","session:message:write","session:artifact:read","session:artifact:write","session:source:read","session:source:write","session:command:read","session:command:write","session:input:read","session:input:write","session:queue:read","session:queue:write","session:event:read","session:event:write","session:file:read","session:file:write","session:diff:read","session:diff:write","session:workspace:read","session:workspace:write","session:workspace_file:read","session:workspace_file:write","session:workspace_diff:read","session:workspace_diff:write","session:workspace_preview:read","session:workspace_preview:write","pull_request:read","pull_request:write","pull_request:merge:read","pull_request:merge:write","pull_request:attachment:read","pull_request:attachment:write","pull_request:session:read","pull_request:session:write","pull_request:message:read","pull_request:message:write","pull_request:comment:read","pull_request:comment:write","pull_request:review:read","pull_request:review:write","pull_request:reaction:read","pull_request:reaction:write","pull_request:commit:read","pull_request:commit:write","pull_request:check:read","pull_request:check:write","pull_request:file:read","pull_request:file:write","pull_request:reviewer:read","pull_request:reviewer:write","pull_request:label:read","pull_request:label:write","pull_request:thread:read","pull_request:thread:write","pull_request:tour:read","pull_request:tour:write","pull_request:branch_status:read","pull_request:branch_status:write","pull_request:stack:read","pull_request:stack:write","repository:read","repository:write","repository:branch:read","repository:branch:write","repository:file:read","repository:file:write","repository:pull_request:read","repository:pull_request:write","repository:user:read","repository:user:write","repository:label:read","repository:label:write","integration:read","integration:write","integration:trigger:read","integration:trigger:write","integration:provider:read","integration:provider:write","integration:configuration:read","integration:configuration:write","integration:snyk_organization:read","integration:snyk_organization:write","integration:sentry_environment:read","integration:sentry_environment:write","integration:slack_channel:read","integration:slack_channel:write","integration:rate_limit:read","integration:rate_limit:write","mcp_connection:read","mcp_connection:write","mcp_connection:shared:read","mcp_connection:shared:write","model:read","model:write","project:read","project:write","project:environment_variable:read","project:environment_variable:write","project:snapshot:read","project:snapshot:write","project:build:read","project:build:write","project:build_detail:read","project:build_detail:write","project:schedule:read","project:schedule:write","project:default:read","project:default:write","project:system_snapshot:read","project:system_snapshot:write","project:organization_snapshot:read","project:organization_snapshot:write","sandbox:read","sandbox:write","sandbox:metric:read","sandbox:metric:write","sandbox:event:read","sandbox:event:write","sandbox:size:read","sandbox:size:write","sandbox:virtual_machine:read","sandbox:virtual_machine:write","device:read","device:write","skill:read","skill:write","skill:marketplace:read","skill:marketplace:write","insight:read","insight:write","insight:member:read","insight:member:write","insight:repository:read","insight:repository:write","insight:usage:read","insight:usage:write","file:read","file:write","pin:read","pin:write","folder:read","folder:write","queue:job:read","queue:job:write","queue:host_manager_job:read","queue:host_manager_job:write","queue:worker:read","queue:worker:write","queue:scheduled_job:read","queue:scheduled_job:write","queue:triggered_job:read","queue:triggered_job:write","runtime:read","runtime:write","session:source_credential:read","session:source_credential:write","device:all:write","insight:user:read"]},"maxItems":240},"memberCount":{"type":"integer","minimum":0},"isCurrentRole":{"type":"boolean"}},"required":["id","name","description","icon","color","isDefault","permissions","memberCount","isCurrentRole"]}}}},"400":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string"},"in":"path","name":"roleId","required":true}]},"patch":{"operationId":"updateOrganizationRole","summary":"Update a organization role","tags":["Organization roles"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a organization role","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000,"default":""},"icon":{"type":["string","null"],"enum":["key","crown","shield","star","rocket","user","people","eye","code","bug","tools","megaphone","graduate","heart","fire","diamond","magic","robot",null]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"permissions":{"type":"array","items":{"type":"string","enum":["organization:audit_log:read","organization:audit_log:write","organization:read","organization:write","organization:member:read","organization:member:write","organization:invitation:read","organization:invitation:write","organization:role:read","organization:role:write","organization:secret:read","organization:secret:write","organization:setting:read","organization:setting:write","organization:configuration:read","organization:configuration:write","organization:subscription:read","organization:subscription:write","organization:onboarding:read","organization:onboarding:write","organization:logo:read","organization:logo:write","organization:slack_connect:read","organization:slack_connect:write","billing:read","billing:write","billing:trial:read","billing:trial:write","billing:usage:read","billing:usage:write","billing:payment:read","billing:payment:write","billing:payment_method:read","billing:payment_method:write","billing:checkout:read","billing:checkout:write","billing:subscription_checkout:read","billing:subscription_checkout:write","billing:portal:read","billing:portal:write","billing:on_demand:read","billing:on_demand:write","billing:credit:read","billing:credit:write","billing:custom_price:read","billing:custom_price:write","billing:custom_plan:read","billing:custom_plan:write","billing:overage_report:read","billing:overage_report:write","api_key:read","api_key:write","user:read","user:write","user:setting:read","user:setting:write","user:environment_variable:read","user:environment_variable:write","user:subscription:read","user:subscription:write","user:connected_account:read","user:connected_account:write","user:organization:read","user:organization:write","user:profile_picture:read","user:profile_picture:write","user:deletion:read","user:deletion:write","agent:read","agent:write","agent:schedule:read","agent:schedule:write","agent:trigger:read","agent:trigger:write","agent:run:read","agent:run:write","agent:instruction_revision:read","agent:instruction_revision:write","agent:template:read","agent:template:write","session:read","session:write","session:message:read","session:message:write","session:artifact:read","session:artifact:write","session:source:read","session:source:write","session:command:read","session:command:write","session:input:read","session:input:write","session:queue:read","session:queue:write","session:event:read","session:event:write","session:file:read","session:file:write","session:diff:read","session:diff:write","session:workspace:read","session:workspace:write","session:workspace_file:read","session:workspace_file:write","session:workspace_diff:read","session:workspace_diff:write","session:workspace_preview:read","session:workspace_preview:write","pull_request:read","pull_request:write","pull_request:merge:read","pull_request:merge:write","pull_request:attachment:read","pull_request:attachment:write","pull_request:session:read","pull_request:session:write","pull_request:message:read","pull_request:message:write","pull_request:comment:read","pull_request:comment:write","pull_request:review:read","pull_request:review:write","pull_request:reaction:read","pull_request:reaction:write","pull_request:commit:read","pull_request:commit:write","pull_request:check:read","pull_request:check:write","pull_request:file:read","pull_request:file:write","pull_request:reviewer:read","pull_request:reviewer:write","pull_request:label:read","pull_request:label:write","pull_request:thread:read","pull_request:thread:write","pull_request:tour:read","pull_request:tour:write","pull_request:branch_status:read","pull_request:branch_status:write","pull_request:stack:read","pull_request:stack:write","repository:read","repository:write","repository:branch:read","repository:branch:write","repository:file:read","repository:file:write","repository:pull_request:read","repository:pull_request:write","repository:user:read","repository:user:write","repository:label:read","repository:label:write","integration:read","integration:write","integration:trigger:read","integration:trigger:write","integration:provider:read","integration:provider:write","integration:configuration:read","integration:configuration:write","integration:snyk_organization:read","integration:snyk_organization:write","integration:sentry_environment:read","integration:sentry_environment:write","integration:slack_channel:read","integration:slack_channel:write","integration:rate_limit:read","integration:rate_limit:write","mcp_connection:read","mcp_connection:write","mcp_connection:shared:read","mcp_connection:shared:write","model:read","model:write","project:read","project:write","project:environment_variable:read","project:environment_variable:write","project:snapshot:read","project:snapshot:write","project:build:read","project:build:write","project:build_detail:read","project:build_detail:write","project:schedule:read","project:schedule:write","project:default:read","project:default:write","project:system_snapshot:read","project:system_snapshot:write","project:organization_snapshot:read","project:organization_snapshot:write","sandbox:read","sandbox:write","sandbox:metric:read","sandbox:metric:write","sandbox:event:read","sandbox:event:write","sandbox:size:read","sandbox:size:write","sandbox:virtual_machine:read","sandbox:virtual_machine:write","device:read","device:write","skill:read","skill:write","skill:marketplace:read","skill:marketplace:write","insight:read","insight:write","insight:member:read","insight:member:write","insight:repository:read","insight:repository:write","insight:usage:read","insight:usage:write","file:read","file:write","pin:read","pin:write","folder:read","folder:write","queue:job:read","queue:job:write","queue:host_manager_job:read","queue:host_manager_job:write","queue:worker:read","queue:worker:write","queue:scheduled_job:read","queue:scheduled_job:write","queue:triggered_job:read","queue:triggered_job:write","runtime:read","runtime:write","session:source_credential:read","session:source_credential:write","device:all:write","insight:user:read"]},"maxItems":240},"isDefault":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string"},"in":"path","name":"roleId","required":true}]},"delete":{"operationId":"deleteOrganizationRole","summary":"Archive a role with an explicit replacement","tags":["Organization roles"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Archive a role with an explicit replacement","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Role validation, authorization, not-found, or conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"permission":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replacementRoleId":{"type":"string","minLength":1}},"required":["replacementRoleId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string"},"in":"path","name":"roleId","required":true}]}},"/v1/mcp-connections":{"get":{"operationId":"listMcpConnections","summary":"List MCP connections","description":"List MCP connections for the current organization with cursor pagination and optional search by name or URL. Command arguments, headers, and environment configuration are omitted.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List MCP connections","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"connectedAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serverUrl":{"type":["string","null"]},"type":{"type":"string","enum":["remote","stdio"]},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner."}},"required":["connectedAt","id","name","serverUrl","type","visibility"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"connected","schema":{"type":"boolean"},"description":"Filter by whether the MCP connection has completed connection or authorization."},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Search MCP connection names or server URLs."}]},"post":{"operationId":"createMcpConnection","summary":"Create an MCP connection","description":"Create a new stdio or Streamable HTTP MCP connection. Remote connections support OAuth, Client Credentials (M2M), or static headers and begin authorization when required; stdio commands are stored but never executed by this API.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an MCP connection","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":["string","null"],"format":"uri"},"connection":{"type":"object","properties":{"connectedAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serverUrl":{"type":["string","null"]},"type":{"type":"string","enum":["remote","stdio"]},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner."},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100,"description":"Command-line arguments for the stdio server. Stored here, not executed by this API."},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null],"description":"Authentication method: OAuth user authorization (oauth), Client Credentials (M2M) using client_credentials, or static request headers (static_headers)."},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"network":{"type":"string","enum":["public","tailnet"],"description":"public servers are reached directly. tailnet servers are reached only from sessions, through the organization's Tailscale integration; Tembo's API never contacts them, so they authenticate with the tailnet ACL and optional static headers. Set at creation and cannot be changed."},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","network","updatedAt"],"additionalProperties":false}},"required":["authorizationUrl","connection"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the MCP connection."},"args":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":100,"description":"Command-line arguments for the stdio server. Stored here, not executed by this API.","default":[]},"command":{"type":"string","minLength":1,"maxLength":4096,"description":"Executable for the stdio MCP server. This API stores the command but never executes it."},"env":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","maxLength":16384},"description":"Environment variables for the stdio command. Values are write-only."},"type":{"type":"string","const":"stdio","description":"Use stdio for a command-based MCP server."},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner.","default":"shared"}},"required":["name","command","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the MCP connection."},"serverUrl":{"type":"string","format":"uri","description":"HTTP or HTTPS MCP server endpoint. Changing it requires an explicit authType, clears old credentials, and requires authorization to reconnect."},"authType":{"type":"string","enum":["oauth","client_credentials","static_headers"],"description":"Authentication method: OAuth user authorization (oauth), Client Credentials (M2M) using client_credentials, or static request headers (static_headers).","default":"oauth"},"clientId":{"type":"string","minLength":1,"maxLength":4096,"description":"OAuth client ID. Required for client_credentials or pre_registered OAuth."},"clientSecret":{"type":"string","minLength":1,"maxLength":65536,"description":"Write-only OAuth client secret. Required for client_credentials; optional for pre_registered OAuth."},"headers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","maxLength":16384},"description":"Request headers for static-header or automatic OAuth authentication. Values are write-only."},"network":{"type":"string","enum":["public","tailnet"],"description":"public servers are reached directly. tailnet servers are reached only from sessions, through the organization's Tailscale integration; Tembo's API never contacts them, so they authenticate with the tailnet ACL and optional static headers. Set at creation and cannot be changed.","default":"public"},"oauthRegistration":{"type":"string","enum":["automatic","pre_registered"],"description":"Register an OAuth client automatically or use pre-registered clientId and optional clientSecret.","default":"automatic"},"scope":{"type":"string","minLength":1,"maxLength":4096,"description":"OAuth scopes requested for client credentials or pre-registered OAuth."},"type":{"type":"string","const":"remote","default":"remote","description":"Use remote for a Streamable HTTP MCP server."},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner.","default":"shared"}},"required":["name","serverUrl"],"additionalProperties":false}]}}}}}},"/v1/mcp-connections/{mcpConnectionId}":{"get":{"operationId":"retrieveMcpConnection","summary":"Retrieve an MCP connection","description":"Retrieve MCP connection configuration and authentication details. Stored header values, environment values, OAuth tokens, and client secrets are never returned.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an MCP connection","content":{"application/json":{"schema":{"type":"object","properties":{"connectedAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serverUrl":{"type":["string","null"]},"type":{"type":"string","enum":["remote","stdio"]},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner."},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100,"description":"Command-line arguments for the stdio server. Stored here, not executed by this API."},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null],"description":"Authentication method: OAuth user authorization (oauth), Client Credentials (M2M) using client_credentials, or static request headers (static_headers)."},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"network":{"type":"string","enum":["public","tailnet"],"description":"public servers are reached directly. tailnet servers are reached only from sessions, through the organization's Tailscale integration; Tembo's API never contacts them, so they authenticate with the tailnet ACL and optional static headers. Set at creation and cannot be changed."},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","network","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"mcpConnectionId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateMcpConnection","summary":"Update an MCP connection","description":"Update MCP configuration, including OAuth, Client Credentials (M2M), or static-header authentication. Supplied headers merge by key only for unchanged-server static_headers authentication; otherwise they are replaced. Environment values merge by key, null values remove individual keys, and a null environment clears all variables. Hidden credentials are preserved unless explicitly changed or authentication is replaced; changing a remote server URL clears credentials for the old server. Call authorize explicitly after changing the server or authentication to reconnect.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an MCP connection","content":{"application/json":{"schema":{"type":"object","properties":{"connectedAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serverUrl":{"type":["string","null"]},"type":{"type":"string","enum":["remote","stdio"]},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner."},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100,"description":"Command-line arguments for the stdio server. Stored here, not executed by this API."},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null],"description":"Authentication method: OAuth user authorization (oauth), Client Credentials (M2M) using client_credentials, or static request headers (static_headers)."},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"network":{"type":"string","enum":["public","tailnet"],"description":"public servers are reached directly. tailnet servers are reached only from sessions, through the organization's Tailscale integration; Tembo's API never contacts them, so they authenticate with the tailnet ACL and optional static headers. Set at creation and cannot be changed."},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","network","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"mcpConnectionId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the MCP connection."},"serverUrl":{"type":"string","format":"uri","description":"HTTP or HTTPS MCP server endpoint. Changing it requires an explicit authType, clears old credentials, and requires authorization to reconnect."},"type":{"type":"string","const":"remote","description":"Connection type must remain remote; transport type cannot be changed by update."},"authType":{"type":"string","enum":["oauth","client_credentials","static_headers"],"description":"Authentication method: OAuth user authorization (oauth), Client Credentials (M2M) using client_credentials, or static request headers (static_headers)."},"clientId":{"type":"string","minLength":1,"maxLength":4096,"description":"OAuth client ID when replacing authentication. Requires authType; required for client_credentials or pre_registered OAuth."},"clientSecret":{"type":"string","minLength":1,"maxLength":65536,"description":"Write-only client secret when replacing authentication. Requires authType; required for client_credentials."},"headers":{"type":["object","null"],"propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":["string","null"],"maxLength":16384},"description":"Requires authType. Merges by key only when keeping static_headers authentication and the same server URL; otherwise replaces stored headers. Null values remove keys; static_headers requires at least one header. Values are write-only."},"oauthRegistration":{"type":"string","enum":["automatic","pre_registered"],"description":"Register an OAuth client automatically or use pre-registered clientId and optional clientSecret."},"scope":{"type":"string","minLength":1,"maxLength":4096,"description":"OAuth scopes when replacing authentication. Requires authType."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"command":{"type":"string","minLength":1,"maxLength":4096,"description":"Replace the stored stdio server executable. This API never executes it."},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the MCP connection."},"type":{"type":"string","const":"stdio","description":"Connection type must remain stdio; transport type cannot be changed by update."},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100,"description":"Command-line arguments for the stdio server. Stored here, not executed by this API."},"env":{"type":["object","null"],"propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":["string","null"],"maxLength":16384},"description":"Merge write-only environment variables by key. A null value removes a key; null for the entire env field clears all variables."}},"required":["type"],"additionalProperties":false}]}}}}},"delete":{"operationId":"deleteMcpConnection","summary":"Delete an MCP connection","description":"Delete an MCP connection in the current organization.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an MCP connection","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"mcpConnectionId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/mcp-connections/{mcpConnectionId}/authorize":{"post":{"operationId":"authorizeMcpConnection","summary":"Authorize an MCP connection","description":"Connect or authorize a remote Streamable HTTP MCP connection, returning an OAuth URL when user authorization is required. Stdio connections are rejected because this action cannot authorize them.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Authorize an MCP connection","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":["string","null"],"format":"uri"},"connection":{"type":"object","properties":{"connectedAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serverUrl":{"type":["string","null"]},"type":{"type":"string","enum":["remote","stdio"]},"visibility":{"type":"string","enum":["shared","personal"],"description":"shared makes the connection available to the organization; personal restricts it to its owner."},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100,"description":"Command-line arguments for the stdio server. Stored here, not executed by this API."},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null],"description":"Authentication method: OAuth user authorization (oauth), Client Credentials (M2M) using client_credentials, or static request headers (static_headers)."},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"network":{"type":"string","enum":["public","tailnet"],"description":"public servers are reached directly. tailnet servers are reached only from sessions, through the organization's Tailscale integration; Tembo's API never contacts them, so they authenticate with the tailnet ACL and optional static headers. Set at creation and cannot be changed."},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","network","updatedAt"],"additionalProperties":false}},"required":["authorizationUrl","connection"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"mcpConnectionId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/mcp-connections/{mcpConnectionId}/test":{"post":{"operationId":"testMcpConnection","summary":"Test an MCP connection","description":"Test a remote MCP connection by connecting to its server. Stdio connections are rejected because the API does not execute arbitrary local commands.","tags":["MCP Connections"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Test an MCP connection","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"MCP connection management is not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"MCP connection not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"MCP connection conflict or unsupported action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"MCP connection operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The remote MCP server operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"mcpConnectionId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/artifacts":{"get":{"operationId":"listArtifacts","summary":"List artifacts","description":"List organization artifacts with optional session and type filters.","tags":["Artifacts"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List artifacts","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"],"default":"PullRequest"},"updatedAt":{"type":"string","format":"date-time"},"assetId":{"type":["string","null"],"format":"uuid"},"assetUrl":{"type":["string","null"],"format":"uri"},"category":{"type":["string","null"],"enum":["code_walkthrough","bug_report","incident_report","license_audit","data_flow_map","security_findings","cost_map","ux_variations","architecture_map","migration_summary","release_checklist","shipped_summary","rollout_plan","diagram","chart","dashboard","timeline","comparison","report",null]},"contentType":{"type":["string","null"]},"description":{"type":["string","null"]},"fileKind":{"type":"string","enum":["image","video","audio","html","markdown","text","file"]},"fileName":{"type":["string","null"]},"outputType":{"type":["string","null"],"enum":["html","markdown","json","csv","asset",null]},"relatedPullRequestUrls":{"type":"array","items":{"type":"string","format":"uri"}},"runtime":{"type":["object","null"],"properties":{"hostname":{"type":["string","null"]},"serviceName":{"type":["string","null"]},"serviceType":{"type":["string","null"]}},"required":["hostname","serviceName","serviceType"],"additionalProperties":false},"servicePort":{"type":["integer","null"],"minimum":1,"maximum":65535},"serviceUrl":{"type":["string","null"],"format":"uri"},"sizeBytes":{"type":["integer","null"],"minimum":0},"sourceUrl":{"type":["string","null"],"format":"uri"},"title":{"type":"string"}},"required":["createdAt","id","sessionId","type","updatedAt","assetId","assetUrl","category","contentType","description","fileKind","fileName","outputType","relatedPullRequestUrls","runtime","servicePort","serviceUrl","sizeBytes","sourceUrl","title"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Artifact, session, or backing asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Artifact operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"jobId","schema":{"type":"string","minLength":1},"description":"Filter artifacts created by this job."},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"},"description":"Filter artifacts attached to this session."},{"in":"query","name":"types","schema":{"type":"array","items":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"],"default":"PullRequest"},"minItems":1},"description":"Filter artifact types, supplied as a comma-separated list."}]},"post":{"operationId":"createArtifact","summary":"Create an artifact","description":"Create a file artifact for a session from inline content or an uploaded asset.","tags":["Artifacts"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an artifact","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"],"default":"PullRequest"},"updatedAt":{"type":"string","format":"date-time"},"assetId":{"type":["string","null"],"format":"uuid"},"assetUrl":{"type":["string","null"],"format":"uri"},"category":{"type":["string","null"],"enum":["code_walkthrough","bug_report","incident_report","license_audit","data_flow_map","security_findings","cost_map","ux_variations","architecture_map","migration_summary","release_checklist","shipped_summary","rollout_plan","diagram","chart","dashboard","timeline","comparison","report",null]},"content":{"type":"string"},"contentType":{"type":["string","null"]},"description":{"type":["string","null"]},"fileKind":{"type":"string","enum":["image","video","audio","html","markdown","text","file"]},"fileName":{"type":["string","null"]},"outputType":{"type":["string","null"],"enum":["html","markdown","json","csv","asset",null]},"relatedPullRequestUrls":{"type":"array","items":{"type":"string","format":"uri"}},"runtime":{"type":["object","null"],"properties":{"hostname":{"type":["string","null"]},"serviceName":{"type":["string","null"]},"serviceType":{"type":["string","null"]}},"required":["hostname","serviceName","serviceType"],"additionalProperties":false},"servicePort":{"type":["integer","null"],"minimum":1,"maximum":65535},"serviceUrl":{"type":["string","null"],"format":"uri"},"sizeBytes":{"type":["integer","null"],"minimum":0},"sourceUrl":{"type":["string","null"],"format":"uri"},"title":{"type":"string"}},"required":["createdAt","id","sessionId","type","updatedAt","assetId","assetUrl","category","content","contentType","description","fileKind","fileName","outputType","relatedPullRequestUrls","runtime","servicePort","serviceUrl","sizeBytes","sourceUrl","title"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Artifact, session, or backing asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Artifact operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"Human-readable title for the artifact."},"description":{"type":"string","minLength":1,"maxLength":2000,"description":"Short description of what the artifact shows."},"category":{"type":"string","enum":["code_walkthrough","bug_report","incident_report","license_audit","data_flow_map","security_findings","cost_map","ux_variations","architecture_map","migration_summary","release_checklist","shipped_summary","rollout_plan","diagram","chart","dashboard","timeline","comparison","report"],"description":"Artifact category for display and filtering."},"output":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"html"},"content":{"type":"string","minLength":1,"description":"Complete self-contained HTML document. Inline CSS and JavaScript are allowed. Do not depend on external network assets. Must be at most 5242880 bytes after UTF-8 encoding."},"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Optional stored filename. The extension is normalized."}},"required":["type","content"],"additionalProperties":false,"description":"Complete self-contained HTML document. Inline CSS and JavaScript are allowed. Do not depend on external network assets."},{"type":"object","properties":{"type":{"type":"string","const":"markdown"},"content":{"type":"string","minLength":1,"description":"Markdown content for a readable report, checklist, walkthrough, or notes artifact. Must be at most 5242880 bytes after UTF-8 encoding."},"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Optional stored filename. The extension is normalized."}},"required":["type","content"],"additionalProperties":false,"description":"Markdown content for a readable report, checklist, walkthrough, or notes artifact."},{"type":"object","properties":{"type":{"type":"string","const":"json"},"content":{"type":"string","minLength":1,"description":"JSON text for structured data, diagnostics, or machine-readable findings. Send the JSON as a string, not as an object. Must be at most 5242880 bytes after UTF-8 encoding."},"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Optional stored filename. The extension is normalized."}},"required":["type","content"],"additionalProperties":false,"description":"JSON text for structured data, diagnostics, or machine-readable findings. Send the JSON as a string, not as an object."},{"type":"object","properties":{"type":{"type":"string","const":"csv"},"content":{"type":"string","minLength":1,"description":"CSV content for audits, tables, inventories, reports, and spreadsheet-friendly exports. Must be at most 5242880 bytes after UTF-8 encoding."},"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Optional stored filename. The extension is normalized."}},"required":["type","content"],"additionalProperties":false,"description":"CSV content for audits, tables, inventories, reports, and spreadsheet-friendly exports."},{"type":"object","properties":{"type":{"type":"string","const":"asset"},"assetId":{"type":"string","format":"uuid","description":"ID of an existing uploaded Tembo asset."},"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Optional display filename for the uploaded asset."}},"required":["type","assetId"],"additionalProperties":false,"description":"Attach title, category, and artifact metadata to an already uploaded screenshot, image, video, audio file, PDF, or other binary asset."}],"description":"Artifact content or a reference to an uploaded asset. The type field selects the required fields."},"relatedPullRequestUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":20,"description":"URLs of pull requests related to this artifact."},"sessionId":{"type":"string","format":"uuid","description":"Session to attach the artifact to."}},"required":["title","output","sessionId"],"additionalProperties":false}}}}}},"/v1/artifacts/{artifactId}":{"get":{"operationId":"retrieveArtifact","summary":"Retrieve an artifact","description":"Retrieve an organization artifact by ID.","tags":["Artifacts"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an artifact","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"],"default":"PullRequest"},"updatedAt":{"type":"string","format":"date-time"},"assetId":{"type":["string","null"],"format":"uuid"},"assetUrl":{"type":["string","null"],"format":"uri"},"category":{"type":["string","null"],"enum":["code_walkthrough","bug_report","incident_report","license_audit","data_flow_map","security_findings","cost_map","ux_variations","architecture_map","migration_summary","release_checklist","shipped_summary","rollout_plan","diagram","chart","dashboard","timeline","comparison","report",null]},"content":{"type":"string"},"contentType":{"type":["string","null"]},"description":{"type":["string","null"]},"fileKind":{"type":"string","enum":["image","video","audio","html","markdown","text","file"]},"fileName":{"type":["string","null"]},"outputType":{"type":["string","null"],"enum":["html","markdown","json","csv","asset",null]},"relatedPullRequestUrls":{"type":"array","items":{"type":"string","format":"uri"}},"runtime":{"type":["object","null"],"properties":{"hostname":{"type":["string","null"]},"serviceName":{"type":["string","null"]},"serviceType":{"type":["string","null"]}},"required":["hostname","serviceName","serviceType"],"additionalProperties":false},"servicePort":{"type":["integer","null"],"minimum":1,"maximum":65535},"serviceUrl":{"type":["string","null"],"format":"uri"},"sizeBytes":{"type":["integer","null"],"minimum":0},"sourceUrl":{"type":["string","null"],"format":"uri"},"title":{"type":"string"}},"required":["createdAt","id","sessionId","type","updatedAt","assetId","assetUrl","category","content","contentType","description","fileKind","fileName","outputType","relatedPullRequestUrls","runtime","servicePort","serviceUrl","sizeBytes","sourceUrl","title"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Artifact, session, or backing asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Artifact operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"artifactId","schema":{"type":"string","format":"uuid"},"required":true}]},"delete":{"operationId":"deleteArtifact","summary":"Delete an artifact","description":"Delete an organization artifact and its backing asset when present.","tags":["Artifacts"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an artifact","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Artifact, session, or backing asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Artifact operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"artifactId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/artifacts/assets/{assetId}":{"get":{"operationId":"retrieveArtifactAssetUrl","summary":"Retrieve a signed asset URL","description":"Get a fresh signed download URL for an uploaded session asset by its asset ID.","tags":["Artifacts"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a signed asset URL","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"assetUrl":{"type":"string","format":"uri"}},"required":["assetId","assetUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Artifact, session, or backing asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Artifact operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"assetId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/live":{"post":{"operationId":"liveConnectionTicket","summary":"Authorize a live connection","description":"Issue a 30-second WebSocket ticket for one live connection that multiplexes resource subscriptions.","tags":["Live"],"responses":{"200":{"description":"Connection ticket","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string"}},"required":["ticket"]}}}},"401":{"description":"User, API-key or MCP OAuth authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"get":{"operationId":"liveConnection","summary":"Live resource subscriptions","description":"Native WebSocket. Send `{ op: \"subscribe\", id, resource, input }`, `{ op: \"unsubscribe\", id }`, or `{ op: \"ping\" }`; receive `{ id, type: \"ready\" | \"event\" | \"error\" }` or `{ type: \"pong\" }`.","tags":["Live"],"responses":{"101":{"description":"Authorized native WebSocket"},"401":{"description":"Invalid or expired live ticket"}},"parameters":[{"in":"query","name":"ticket","schema":{"type":"string","minLength":1},"required":true,"description":"Short-lived connection ticket returned by liveConnectionTicket. Used to authenticate the native WebSocket connection."}]}},"/v1/messages":{"get":{"operationId":"listMessages","summary":"List messages","description":"List organization messages with optional session and thread filters.","tags":["Messages"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List messages","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"artifactId":{"type":["string","null"],"format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":["string","null"]},"externalAvatarUrl":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"parentMessageId":{"type":["string","null"],"format":"uuid"},"pullRequestId":{"type":["string","null"],"format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"sessionId":{"type":["string","null"],"format":"uuid"},"type":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"richContent":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument"},{"type":"null"}],"description":"Rich-text representation of the message, including formatting and mentions. The content field contains its text representation."},"slashCommand":{"type":["object","null"],"properties":{"command":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string","maxLength":100000}},"required":["command"],"additionalProperties":false},"source":{"type":["string","null"],"maxLength":100}},"required":["artifactId","content","createdAt","createdBy","externalAvatarUrl","externalUrl","id","parentMessageId","pullRequestId","role","sessionId","type","updatedAt","richContent","slashCommand","source"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Message or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Message operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Message operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"},"description":"Filter messages belonging to this session."},{"in":"query","name":"threadId","schema":{"type":"string","format":"uuid"},"description":"Filter messages belonging to this thread."}]},"post":{"operationId":"createMessage","summary":"Create a message","description":"Send a task or follow-up message to an existing session, resume work, or steer an active agent turn using deliveryMode.","tags":["Messages"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a message","content":{"application/json":{"schema":{"type":"object","properties":{"hotPath":{"type":["object","null"],"properties":{"activeProviderTurnId":{"type":["string","null"]},"mode":{"type":"string","enum":["started","steered","queued"]},"providerSessionId":{"type":["string","null"]},"queuedTurnId":{"type":["string","null"]},"transport":{"type":"string"}},"additionalProperties":false},"job":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"task":{"type":"string"}},"required":["id","task"],"additionalProperties":false},"message":{"type":"object","properties":{"artifactId":{"type":["string","null"],"format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":["string","null"]},"externalAvatarUrl":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"parentMessageId":{"type":["string","null"],"format":"uuid"},"pullRequestId":{"type":["string","null"],"format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"sessionId":{"type":["string","null"],"format":"uuid"},"type":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"richContent":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument"},{"type":"null"}],"description":"Rich-text representation of the message, including formatting and mentions. The content field contains its text representation."},"slashCommand":{"type":["object","null"],"properties":{"command":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string","maxLength":100000}},"required":["command"],"additionalProperties":false},"source":{"type":["string","null"],"maxLength":100},"isQueued":{"type":"boolean"}},"required":["artifactId","content","createdAt","createdBy","externalAvatarUrl","externalUrl","id","parentMessageId","pullRequestId","role","sessionId","type","updatedAt","richContent","slashCommand","source","isQueued"],"additionalProperties":false},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"required":["hotPath","job","message","session"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Creating a message requires credentials associated with a user.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Message or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Message operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Message operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifactId":{"type":"string","format":"uuid","description":"Artifact to associate with this message."},"content":{"type":"string","minLength":1,"maxLength":1000000,"description":"Text of the task, follow-up, or steering instruction to send to the session agent."},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"MCP server or connection IDs selected for this message."},"pullRequestId":{"type":"string","format":"uuid","description":"Pull request to associate with this message."},"sessionId":{"type":"string","format":"uuid","description":"Session to receive this message. Use this operation to continue work in an existing session."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput","description":"Agent-specific runtime options for this message, such as reasoning effort."},"deliveryMode":{"type":"string","enum":["queue","steer"],"description":"queue adds a follow-up task; steer sends guidance to an active agent turn when supported."},"richContent":{"$ref":"#/components/schemas/TipTapDocument","description":"Optional rich-text representation of the message. Provide the required text content separately."},"slashCommand":{"type":"object","properties":{"command":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string","maxLength":100000}},"required":["command"],"additionalProperties":false,"description":"Structured slash command to execute with this message."}},"required":["content","sessionId"],"additionalProperties":false}}}}}},"/v1/messages/{messageId}":{"get":{"operationId":"retrieveMessage","summary":"Retrieve a message","description":"Retrieve an organization message by ID.","tags":["Messages"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a message","content":{"application/json":{"schema":{"type":"object","properties":{"artifactId":{"type":["string","null"],"format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":["string","null"]},"externalAvatarUrl":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"parentMessageId":{"type":["string","null"],"format":"uuid"},"pullRequestId":{"type":["string","null"],"format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"sessionId":{"type":["string","null"],"format":"uuid"},"type":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"richContent":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument"},{"type":"null"}],"description":"Rich-text representation of the message, including formatting and mentions. The content field contains its text representation."},"slashCommand":{"type":["object","null"],"properties":{"command":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string","maxLength":100000}},"required":["command"],"additionalProperties":false},"source":{"type":["string","null"],"maxLength":100}},"required":["artifactId","content","createdAt","createdBy","externalAvatarUrl","externalUrl","id","parentMessageId","pullRequestId","role","sessionId","type","updatedAt","richContent","slashCommand","source"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Message or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Message operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Message operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateMessage","summary":"Update a message","description":"Update message content before its queued processing has started.","tags":["Messages"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a message","content":{"application/json":{"schema":{"type":"object","properties":{"artifactId":{"type":["string","null"],"format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":["string","null"]},"externalAvatarUrl":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"parentMessageId":{"type":["string","null"],"format":"uuid"},"pullRequestId":{"type":["string","null"],"format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"sessionId":{"type":["string","null"],"format":"uuid"},"type":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"richContent":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument"},{"type":"null"}],"description":"Rich-text representation of the message, including formatting and mentions. The content field contains its text representation."},"slashCommand":{"type":["object","null"],"properties":{"command":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string","maxLength":100000}},"required":["command"],"additionalProperties":false},"source":{"type":["string","null"],"maxLength":100}},"required":["artifactId","content","createdAt","createdBy","externalAvatarUrl","externalUrl","id","parentMessageId","pullRequestId","role","sessionId","type","updatedAt","richContent","slashCommand","source"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Message or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Message operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Message operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":1000000,"description":"Replace the text of a queued message before processing starts."},"richContent":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument"},{"type":"null"}],"description":"Replace the queued message rich-text document, or null to clear it."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteMessage","summary":"Delete a message","description":"Delete a message and cancel its queued jobs, runtime turns, and active sandbox sessions.","tags":["Messages"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a message","content":{"application/json":{"schema":{"type":"object","properties":{"cancelledJobsCount":{"type":"integer","minimum":0},"cancelledSessionsCount":{"type":"integer","minimum":0},"deleted":{"type":"boolean","const":true},"deletedJobsCount":{"type":"number","const":0},"id":{"type":"string","format":"uuid"}},"required":["cancelledJobsCount","cancelledSessionsCount","deleted","deletedJobsCount","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Message or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Message operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Message operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/models":{"get":{"operationId":"listModels","summary":"List models","description":"List the models available to the current organization, including enablement and inference-provider access.","tags":["Models"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List models","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string"},"provider":{"type":"string"},"enabled":{"type":"boolean"},"available":{"type":"boolean"},"unavailableReason":{"type":["string","null"]},"supportedInferenceProviders":{"type":["array","null"],"items":{"type":"string","enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"]}},"availableInferenceProviders":{"type":"array","items":{"type":"string","enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"]}},"configuredInferenceProvider":{"type":["string","null"],"enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter",null]},"inferenceProvider":{"type":"string","enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"]},"inferenceProviderAccess":{"type":"object","properties":{"TemboManagedInference":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"BYOK":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"AWSBedrock":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"GCPVertexAI":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"OpenRouter":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]}},"required":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"],"additionalProperties":false},"selectedInferenceProviderAvailable":{"type":"boolean"},"selectedInferenceProviderUnavailableReason":{"type":["string","null"]},"chatgptAvailable":{"type":"boolean"},"chatgptSupported":{"type":"boolean"},"workspaceChatgptAvailable":{"type":"boolean"},"claudeSubscriptionSupported":{"type":"boolean"},"workspaceClaudeSubscriptionAvailable":{"type":"boolean"},"supergrokAvailable":{"type":"boolean"},"agentInferenceAvailable":{"type":"boolean"}},"required":["name","label","provider","enabled","available","unavailableReason","supportedInferenceProviders","availableInferenceProviders","configuredInferenceProvider","inferenceProvider","inferenceProviderAccess","selectedInferenceProviderAvailable","selectedInferenceProviderUnavailableReason","chatgptAvailable","chatgptSupported","workspaceChatgptAvailable","claudeSubscriptionSupported","workspaceClaudeSubscriptionAvailable","supergrokAvailable","agentInferenceAvailable"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":200}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Validation error, invalid cursor, or update conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot apply the requested model update","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Model operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/models/{modelName}":{"patch":{"operationId":"updateModel","summary":"Update a model","description":"Enable or disable an organization model, or select its inference provider.","tags":["Models"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a model","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string"},"provider":{"type":"string"},"enabled":{"type":"boolean"},"available":{"type":"boolean"},"unavailableReason":{"type":["string","null"]},"supportedInferenceProviders":{"type":["array","null"],"items":{"type":"string","enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"]}},"availableInferenceProviders":{"type":"array","items":{"type":"string","enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"]}},"configuredInferenceProvider":{"type":["string","null"],"enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter",null]},"inferenceProvider":{"type":"string","enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"]},"inferenceProviderAccess":{"type":"object","properties":{"TemboManagedInference":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"BYOK":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"AWSBedrock":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"GCPVertexAI":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]},"OpenRouter":{"anyOf":[{"type":"object","properties":{"available":{"type":"boolean","const":true},"unavailableCode":{"type":"null"},"unavailableReason":{"type":"null"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false},{"type":"object","properties":{"available":{"type":"boolean","const":false},"unavailableCode":{"type":"string","enum":["plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"unavailableReason":{"type":"string"}},"required":["available","unavailableCode","unavailableReason"],"additionalProperties":false}]}},"required":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter"],"additionalProperties":false},"selectedInferenceProviderAvailable":{"type":"boolean"},"selectedInferenceProviderUnavailableReason":{"type":["string","null"]},"chatgptAvailable":{"type":"boolean"},"chatgptSupported":{"type":"boolean"},"workspaceChatgptAvailable":{"type":"boolean"},"claudeSubscriptionSupported":{"type":"boolean"},"workspaceClaudeSubscriptionAvailable":{"type":"boolean"},"supergrokAvailable":{"type":"boolean"},"agentInferenceAvailable":{"type":"boolean"}},"required":["name","label","provider","enabled","available","unavailableReason","supportedInferenceProviders","availableInferenceProviders","configuredInferenceProvider","inferenceProvider","inferenceProviderAccess","selectedInferenceProviderAvailable","selectedInferenceProviderUnavailableReason","chatgptAvailable","chatgptSupported","workspaceChatgptAvailable","claudeSubscriptionSupported","workspaceClaudeSubscriptionAvailable","supergrokAvailable","agentInferenceAvailable"],"additionalProperties":false}}}},"400":{"description":"Validation error, invalid cursor, or update conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot apply the requested model update","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Model operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"modelName","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable or disable this model for the organization."},"inferenceProvider":{"type":["string","null"],"enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter",null],"description":"Select the inference provider used to run this model. Use listModels to discover available provider access."}},"additionalProperties":false}}}}}},"/v1/runtimes":{"get":{"operationId":"listRuntimes","summary":"List runtimes","description":"List execution runtimes and their compatible model references for the current organization.","tags":["Runtimes"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List runtimes","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["claudeCode","codex","opencode","cursor","amp","fx","pi"]},"displayName":{"type":"string"},"defaultModelName":{"type":"string","minLength":1,"maxLength":200},"requiresApiKey":{"type":"boolean"},"hasApiKey":{"type":"boolean"},"runCapabilities":{"type":"object","properties":{"modes":{"type":"array","items":{"type":"string","enum":["normal","planning"]}},"speeds":{"type":"array","items":{"type":"string","enum":["normal","fast","ultrafast"]}},"supportsGoals":{"type":"boolean"},"ultracodeModels":{"type":"array","items":{"type":"string"},"description":"Models that support ultracode workflow orchestration."}},"required":["modes","speeds","supportsGoals","ultracodeModels"],"additionalProperties":false},"availability":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"code":{"type":"string","enum":["plan_required","missing_credentials"]},"reason":{"type":"string"}},"required":["status","code","reason"],"additionalProperties":false}]},"compatibleModels":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string"},"provider":{"type":"string"},"inferenceSource":{"type":["string","null"],"description":"Selected subscription, API provider, or CLI API billing source for this runtime and model."},"isDefault":{"type":"boolean"},"isPlatformDefault":{"type":"boolean"},"reasoningLevels":{"type":"array","items":{"type":"string"}},"availability":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"code":{"type":"string","enum":["model_disabled","plan_required","trial_inference_exhausted","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_not_connected","claude_subscription_not_connected"]},"reason":{"type":"string"}},"required":["status","code","reason"],"additionalProperties":false}]}},"required":["name","label","provider","inferenceSource","isDefault","isPlatformDefault","reasoningLevels","availability"],"additionalProperties":false}}},"required":["name","displayName","defaultModelName","requiresApiKey","hasApiKey","runCapabilities","availability","compatibleModels"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"enum":["claudeCode","codex","opencode","cursor","amp","fx","pi",null]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request, cursor, or caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","enum":["claudeCode","codex","opencode","cursor","amp","fx","pi"]},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/users/me":{"get":{"operationId":"retrieveCurrentUser","summary":"Retrieve the current user","description":"Retrieve the authenticated user.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve the current user","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"email":{"type":["string","null"]},"emailVerified":{"type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":255},"image":{"type":["string","null"]},"name":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","email","emailVerified","id","image","name","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/users/{userId}":{"get":{"operationId":"retrieveUser","summary":"Retrieve a user","description":"Retrieve a user profile visible to the caller.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a user","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"email":{"type":["string","null"]},"emailVerified":{"type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":255},"image":{"type":["string","null"]},"name":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","email","emailVerified","id","image","name","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/users/{userId}/connected-accounts":{"get":{"operationId":"listUserConnectedAccounts","summary":"List user connected accounts","description":"List the user identity-provider accounts without returning credentials.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List user connected accounts","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"providerId":{"type":"string"},"updatedAt":{"type":["string","null"],"format":"date-time"},"email":{"type":["string","null"],"format":"email"},"scopes":{"type":"array","items":{"type":"string"}},"username":{"type":["string","null"]}},"required":["accountId","createdAt","id","providerId","updatedAt","email","scopes","username"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/users/{userId}/connected-accounts/{connectedAccountId}":{"get":{"operationId":"retrieveUserConnectedAccount","summary":"Retrieve a user connected account","description":"Retrieve one identity-provider account without returning credentials.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a user connected account","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"providerId":{"type":"string"},"updatedAt":{"type":["string","null"],"format":"date-time"},"email":{"type":["string","null"],"format":"email"},"scopes":{"type":"array","items":{"type":"string"}},"username":{"type":["string","null"]}},"required":["accountId","createdAt","id","providerId","updatedAt","email","scopes","username"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"connectedAccountId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/users/{userId}/settings":{"get":{"operationId":"retrieveUserSettings","summary":"Retrieve user settings","description":"Retrieve user preferences without exposing stored credentials.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve user settings","content":{"application/json":{"schema":{"type":"object","properties":{"autoRestartVm":{"type":"boolean"},"defaultProjectId":{"type":["string","null"]},"defaultSessionVisibilityByWorkspace":{"type":"object","additionalProperties":{"type":"string","enum":["private","public"]}},"gpgKey":{"type":"string"},"includeTemboCommitAttribution":{"type":"boolean"},"openPullRequestsAsBot":{"type":"boolean"},"desktopNotificationsEnabled":{"type":"boolean"},"desktopNotificationPreferences":{"type":"object","properties":{"awaitingApproval":{"type":"boolean"},"pullRequestOpened":{"type":"boolean"},"pullRequestReviewRequested":{"type":"boolean"}},"additionalProperties":false},"hasDesktopApp":{"type":"boolean"},"openLinksInDesktopApp":{"type":"boolean"},"appearancePreferences":{"type":"object","properties":{"appTheme":{"type":"string","enum":["light","dark","system"]},"accentTheme":{"type":"object","properties":{"themeId":{"type":"string"},"customSurface":{"type":["string","null"]},"customAccent":{"type":["string","null"]},"customIntensity":{"type":"number"},"systemLight":{"type":"string"},"systemDark":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"appSidebarPreferences":{"type":"object","properties":{"open":{"type":"boolean"},"sessionOwnerScope":{"type":"string","enum":["mine","team"]},"sessionSortBy":{"type":"string","enum":["createdAt","updatedAt"]},"sessionOrganization":{"type":"string","enum":["list","project"]},"showArchivedSessions":{"type":"boolean"},"showActivity":{"type":"boolean"},"width":{"type":"number"},"rightSidebar":{"type":"object","additionalProperties":{"type":"object","properties":{"open":{"type":"boolean"},"width":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},"diffPreferences":{"type":"object","properties":{"style":{"type":"string","enum":["unified","split"]},"indicators":{"type":"string","enum":["classic","bars","none"]},"overflow":{"type":"string","enum":["scroll","wrap"]},"showLineNumbers":{"type":"boolean"},"expandUnchanged":{"type":"boolean"},"showFileTree":{"type":"boolean"},"fileTreePosition":{"type":"string","enum":["left","right"]},"fileTreeView":{"type":"string","enum":["list","tree"]},"lightTheme":{"type":"string"},"darkTheme":{"type":"string"}},"additionalProperties":false},"dashboardPreferences":{"type":"object","properties":{"taskFilters":{"type":"object","properties":{"statusFilter":{"type":"array","items":{"type":"string"}},"sortBy":{"type":"string","enum":["createdAt","updatedAt"]},"searchQuery":{"type":"string"},"integrationType":{"type":"array","items":{"type":"string"}},"externalId":{"type":"string"},"projectFilter":{"type":"array","items":{"type":"string"}},"authorFilter":{"type":"array","items":{"type":"string"}},"prStatusFilter":{"type":"array","items":{"type":"string"}},"automationFilter":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false},"composerPreferences":{"type":"object","properties":{"lastSelectedRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"additionalProperties":false},"reviewPreferences":{"type":"object","properties":{"fileSortMode":{"type":"string","enum":["tree","path-asc","path-desc","largest","smallest"]},"excludedFilePatterns":{"type":"array","items":{"type":"string"}},"sections":{"type":"object","additionalProperties":{"type":"boolean"}},"hideBotComments":{"type":"boolean"},"layout":{"type":"object","properties":{"focusChatHeight":{"type":"number"},"activeTab":{"type":"string"},"activeViewMode":{"type":"string"},"focusChatOpen":{"type":"boolean"},"focusMode":{"type":"boolean"},"leftDesktopSidebarOpen":{"type":"boolean"},"leftDesktopSidebarWidth":{"type":"number"},"rightDesktopSidebarOpen":{"type":"boolean"},"rightDesktopSidebarWidth":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false},"diffLightTheme":{"type":"string"},"diffDarkTheme":{"type":"string"},"defaultAgent":{"type":"string","pattern":"^[^:]+:[^:]+(?::[^:]+)?$"},"defaultFastMode":{"type":"boolean"},"followUpBehavior":{"type":"string","enum":["queue","steer"]},"customSystemPrompt":{"type":"string","maxLength":4096}},"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"patch":{"operationId":"updateUserSettings","summary":"Update user settings","description":"Configure personal agent/model and project defaults, system instructions, follow-up queue/steer behavior, VM restart, commit signing/attribution, notifications, themes, and review layout. Updates preserve unrelated settings.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update user settings","content":{"application/json":{"schema":{"type":"object","properties":{"autoRestartVm":{"type":"boolean"},"defaultProjectId":{"type":["string","null"]},"defaultSessionVisibilityByWorkspace":{"type":"object","additionalProperties":{"type":"string","enum":["private","public"]}},"gpgKey":{"type":"string"},"includeTemboCommitAttribution":{"type":"boolean"},"openPullRequestsAsBot":{"type":"boolean"},"desktopNotificationsEnabled":{"type":"boolean"},"desktopNotificationPreferences":{"type":"object","properties":{"awaitingApproval":{"type":"boolean"},"pullRequestOpened":{"type":"boolean"},"pullRequestReviewRequested":{"type":"boolean"}},"additionalProperties":false},"hasDesktopApp":{"type":"boolean"},"openLinksInDesktopApp":{"type":"boolean"},"appearancePreferences":{"type":"object","properties":{"appTheme":{"type":"string","enum":["light","dark","system"]},"accentTheme":{"type":"object","properties":{"themeId":{"type":"string"},"customSurface":{"type":["string","null"]},"customAccent":{"type":["string","null"]},"customIntensity":{"type":"number"},"systemLight":{"type":"string"},"systemDark":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"appSidebarPreferences":{"type":"object","properties":{"open":{"type":"boolean"},"sessionOwnerScope":{"type":"string","enum":["mine","team"]},"sessionSortBy":{"type":"string","enum":["createdAt","updatedAt"]},"sessionOrganization":{"type":"string","enum":["list","project"]},"showArchivedSessions":{"type":"boolean"},"showActivity":{"type":"boolean"},"width":{"type":"number"},"rightSidebar":{"type":"object","additionalProperties":{"type":"object","properties":{"open":{"type":"boolean"},"width":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},"diffPreferences":{"type":"object","properties":{"style":{"type":"string","enum":["unified","split"]},"indicators":{"type":"string","enum":["classic","bars","none"]},"overflow":{"type":"string","enum":["scroll","wrap"]},"showLineNumbers":{"type":"boolean"},"expandUnchanged":{"type":"boolean"},"showFileTree":{"type":"boolean"},"fileTreePosition":{"type":"string","enum":["left","right"]},"fileTreeView":{"type":"string","enum":["list","tree"]},"lightTheme":{"type":"string"},"darkTheme":{"type":"string"}},"additionalProperties":false},"dashboardPreferences":{"type":"object","properties":{"taskFilters":{"type":"object","properties":{"statusFilter":{"type":"array","items":{"type":"string"}},"sortBy":{"type":"string","enum":["createdAt","updatedAt"]},"searchQuery":{"type":"string"},"integrationType":{"type":"array","items":{"type":"string"}},"externalId":{"type":"string"},"projectFilter":{"type":"array","items":{"type":"string"}},"authorFilter":{"type":"array","items":{"type":"string"}},"prStatusFilter":{"type":"array","items":{"type":"string"}},"automationFilter":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false},"composerPreferences":{"type":"object","properties":{"lastSelectedRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"additionalProperties":false},"reviewPreferences":{"type":"object","properties":{"fileSortMode":{"type":"string","enum":["tree","path-asc","path-desc","largest","smallest"]},"excludedFilePatterns":{"type":"array","items":{"type":"string"}},"sections":{"type":"object","additionalProperties":{"type":"boolean"}},"hideBotComments":{"type":"boolean"},"layout":{"type":"object","properties":{"focusChatHeight":{"type":"number"},"activeTab":{"type":"string"},"activeViewMode":{"type":"string"},"focusChatOpen":{"type":"boolean"},"focusMode":{"type":"boolean"},"leftDesktopSidebarOpen":{"type":"boolean"},"leftDesktopSidebarWidth":{"type":"number"},"rightDesktopSidebarOpen":{"type":"boolean"},"rightDesktopSidebarWidth":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false},"diffLightTheme":{"type":"string"},"diffDarkTheme":{"type":"string"},"defaultAgent":{"type":"string","pattern":"^[^:]+:[^:]+(?::[^:]+)?$"},"defaultFastMode":{"type":"boolean"},"followUpBehavior":{"type":"string","enum":["queue","steer"]},"customSystemPrompt":{"type":"string","maxLength":4096}},"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"defaultSessionVisibilityByWorkspace":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","enum":["private","public"]},"description":"Default visibility for your new sessions, keyed by workspace ID."},"autoRestartVm":{"type":"boolean","description":"Automatically restart a session VM when needed."},"defaultProjectId":{"type":["string","null"],"minLength":1,"maxLength":255,"description":"Default project environment for new sessions, or null to clear the preference."},"gpgKey":{"type":"string","maxLength":32768,"description":"GPG signing key configuration. This value is returned by retrieveUserSettings."},"includeTemboCommitAttribution":{"type":"boolean","description":"Include Tembo attribution in agent-created commits."},"openPullRequestsAsBot":{"type":"boolean","description":"Open GitHub pull requests as the Tembo bot instead of your personal account."},"desktopNotificationsEnabled":{"type":"boolean","description":"Enable or disable desktop notifications."},"desktopNotificationPreferences":{"type":"object","properties":{"awaitingApproval":{"type":"boolean"},"pullRequestOpened":{"type":"boolean"},"pullRequestReviewRequested":{"type":"boolean"}},"additionalProperties":false,"description":"Notification types to show on the desktop."},"hasDesktopApp":{"type":"boolean","description":"Whether the user has signed in to the Tembo desktop app."},"openLinksInDesktopApp":{"type":"boolean","description":"Open Tembo links from the browser in the desktop app when it is installed."},"appearancePreferences":{"type":"object","properties":{"appTheme":{"type":"string","enum":["light","dark","system"]},"accentTheme":{"type":"object","properties":{"themeId":{"type":"string","maxLength":255},"customSurface":{"type":["string","null"],"maxLength":4096},"customAccent":{"type":["string","null"],"maxLength":4096},"customIntensity":{"type":"number","minimum":0.25,"maximum":2},"systemLight":{"type":"string","maxLength":255},"systemDark":{"type":"string","maxLength":255}},"additionalProperties":false}},"additionalProperties":false,"description":"Theme, accent, and appearance preferences. Nested updates preserve unrelated preferences."},"appSidebarPreferences":{"type":"object","properties":{"open":{"type":"boolean"},"sessionOwnerScope":{"type":"string","enum":["mine","team"]},"sessionSortBy":{"type":"string","enum":["createdAt","updatedAt"]},"sessionOrganization":{"type":"string","enum":["list","project"]},"showArchivedSessions":{"type":"boolean"},"showActivity":{"type":"boolean"},"width":{"type":"number","minimum":0,"maximum":10000},"rightSidebar":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"object","properties":{"open":{"type":"boolean"},"width":{"type":"string","maxLength":255}},"additionalProperties":false}}},"additionalProperties":false,"description":"Application sidebar layout preferences."},"diffPreferences":{"type":"object","properties":{"style":{"type":"string","enum":["unified","split"]},"indicators":{"type":"string","enum":["classic","bars","none"]},"overflow":{"type":"string","enum":["scroll","wrap"]},"showLineNumbers":{"type":"boolean"},"expandUnchanged":{"type":"boolean"},"showFileTree":{"type":"boolean"},"fileTreePosition":{"type":"string","enum":["left","right"]},"fileTreeView":{"type":"string","enum":["list","tree"]},"lightTheme":{"type":"string","maxLength":255},"darkTheme":{"type":"string","maxLength":255}},"additionalProperties":false,"description":"Diff display and comparison preferences."},"dashboardPreferences":{"type":"object","properties":{"taskFilters":{"type":"object","properties":{"statusFilter":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":100},"sortBy":{"type":"string","enum":["createdAt","updatedAt"]},"searchQuery":{"type":"string","maxLength":4096},"integrationType":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":100},"externalId":{"type":"string","maxLength":4096},"projectFilter":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":100},"authorFilter":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":100},"prStatusFilter":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":100},"automationFilter":{"type":"array","items":{"type":"string","maxLength":4096},"maxItems":100}},"additionalProperties":false}},"additionalProperties":false,"description":"Dashboard task-filter preferences."},"composerPreferences":{"type":"object","properties":{"lastSelectedRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":4096},"name":{"type":"string","maxLength":4096},"type":{"type":"string","maxLength":255}},"required":["id"],"additionalProperties":false},"maxItems":100}},"additionalProperties":false,"description":"Message composer preferences, including selected repositories."},"reviewPreferences":{"type":"object","properties":{"fileSortMode":{"type":"string","enum":["tree","path-asc","path-desc","largest","smallest"]},"excludedFilePatterns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":100},"sections":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"boolean"}},"hideBotComments":{"type":"boolean"},"layout":{"type":"object","properties":{"focusChatHeight":{"type":"number","exclusiveMinimum":0,"maximum":10000},"activeTab":{"type":"string","maxLength":255},"activeViewMode":{"type":"string","maxLength":255},"focusChatOpen":{"type":"boolean"},"focusMode":{"type":"boolean"},"leftDesktopSidebarOpen":{"type":"boolean"},"leftDesktopSidebarWidth":{"type":"number","minimum":0,"maximum":10000},"rightDesktopSidebarOpen":{"type":"boolean"},"rightDesktopSidebarWidth":{"type":"number","minimum":0,"maximum":10000}},"additionalProperties":false}},"additionalProperties":false,"description":"Code review file sorting, exclusions, bot comment visibility, and layout preferences."},"diffLightTheme":{"type":"string","maxLength":255,"description":"Diff syntax theme for light mode."},"diffDarkTheme":{"type":"string","maxLength":255,"description":"Diff syntax theme for dark mode."},"defaultAgent":{"type":["string","null"],"pattern":"^[^:]+:[^:]+(?::[^:]+)?$","maxLength":255,"description":"Default coding agent and model key. Null clears the preference."},"defaultFastMode":{"type":"boolean","description":"Enable Fast mode by default for new sessions with supported agents."},"followUpBehavior":{"type":"string","enum":["queue","steer"],"description":"Default follow-up delivery: queue a new turn or steer an active turn."},"customSystemPrompt":{"type":"string","maxLength":4096,"description":"Personal system instructions supplied to agents."}},"additionalProperties":false}}}}}},"/v1/users/{userId}/environment-variables":{"get":{"operationId":"listUserEnvironmentVariables","summary":"List personal environment variables","description":"List your personal environment variables in the current organization. Values are never returned.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List personal environment variables","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","key","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"post":{"operationId":"createUserEnvironmentVariable","summary":"Create a personal environment variable","description":"Store an encrypted environment variable that is injected into every session you start in the current organization.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a personal environment variable","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":255},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","key","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"An environment variable with this key already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":255,"description":"Environment variable name, e.g. GITHUB_TOKEN."},"value":{"type":"string","minLength":1,"maxLength":10000,"description":"Plaintext value to encrypt and store. List operations never return it."}},"required":["key","value"],"additionalProperties":false}}}}}},"/v1/users/{userId}/environment-variables/{environmentVariableId}":{"delete":{"operationId":"deleteUserEnvironmentVariable","summary":"Delete a personal environment variable","description":"Permanently delete a personal environment variable. Sessions started afterwards no longer receive it.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a personal environment variable","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"environmentVariableId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/users/{userId}/subscriptions":{"get":{"operationId":"retrieveUserSubscriptions","summary":"Retrieve user subscriptions","description":"Retrieve connection statuses and available ChatGPT and Claude usage. Provider usage errors are reported without failing the response.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve user subscriptions","content":{"application/json":{"schema":{"type":"object","properties":{"chatgpt":{"type":"object","properties":{"connected":{"type":"boolean"},"usage":{"type":["object","null"],"properties":{"planType":{"type":"string","enum":["free","go","plus","pro","prolite","promax","team","self_serve_business_prolite","self_serve_business_usage_based","business","ent26","enterprise_cbp_automation","enterprise_cbp_usage_based","enterprise","edu","edu_plus","edu_pro","unknown"]},"rateLimits":{"type":"array","items":{"type":"object","properties":{"limitId":{"type":["string","null"]},"limitName":{"type":["string","null"]},"planType":{"type":["string","null"],"enum":["free","go","plus","pro","prolite","promax","team","self_serve_business_prolite","self_serve_business_usage_based","business","ent26","enterprise_cbp_automation","enterprise_cbp_usage_based","enterprise","edu","edu_plus","edu_pro","unknown",null]},"primary":{"type":["object","null"],"properties":{"usedPercent":{"type":"number"},"windowDurationMins":{"type":["integer","null"],"exclusiveMinimum":0},"resetsAt":{"type":["integer","null"],"minimum":0}},"required":["usedPercent","windowDurationMins","resetsAt"],"additionalProperties":false},"secondary":{"type":["object","null"],"properties":{"usedPercent":{"type":"number"},"windowDurationMins":{"type":["integer","null"],"exclusiveMinimum":0},"resetsAt":{"type":["integer","null"],"minimum":0}},"required":["usedPercent","windowDurationMins","resetsAt"],"additionalProperties":false},"credits":{"type":["object","null"],"properties":{"hasCredits":{"type":"boolean"},"unlimited":{"type":"boolean"},"balance":{"type":["string","null"]}},"required":["hasCredits","unlimited","balance"],"additionalProperties":false},"individualLimit":{"type":["object","null"],"properties":{"limit":{"type":"string"},"used":{"type":"string"},"remainingPercent":{"type":"number"},"resetsAt":{"type":"integer","minimum":0}},"required":["limit","used","remainingPercent","resetsAt"],"additionalProperties":false},"spendControlReached":{"type":["boolean","null"]},"rateLimitReachedType":{"type":["string","null"],"enum":["rate_limit_reached","workspace_owner_credits_depleted","workspace_member_credits_depleted","workspace_owner_usage_limit_reached","workspace_member_usage_limit_reached","unknown",null]}},"required":["limitId","limitName","planType","primary","secondary","credits","individualLimit","spendControlReached","rateLimitReachedType"],"additionalProperties":false}},"rateLimitResetCredits":{"type":["object","null"],"properties":{"availableCount":{"type":"integer","minimum":0},"credits":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string"},"resetType":{"type":"string","enum":["codexRateLimits","unknown"]},"status":{"type":"string","enum":["available","redeeming","redeemed","unknown"]},"grantedAt":{"type":"integer","minimum":0},"expiresAt":{"type":["integer","null"],"minimum":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["id","resetType","status","grantedAt","expiresAt","title","description"],"additionalProperties":false}}},"required":["availableCount","credits"],"additionalProperties":false},"tokenUsage":{"type":"object","properties":{"summary":{"type":"object","properties":{"lifetimeTokens":{"type":["integer","null"],"minimum":0},"peakDailyTokens":{"type":["integer","null"],"minimum":0},"longestRunningTurnSec":{"type":["integer","null"],"minimum":0},"currentStreakDays":{"type":["integer","null"],"minimum":0},"longestStreakDays":{"type":["integer","null"],"minimum":0}},"required":["lifetimeTokens","peakDailyTokens","longestRunningTurnSec","currentStreakDays","longestStreakDays"],"additionalProperties":false},"dailyUsageBuckets":{"type":["array","null"],"items":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"tokens":{"type":"integer","minimum":0}},"required":["startDate","tokens"],"additionalProperties":false}}},"required":["summary","dailyUsageBuckets"],"additionalProperties":false},"fetchedAt":{"type":"string","format":"date-time"}},"required":["planType","rateLimits","rateLimitResetCredits","tokenUsage","fetchedAt"],"additionalProperties":false},"usageError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["reconnectRequired","rateLimited","unavailable"]},"message":{"type":"string"},"retryAfter":{"type":["string","null"]}},"required":["code","message","retryAfter"],"additionalProperties":false}},"required":["connected","usage","usageError"],"additionalProperties":false},"claude":{"type":"object","properties":{"connected":{"type":"boolean"},"reconnectRequired":{"type":"boolean"},"usage":{"type":["object","null"],"properties":{"rateLimits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","const":"five_hour"},"label":{"type":"string","const":"5-hour limit"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day"},"label":{"type":"string","const":"Weekly limit"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_oauth_apps"},"label":{"type":"string","const":"Weekly limit · OAuth apps"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_opus"},"label":{"type":"string","const":"Weekly limit · Opus"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_sonnet"},"label":{"type":"string","const":"Weekly limit · Sonnet"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"seven_day_cowork"},"label":{"type":"string","const":"Weekly limit · Cowork"},"detail":{"type":"null"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false}]}},"rateLimitResetCredits":{"type":["object","null"],"properties":{"availableCount":{"type":"integer","minimum":0}},"required":["availableCount"],"additionalProperties":false}},"required":["rateLimits","rateLimitResetCredits"],"additionalProperties":false},"usageError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["reconnectRequired","rateLimited","unavailable"]},"message":{"type":"string"},"retryAfter":{"type":["string","null"]}},"required":["code","message","retryAfter"],"additionalProperties":false}},"required":["connected","reconnectRequired","usage","usageError"],"additionalProperties":false},"supergrok":{"type":"object","properties":{"connected":{"type":"boolean"},"usage":{"type":["object","null"],"properties":{"rateLimits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","const":"weekly"},"label":{"type":"string","const":"Weekly limit"},"detail":{"type":["string","null"]},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"monthly"},"label":{"type":"string","const":"Monthly limit"},"detail":{"type":["string","null"]},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"credits"},"label":{"type":"string","const":"Credit usage"},"detail":{"type":["string","null"]},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetsAt":{"type":["number","null"],"minimum":0}},"required":["key","label","detail","remainingPercent","resetsAt"],"additionalProperties":false}]}}},"required":["rateLimits"],"additionalProperties":false},"usageError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["reconnectRequired","rateLimited","unavailable"]},"message":{"type":"string"},"retryAfter":{"type":["string","null"]}},"required":["code","message","retryAfter"],"additionalProperties":false}},"required":["connected","usage","usageError"],"additionalProperties":false}},"required":["chatgpt","claude","supergrok"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or connected account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The subscription provider is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/users/{userId}/profile-picture":{"get":{"operationId":"retrieveUserProfilePicture","summary":"Retrieve a user profile picture","description":"Redirect to a user's profile picture. Signed URLs are valid for one hour.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"302":{"description":"Redirect to the user profile picture","headers":{"Location":{"description":"Signed or external profile picture URL","schema":{"type":"string","format":"uri"}}}},"400":{"description":"Invalid request or unsupported image type, size, or deployment mode.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or profile picture not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Image storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"put":{"operationId":"updateUserProfilePicture","summary":"Update your profile picture","description":"Upload a JPEG, PNG, GIF, or WebP profile picture up to 5 MB.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update your profile picture","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","format":"uri"}},"required":["userId","url"],"additionalProperties":false}}}},"400":{"description":"Invalid request or unsupported image type, size, or deployment mode.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or profile picture not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 5 MB","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Image storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"],"additionalProperties":false}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"delete":{"operationId":"deleteUserProfilePicture","summary":"Delete your profile picture","description":"Delete your profile picture. This succeeds if no picture exists.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete your profile picture","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":255},"deleted":{"type":"boolean","const":true}},"required":["userId","deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid request or unsupported image type, size, or deployment mode.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"User or profile picture not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"User operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Image storage is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/sessions/sources":{"get":{"operationId":"listSessionSources","summary":"List session sources","description":"List session sources in the authenticated organization.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List session sources","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"lastScannedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"integration":{"type":["object","null"],"properties":{"type":{"type":"string"}},"required":["type"]},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}}},"required":["createdAt","enabledAt","externalId","externalUrl","id","lastScannedAt","lastSeenAt","name","type","updatedAt","integration","repositories"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"},"totalCount":{"type":"integer","minimum":0}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"enabled","schema":{"type":"boolean"},"description":"Filter by whether the source is enabled."},{"in":"query","name":"includeTotal","schema":{"type":"boolean","default":false},"description":"Include totalCount for matching sources."},{"in":"query","name":"integrationId","schema":{"type":"string","format":"uuid"},"description":"Filter sources belonging to this integration."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Search session source names or types."},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"},"description":"Find the source associated with an accessible session."},{"in":"query","name":"types","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter source types, supplied as a comma-separated list."}]}},"/v1/sessions/sources/{sourceId}":{"get":{"operationId":"retrieveSessionSource","summary":"Retrieve a session source","description":"Retrieve one session source.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a session source","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"lastScannedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"integration":{"type":["object","null"],"properties":{"type":{"type":"string"}},"required":["type"]},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}}},"required":["createdAt","enabledAt","externalId","externalUrl","id","lastScannedAt","lastSeenAt","name","type","updatedAt","integration","repositories"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sourceId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/sessions":{"get":{"operationId":"listSessions","summary":"List sessions","description":"List and search sessions, including active or archived sessions, with repository, project, creator, and source filters and cursor pagination.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List sessions","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"agent":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"level":{"type":"integer"},"projectId":{"type":["string","null"]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"agent":{"type":["string","null"]},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string"}},"required":["id","provider"],"additionalProperties":false},"id":{"type":"string","format":"uuid"},"isDraft":{"type":"boolean"},"status":{"type":"string","enum":["open","merged","closed"]},"url":{"type":"string","format":"uri"}},"required":["agent","codeRepository","id","isDraft","status","url"],"additionalProperties":false}},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"]}},"required":["id","pullRequests","type"],"additionalProperties":false}},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder the authenticated user filed this session in."},"isPinned":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}}},"required":["id","name","type","repositories"],"additionalProperties":false},"sourcePullRequest":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"}},"required":["id","url","title","status","isDraft"],"additionalProperties":false},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false}},"required":["agent","agentId","createdAt","externalId","id","kind","lastQueuedAt","lastSeenAt","level","projectId","title","updatedAt","visibility","artifacts","diffSummary","folderId","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"totalCount":{"type":"integer","minimum":0}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"agentId","schema":{"type":"string","format":"uuid"},"description":"Filter sessions created by this automation agent."},{"in":"query","name":"createdBy","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by creator IDs, supplied as a comma-separated list."},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"},"description":"Only sessions created after this ISO 8601 timestamp."},{"in":"query","name":"cursor","schema":{"type":"string","maxLength":500},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"excludePinned","schema":{"type":"boolean"},"description":"Exclude sessions pinned by the authenticated user."},{"in":"query","name":"externalIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by external source IDs, supplied as a comma-separated list."},{"in":"query","name":"folderId","schema":{"type":"string","format":"uuid"},"description":"Only sessions in this sidebar folder of the authenticated user. Takes precedence over inFolder."},{"in":"query","name":"hasProject","schema":{"type":"boolean"},"description":"Filter by whether a session has an assigned project."},{"in":"query","name":"includeArchived","schema":{"type":"boolean","default":true},"description":"Include archived sessions in the all-state view. Defaults to true; state=archived explicitly selects archived sessions."},{"in":"query","name":"includeTotal","schema":{"type":"boolean","default":false},"description":"Include totalCount. Not supported with state=active."},{"in":"query","name":"inFolder","schema":{"type":"boolean"},"description":"Filter by whether a session is in one of the authenticated user's sidebar folders."},{"in":"query","name":"parentSessionId","schema":{"type":"string","format":"uuid"},"description":"Filter sessions created by this session."},{"in":"query","name":"participant","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by participant IDs, supplied as a comma-separated list."},{"in":"query","name":"pendingReviewerKeys","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by pending reviewer keys, supplied as a comma-separated list."},{"in":"query","name":"projectIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by project IDs, supplied as a comma-separated list."},{"in":"query","name":"pullRequestStatuses","schema":{"type":"array","items":{"type":"string","enum":["open","merged","closed"]},"default":[]},"description":"Filter by linked pull request statuses: open, merged, or closed, supplied as a comma-separated list."},{"in":"query","name":"repositoryIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by repository IDs, supplied as a comma-separated list."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Search session titles, task prompts, kinds, and source names or types."},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["lastQueuedAt","createdAt","updatedAt"],"default":"lastQueuedAt"},"description":"Timestamp used to sort sessions, newest first."},{"in":"query","name":"sourceIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by session source IDs, supplied as a comma-separated list."},{"in":"query","name":"sourceTypes","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by session source types, supplied as a comma-separated list."},{"in":"query","name":"state","schema":{"type":"string","enum":["all","active","archived"],"default":"all"},"description":"Select all sessions, currently active work, or archived sessions. Use archived to find sessions to restore."}]},"post":{"operationId":"createSession","summary":"Create a session","description":"Create a session for a task. Provide the initial prompt in description and optionally configure its repositories, agent, Build (normal) or Plan (planning) mode, and private or workspace visibility.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a session","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid"},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"baseBranch":{"type":["string","null"]},"branchName":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"level":{"type":"integer"},"mode":{"type":"string","enum":["normal","planning"],"default":"normal"},"parentSessionId":{"type":["string","null"],"format":"uuid","description":"The session whose agent created this session."},"projectId":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sessionType":{"type":"string","enum":["Chat","Terminal"],"default":"Chat"},"targetBranch":{"type":["string","null"]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"},"sourceBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"agent":{"type":["string","null"]},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"data":{"type":"string","maxLength":1000000}}},"updatedAt":{"type":"string","format":"date-time"},"baseBranch":{"type":["string","null"],"maxLength":500},"headSha":{"type":["string","null"],"maxLength":200},"author":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"login":{"type":["string","null"],"maxLength":500}},"required":["avatarUrl","login"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","baseBranch","headSha","author","codeRepository"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequests"],"additionalProperties":false}},"automaticSizing":{"type":"boolean","description":"Whether the session VM is sized automatically."},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder the authenticated user filed this session in."},"htmlUrl":{"type":"string","format":"uri"},"isPinned":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}}},"required":["id","name","type","repositories"],"additionalProperties":false},"sourcePullRequest":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"}},"required":["id","url","title","status","isDraft"],"additionalProperties":false},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false}},"required":["agent","agentId","artifactType","baseBranch","branchName","createdAt","externalId","externalUrl","id","kind","lastQueuedAt","lastSeenAt","level","mode","parentSessionId","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","automaticSizing","description","diffSummary","folderId","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","minLength":1,"maxLength":500,"description":"Agent and model key to run, such as claudeCode:claude-fable-5-1. Omit to use the default."},"baseBranch":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Git branch to start work from. Omit or use null for the repository default."},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":100,"default":[],"description":"MCP server or connection IDs to enable for the session."},"projectId":{"type":["string","null"],"description":"Project environment to use for the workspace. Omit or use null for the default."},"sandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"],"description":"VM size for the session workspace."},"targetBranch":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Default target branch for pull requests created by the session."},"visibility":{"type":"string","enum":["private","public"],"description":"Session visibility: private or visible to workspace (public)."},"agentOptions":{"$ref":"#/components/schemas/AgentOptions","description":"Agent-specific runtime options, such as reasoning effort."},"branchName":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Git branch for this session. Omit or use null to generate a branch name."},"codeRepositoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Repository IDs to make available in the session workspace."},"description":{"type":"string","minLength":1,"maxLength":1000000,"description":"Initial task or prompt for the session."},"id":{"type":"string","format":"uuid","description":"Optional caller-supplied session UUID. Omit to generate one."},"richContent":{"$ref":"#/components/schemas/SessionTipTapDocument","description":"Optional rich-text representation of the initial task. Provide description separately."},"pullRequestId":{"type":"string","format":"uuid","description":"Pull request to associate with the session. Requires richContent."},"queueRightAway":{"type":"boolean","description":"Whether to queue the initial task immediately instead of only creating the session."},"automaticSizing":{"type":"boolean","description":"Size the VM automatically. Only for sessions created without a project (projectId \"tembo\")."},"sessionMode":{"type":"string","enum":["chat","terminal"],"description":"Whether to create a chat session or a terminal session."},"startupAgent":{"type":"string","enum":["claudeCode","codex","opencode","pi","amp","cursor"],"description":"Coding agent to start in a terminal session."}},"required":["description"],"additionalProperties":false,"example":{"description":"Fix the authentication bug in the login component","projectId":"your-project-id","agent":"claudeCode:claude-fable-5-1","codeRepositoryIds":["123e4567-e89b-12d3-a456-426614174000"],"baseBranch":"main","targetBranch":"main","visibility":"private","mcpServers":[]}}}}}}},"/v1/sessions/{sessionId}/fork":{"post":{"operationId":"forkSession","summary":"Fork a session","description":"Create an independent session from a fresh workspace snapshot, or the latest saved snapshot when stopped, without replaying messages or adding context. The fork returns right away and its messages queue until its workspace finishes booting.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Fork a session","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid"},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"baseBranch":{"type":["string","null"]},"branchName":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"level":{"type":"integer"},"mode":{"type":"string","enum":["normal","planning"],"default":"normal"},"parentSessionId":{"type":["string","null"],"format":"uuid","description":"The session whose agent created this session."},"projectId":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sessionType":{"type":"string","enum":["Chat","Terminal"],"default":"Chat"},"targetBranch":{"type":["string","null"]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"},"sourceBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"agent":{"type":["string","null"]},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"data":{"type":"string","maxLength":1000000}}},"updatedAt":{"type":"string","format":"date-time"},"baseBranch":{"type":["string","null"],"maxLength":500},"headSha":{"type":["string","null"],"maxLength":200},"author":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"login":{"type":["string","null"],"maxLength":500}},"required":["avatarUrl","login"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","baseBranch","headSha","author","codeRepository"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequests"],"additionalProperties":false}},"automaticSizing":{"type":"boolean","description":"Whether the session VM is sized automatically."},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder the authenticated user filed this session in."},"htmlUrl":{"type":"string","format":"uri"},"isPinned":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}}},"required":["id","name","type","repositories"],"additionalProperties":false},"sourcePullRequest":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"}},"required":["id","url","title","status","isDraft"],"additionalProperties":false},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false}},"required":["agent","agentId","artifactType","baseBranch","branchName","createdAt","externalId","externalUrl","id","kind","lastQueuedAt","lastSeenAt","level","mode","parentSessionId","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","automaticSizing","description","diffSummary","folderId","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":1000000,"description":"Optional first task for the independent fork. Existing messages are not replayed."},"title":{"type":"string","minLength":1,"maxLength":1000,"description":"Display title for the forked session."},"queueRightAway":{"type":"boolean","default":true,"description":"Start the supplied prompt immediately. Without a prompt, the fork waits for a new message."}},"additionalProperties":false}}}}}},"/v1/sessions/import":{"post":{"operationId":"importSession","summary":"Import a chat as a session","description":"Create a private session from a chat in another coding agent app, such as Conductor, with its messages and agent activity. No agent run starts until a follow-up is sent, which receives the imported history as context. Importing the same chat again returns the existing session.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Import a chat as a session","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid"},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"baseBranch":{"type":["string","null"]},"branchName":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"level":{"type":"integer"},"mode":{"type":"string","enum":["normal","planning"],"default":"normal"},"parentSessionId":{"type":["string","null"],"format":"uuid","description":"The session whose agent created this session."},"projectId":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sessionType":{"type":"string","enum":["Chat","Terminal"],"default":"Chat"},"targetBranch":{"type":["string","null"]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"},"sourceBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"agent":{"type":["string","null"]},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"data":{"type":"string","maxLength":1000000}}},"updatedAt":{"type":"string","format":"date-time"},"baseBranch":{"type":["string","null"],"maxLength":500},"headSha":{"type":["string","null"],"maxLength":200},"author":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"login":{"type":["string","null"],"maxLength":500}},"required":["avatarUrl","login"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","baseBranch","headSha","author","codeRepository"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequests"],"additionalProperties":false}},"automaticSizing":{"type":"boolean","description":"Whether the session VM is sized automatically."},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder the authenticated user filed this session in."},"htmlUrl":{"type":"string","format":"uri"},"isPinned":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}}},"required":["id","name","type","repositories"],"additionalProperties":false},"sourcePullRequest":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"}},"required":["id","url","title","status","isDraft"],"additionalProperties":false},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false}},"required":["agent","agentId","artifactType","baseBranch","branchName","createdAt","externalId","externalUrl","id","kind","lastQueuedAt","lastSeenAt","level","mode","parentSessionId","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","automaticSizing","description","diffSummary","folderId","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["conductor","chatgpt","claude","devin"],"description":"Application the chat is imported from."},"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Chat ID in the source application. Importing the same chat again returns the existing session."},"title":{"type":"string","minLength":1,"maxLength":500,"description":"Title of the chat."},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["user","assistant","summary"],"description":"Who wrote the row. Conductor assistant rows hold Claude Agent SDK JSON; local ChatGPT/Codex, Claude Code, and Devin rows hold native message JSON for API conversion."},"content":{"type":"string","maxLength":1000000},"sentAt":{"type":"string","format":"date-time"}},"required":["id","role","content","sentAt"],"additionalProperties":false},"minItems":1,"maxItems":10000,"description":"Chat messages in the order they were sent."}},"required":["source","externalId","title","messages"],"additionalProperties":false}}}}}},"/v1/sessions/{sessionId}":{"get":{"operationId":"retrieveSession","summary":"Retrieve a session","description":"Retrieve a session you have permission to access.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a session","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid"},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"baseBranch":{"type":["string","null"]},"branchName":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"level":{"type":"integer"},"mode":{"type":"string","enum":["normal","planning"],"default":"normal"},"parentSessionId":{"type":["string","null"],"format":"uuid","description":"The session whose agent created this session."},"projectId":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sessionType":{"type":"string","enum":["Chat","Terminal"],"default":"Chat"},"targetBranch":{"type":["string","null"]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"},"sourceBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"agent":{"type":["string","null"]},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"data":{"type":"string","maxLength":1000000}}},"updatedAt":{"type":"string","format":"date-time"},"baseBranch":{"type":["string","null"],"maxLength":500},"headSha":{"type":["string","null"],"maxLength":200},"author":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"login":{"type":["string","null"],"maxLength":500}},"required":["avatarUrl","login"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","baseBranch","headSha","author","codeRepository"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequests"],"additionalProperties":false}},"automaticSizing":{"type":"boolean","description":"Whether the session VM is sized automatically."},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder the authenticated user filed this session in."},"htmlUrl":{"type":"string","format":"uri"},"isPinned":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}}},"required":["id","name","type","repositories"],"additionalProperties":false},"sourcePullRequest":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"}},"required":["id","url","title","status","isDraft"],"additionalProperties":false},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false}},"required":["agent","agentId","artifactType","baseBranch","branchName","createdAt","externalId","externalUrl","id","kind","lastQueuedAt","lastSeenAt","level","mode","parentSessionId","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","automaticSizing","description","diffSummary","folderId","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateSession","summary":"Update a session","description":"Update a session: archive or restore it, set priority, rename it, change agent/model, switch between Build (normal) and Plan (planning) modes, configure its workspace and branches, or change visibility between private and visible to workspace (public). Archiving uses level=0; restoring archived sessions uses level=1 and does not restart work. Use pins to pin or unpin sessions. Submit memoryMb alone to request asynchronous memory growth for a running adaptive sandbox within project limits; sandbox metrics report progress.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a session","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid"},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"baseBranch":{"type":["string","null"]},"branchName":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"level":{"type":"integer"},"mode":{"type":"string","enum":["normal","planning"],"default":"normal"},"parentSessionId":{"type":["string","null"],"format":"uuid","description":"The session whose agent created this session."},"projectId":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sessionType":{"type":"string","enum":["Chat","Terminal"],"default":"Chat"},"targetBranch":{"type":["string","null"]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"},"sourceBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"agent":{"type":["string","null"]},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"data":{"type":"string","maxLength":1000000}}},"updatedAt":{"type":"string","format":"date-time"},"baseBranch":{"type":["string","null"],"maxLength":500},"headSha":{"type":["string","null"],"maxLength":200},"author":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"login":{"type":["string","null"],"maxLength":500}},"required":["avatarUrl","login"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","owner","baseBranch","provider"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","baseBranch","headSha","author","codeRepository"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequests"],"additionalProperties":false}},"automaticSizing":{"type":"boolean","description":"Whether the session VM is sized automatically."},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder the authenticated user filed this session in."},"htmlUrl":{"type":"string","format":"uri"},"isPinned":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}}},"required":["id","name","type","repositories"],"additionalProperties":false},"sourcePullRequest":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"]},"isDraft":{"type":"boolean"}},"required":["id","url","title","status","isDraft"],"additionalProperties":false},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false}},"required":["agent","agentId","artifactType","baseBranch","branchName","createdAt","externalId","externalUrl","id","kind","lastQueuedAt","lastSeenAt","level","mode","parentSessionId","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","automaticSizing","description","diffSummary","folderId","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memoryMb":{"type":"integer","multipleOf":1024,"minimum":1024,"maximum":131072,"description":"Request in-place memory growth for a running adaptive sandbox, within project limits. Submit separately from other session changes. Returns the session while the resize runs asynchronously; sandbox metrics report its progress."},"agent":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Change the agent and model key. Null clears the session override."},"agentOptions":{"$ref":"#/components/schemas/AgentOptions","description":"Change agent-specific runtime options, such as reasoning effort."},"baseBranch":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Change the starting Git branch. Null clears the session override."},"branchName":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Change the session Git branch name. Null clears the stored name."},"description":{"type":"string","minLength":1,"maxLength":1000000,"description":"Replace the initial task prompt; only the session creator can change it. Use createMessage to send a follow-up task."},"richContent":{"oneOf":[{"$ref":"#/components/schemas/SessionTipTapDocument"},{"type":"null"}],"description":"Replace the initial prompt rich-text document, or null to clear it. Only the session creator can change it."},"level":{"type":"integer","minimum":0,"maximum":100,"description":"Archive or restore the session and set its priority: 0 archives and stops its VM; 1 restores without restarting work; 2–100 also keep it unarchived and set its priority level. Omit to preserve the current level."},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":100,"description":"Replace the enabled MCP server or connection IDs. An empty array clears the selection."},"mode":{"type":"string","enum":["normal","planning"],"description":"Switch between Build (normal) and Plan (planning) modes."},"projectId":{"type":["string","null"],"description":"Change the project environment used for the workspace. Null clears the session override."},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","medium","large","xl","xxl","ultra",null],"description":"Change the workspace VM size. Null clears the session override."},"targetBranch":{"type":["string","null"],"minLength":1,"maxLength":500,"description":"Change the default pull request target branch. Null clears the session override."},"title":{"type":"string","minLength":1,"maxLength":1000,"description":"Rename the session."},"visibility":{"type":"string","enum":["private","public"],"description":"Change session visibility: private or visible to workspace (public). Only the session creator can change it."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteSession","summary":"Delete a session","description":"Archive a session and stop its VM without permanently deleting it. Equivalent to updateSession with level=0; restore with updateSession and level=1.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a session","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/sessions/{sessionId}/inputs":{"get":{"operationId":"listSessionInputs","summary":"List session inputs","description":"List pending questions for the active session agent.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List session inputs","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"toolCallId":{"type":"string"},"status":{"type":"string","enum":["pending","answered"]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"header":{"type":"string"},"question":{"type":"string"},"isOther":{"type":"boolean"},"isSecret":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"}},"required":["label","description"],"additionalProperties":false}}},"required":["id","header","question","isOther","isSecret","options"],"additionalProperties":false},"minItems":1}},"required":["id","toolCallId","status","questions"],"additionalProperties":false}},"nextCursor":{"type":"null"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/sessions/{sessionId}/inputs/{inputId}":{"patch":{"operationId":"updateSessionInput","summary":"Update a session input","description":"Answer a pending session question.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a session input","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"toolCallId":{"type":"string"},"status":{"type":"string","enum":["pending","answered"]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"header":{"type":"string"},"question":{"type":"string"},"isOther":{"type":"boolean"},"isSecret":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"}},"required":["label","description"],"additionalProperties":false}}},"required":["id","header","question","isOther","isSecret","options"],"additionalProperties":false},"minItems":1}},"required":["id","toolCallId","status","questions"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"inputId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Answers keyed by question ID. Send an empty object to skip the questions."}},"required":["answers"],"additionalProperties":false}}}}}},"/v1/sessions/{sessionId}/queue":{"put":{"operationId":"updateSessionQueue","summary":"Update a session queue","description":"Replace the order of messages waiting in a session queue.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a session queue","content":{"application/json":{"schema":{"type":"object","properties":{"messageIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["messageIds"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"messageIds":{"type":"array","items":{"type":"string","format":"uuid"}},"error":{"type":"string"}},"required":["messageIds","error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500}},"required":["messageIds"],"additionalProperties":false}}}}}},"/v1/sessions/{sessionId}/stop":{"post":{"operationId":"stopSession","summary":"Stop a session","description":"Interrupt active session work without archiving it. Continue with the next queued message, or set cancelQueued=true to cancel pending messages too.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Stop a session","content":{"application/json":{"schema":{"type":"object","properties":{"cancelledSessions":{"type":"integer","minimum":0},"cancelledJobs":{"type":"integer","minimum":0},"stoppedRuntimeSessions":{"type":"integer","minimum":0},"interruptedRuntimeTurns":{"type":"integer","minimum":0},"cancelledRuntimeTurns":{"type":"integer","minimum":0},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false,"description":"Canonical session state after stopping and reconciling queued work."}},"required":["cancelledSessions","cancelledJobs","stoppedRuntimeSessions","interruptedRuntimeTurns","cancelledRuntimeTurns"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cancelQueued","schema":{"type":"boolean"},"description":"Also cancel pending queued messages instead of continuing with the next queued message. Does not archive the session."}]}},"/v1/sessions/{sessionId}/commands":{"get":{"operationId":"listSessionCommands","summary":"List session commands","description":"List slash commands available to the session runtime.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List session commands","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"command":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"},"source":{"type":"string","enum":["builtin","project","mcp","skill","unknown"],"default":"unknown"}},"required":["name","command","source"],"additionalProperties":false}},"nextCursor":{"type":"null"},"cached":{"type":"boolean"}},"required":["items","nextCursor","cached"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/sessions/{sessionId}/events":{"get":{"operationId":"listSessionEvents","summary":"List session events","description":"List recorded session stream events with cursor pagination.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List session events","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"eventType":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"messageId":{"type":["string","null"],"format":"uuid"},"provider":{"type":"string","enum":["anthropic","openai","openai_responses","openai_completions","tembo"]},"sessionId":{"type":"string","format":"uuid"},"eventData":{"$ref":"#/components/schemas/SessionEventData"}},"required":["createdAt","eventType","id","messageId","provider","sessionId","eventData"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","exclusiveMinimum":0}]},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"messageId","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"null"}]},"description":"Filter by message ID, or \"null\" for session-level events."},{"in":"query","name":"after","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"description":"Only return events recorded after this event ID."}]}},"/v1/sessions/{sessionId}/diffs":{"get":{"operationId":"listSessionDiffs","summary":"List session diffs","description":"List recorded session diff metadata with cursor pagination.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List session diffs","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"additions":{"type":"integer"},"baselineSha":{"type":["string","null"]},"branch":{"type":["string","null"]},"capturedAt":{"type":"string","format":"date-time"},"changedFiles":{"type":"integer"},"codeRepositoryId":{"type":["string","null"],"format":"uuid"},"deletions":{"type":"integer"},"hasChanges":{"type":"boolean"},"headSha":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"remoteKey":{"type":["string","null"]},"root":{"type":"string"},"sessionId":{"type":"string","format":"uuid"},"untrackedFiles":{"type":"integer"}},"required":["additions","baselineSha","branch","capturedAt","changedFiles","codeRepositoryId","deletions","hasChanges","headSha","id","remoteKey","root","sessionId","untrackedFiles"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"hasChanges","schema":{"type":"boolean"},"description":"Filter by whether a recorded diff contains changes."}]}},"/v1/sessions/{sessionId}/diffs/{diffId}":{"get":{"operationId":"retrieveSessionDiff","summary":"Retrieve a session diff","description":"Retrieve one recorded session diff and its content.","tags":["Sessions"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a session diff","content":{"application/json":{"schema":{"type":"object","properties":{"additions":{"type":"integer"},"baselineSha":{"type":["string","null"]},"branch":{"type":["string","null"]},"capturedAt":{"type":"string","format":"date-time"},"changedFiles":{"type":"integer"},"codeRepositoryId":{"type":["string","null"],"format":"uuid"},"deletions":{"type":"integer"},"hasChanges":{"type":"boolean"},"headSha":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"remoteKey":{"type":["string","null"]},"root":{"type":"string"},"sessionId":{"type":"string","format":"uuid"},"untrackedFiles":{"type":"integer"},"data":{"type":"string"}},"required":["additions","baselineSha","branch","capturedAt","changedFiles","codeRepositoryId","deletions","hasChanges","headSha","id","remoteKey","root","sessionId","untrackedFiles","data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The session is private","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Session resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Session operation conflicts with existing data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Session operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Session runtime or provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"diffId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/pins":{"get":{"operationId":"listPins","summary":"List pins","description":"List your pinned resources in pin order.","tags":["Pins"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List pins","content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"session"},"resource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"externalId":{"type":["string","null"]},"agentId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"type":["string","null"]},"projectId":{"type":["string","null"]},"level":{"type":"integer"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"vm":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["Initializing","Running","Warm","Stopping","Idle","Terminated"],"default":"Running"}},"required":["id","status"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"sessionSourceCodeRepositories":{"type":"array","items":{"type":"object","properties":{"codeRepository":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"integration":{"type":"object","properties":{"type":{"type":"string","enum":["github","gitlab","bitbucket"]}},"required":["type"],"additionalProperties":false}},"required":["id","name","integration"],"additionalProperties":false}},"required":["codeRepository"],"additionalProperties":false}}},"required":["type","name","sessionSourceCodeRepositories"],"additionalProperties":false},"pullRequests":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["open","merged","closed"],"default":"open"},"isDraft":{"type":"boolean"},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"number"},"deletions":{"type":"number"}},"required":["additions","deletions"],"additionalProperties":false}},"required":["status","isDraft","diffSummary"],"additionalProperties":false}},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"number"},"deletions":{"type":"number"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder you filed this session in."},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false},"isUnread":{"type":"boolean","description":"Whether the latest turn finished after the caller last viewed the session."}},"required":["id","title","kind","externalId","agentId","createdAt","updatedAt","lastQueuedAt","createdBy","projectId","level","visibility","vm","sessionSource","pullRequests","diffSummary","folderId","state"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pull_request"},"resource":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"],"default":"open"},"isDraft":{"type":"boolean"},"author":{"type":["object","null"],"properties":{"login":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["login","avatarUrl"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"name":{"type":"string"},"owner":{"type":["string","null"]},"integration":{"type":"object","properties":{"type":{"type":"string","enum":["github","gitlab","bitbucket"]}},"required":["type"],"additionalProperties":false}},"required":["name","owner","integration"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","author","codeRepository"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"resource":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"folder"},"resource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","color"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false}]},"description":"Accessible pinned resources in pin order."},"nextCursor":{"type":["string","null"],"pattern":"^(session|pull_request|project|folder):[0-9a-f-]{36}$","description":"Cursor for the next page, even when resources is empty; null at the end."}},"required":["resources","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Pin operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^(session|pull_request|project|folder):[0-9a-f-]{36}$"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of pins returned per page."}]},"post":{"operationId":"createPin","summary":"Create a pin","description":"Pin a session, pull request, or project you have permission to access, or one of your folders.","tags":["Pins"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a pin","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"session"},"resource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"externalId":{"type":["string","null"]},"agentId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastQueuedAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"type":["string","null"]},"projectId":{"type":["string","null"]},"level":{"type":"integer"},"visibility":{"type":"string","enum":["public","private"],"default":"public"},"vm":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["Initializing","Running","Warm","Stopping","Idle","Terminated"],"default":"Running"}},"required":["id","status"],"additionalProperties":false},"sessionSource":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"sessionSourceCodeRepositories":{"type":"array","items":{"type":"object","properties":{"codeRepository":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"integration":{"type":"object","properties":{"type":{"type":"string","enum":["github","gitlab","bitbucket"]}},"required":["type"],"additionalProperties":false}},"required":["id","name","integration"],"additionalProperties":false}},"required":["codeRepository"],"additionalProperties":false}}},"required":["type","name","sessionSourceCodeRepositories"],"additionalProperties":false},"pullRequests":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["open","merged","closed"],"default":"open"},"isDraft":{"type":"boolean"},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"number"},"deletions":{"type":"number"}},"required":["additions","deletions"],"additionalProperties":false}},"required":["status","isDraft","diffSummary"],"additionalProperties":false}},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"number"},"deletions":{"type":"number"}},"required":["additions","deletions"],"additionalProperties":false},"folderId":{"type":["string","null"],"format":"uuid","description":"Sidebar folder you filed this session in."},"state":{"type":"object","properties":{"current":{"type":"string","enum":["inProgress","queued","completed","failed","cancelled"]},"isQueued":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isCompleted":{"type":"boolean"},"isFailed":{"type":"boolean"},"inProgress":{"type":"boolean"}},"required":["isQueued","isCancelled","isCompleted","isFailed","inProgress"],"additionalProperties":false},"isUnread":{"type":"boolean","description":"Whether the latest turn finished after the caller last viewed the session."}},"required":["id","title","kind","externalId","agentId","createdAt","updatedAt","lastQueuedAt","createdBy","projectId","level","visibility","vm","sessionSource","pullRequests","diffSummary","folderId","state"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pull_request"},"resource":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"],"default":"open"},"isDraft":{"type":"boolean"},"author":{"type":["object","null"],"properties":{"login":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["login","avatarUrl"],"additionalProperties":false},"codeRepository":{"type":["object","null"],"properties":{"name":{"type":"string"},"owner":{"type":["string","null"]},"integration":{"type":"object","properties":{"type":{"type":"string","enum":["github","gitlab","bitbucket"]}},"required":["type"],"additionalProperties":false}},"required":["name","owner","integration"],"additionalProperties":false}},"required":["id","url","title","status","isDraft","author","codeRepository"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"resource":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","icon","color"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"folder"},"resource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]}},"required":["id","name","color"],"additionalProperties":false}},"required":["type","resource"],"additionalProperties":false}]}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Pin operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["session","pull_request","project","folder"],"description":"Kind of resource to pin or unpin: session, pull_request, project, or folder."},"id":{"type":"string","format":"uuid","description":"ID of the session, pull request, project, or folder, not a separate pin ID."},"placement":{"type":"object","properties":{"target":{"type":"object","properties":{"type":{"type":"string","enum":["session","pull_request","project","folder"],"description":"Kind of resource to pin or unpin: session, pull_request, project, or folder."},"id":{"type":"string","format":"uuid","description":"ID of the session, pull request, project, or folder, not a separate pin ID."}},"required":["type","id"],"additionalProperties":false,"description":"Existing pin to place this pin next to."},"position":{"type":"string","enum":["before","after"],"description":"Whether to place this pin before or after the target."}},"required":["target","position"],"additionalProperties":false,"description":"Position of a new pin relative to another pin. Omit to add it first. Ignored if the resource is already pinned; use updatePin to reorder."}},"required":["type","id"],"additionalProperties":false}}}}}},"/v1/pins/{resourceType}/{resourceId}":{"patch":{"operationId":"updatePin","summary":"Update a pin","description":"Reorder a pinned session, pull request, project, or folder before or after another pin for the authenticated user. Use createPin to pin a resource and deletePin to unpin it.","tags":["Pins"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a pin","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"boolean"}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Pin operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"resourceType","schema":{"type":"string","enum":["session","pull_request","project","folder"]},"required":true,"description":"Kind of resource to pin or unpin: session, pull_request, project, or folder."},{"in":"path","name":"resourceId","schema":{"type":"string","format":"uuid"},"required":true,"description":"ID of the pinned session, pull request, project, or folder, not a separate pin ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"placement":{"type":"object","properties":{"target":{"type":"object","properties":{"type":{"type":"string","enum":["session","pull_request","project","folder"],"description":"Kind of resource to pin or unpin: session, pull_request, project, or folder."},"id":{"type":"string","format":"uuid","description":"ID of the session, pull request, project, or folder, not a separate pin ID."}},"required":["type","id"],"additionalProperties":false,"description":"Existing pin to place this pin next to."},"position":{"type":"string","enum":["before","after"],"description":"Whether to place this pin before or after the target."}},"required":["target","position"],"additionalProperties":false,"description":"Reorder an existing pin before or after another pin. Use createPin to pin a resource and deletePin to unpin it."}},"required":["placement"],"additionalProperties":false}}}}},"delete":{"operationId":"deletePin","summary":"Delete a pin","description":"Unpin a session, pull request, project, or folder for the authenticated user without deleting or archiving the resource.","tags":["Pins"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a pin","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["session","pull_request","project","folder"],"description":"Kind of resource to pin or unpin: session, pull_request, project, or folder."},"id":{"type":"string","format":"uuid","description":"ID of the session, pull request, project, or folder, not a separate pin ID."},"deleted":{"type":"boolean","const":true}},"required":["type","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Pin operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"resourceType","schema":{"type":"string","enum":["session","pull_request","project","folder"]},"required":true,"description":"Kind of resource to pin or unpin: session, pull_request, project, or folder."},{"in":"path","name":"resourceId","schema":{"type":"string","format":"uuid"},"required":true,"description":"ID of the pinned session, pull request, project, or folder, not a separate pin ID."}]}},"/v1/folders":{"get":{"operationId":"listFolders","summary":"List folders","description":"List the sidebar folders you use to organize sessions. Use listSessions with folderId to list the sessions in a folder.","tags":["Folders"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List folders","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Folder icon color, from the same palette as project icons."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","color","createdAt","updatedAt"],"additionalProperties":false},"description":"Your folders in sidebar order."}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Folder or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Folder limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"createFolder","summary":"Create a folder","description":"Create a sidebar folder for organizing sessions. New folders go first in your folder list; use createPin to pin one.","tags":["Folders"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a folder","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Folder icon color, from the same palette as project icons."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","color","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Folder or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Folder limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Folder name shown in the sidebar."},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Folder icon color. Defaults to neutral."}},"required":["name"],"additionalProperties":false}}}}}},"/v1/folders/{folderId}":{"patch":{"operationId":"updateFolder","summary":"Update a folder","description":"Rename one of your sidebar folders, change its icon color, move it in your folder list, or add, reorder, or remove its sessions. Use updatePin to move a pinned folder among your pins.","tags":["Folders"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a folder","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Folder icon color, from the same palette as project icons."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","color","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Folder or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Folder limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"folderId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Folder name shown in the sidebar."},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Folder icon color, from the same palette as project icons."},"placement":{"type":"object","properties":{"target":{"type":"string","format":"uuid","description":"Another of your folders to place this folder next to."},"position":{"type":"string","enum":["before","after"],"description":"Whether to place this folder before or after the target."}},"required":["target","position"],"additionalProperties":false,"description":"Where to put this folder in your sidebar folder list. Pinned folders are ordered with updatePin instead."},"addSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"placement":{"type":"object","properties":{"target":{"type":"string","format":"uuid","description":"Session in this folder to place the added session next to."},"position":{"type":"string","enum":["before","after"],"description":"Whether to place the session before or after the target."}},"required":["target","position"],"additionalProperties":false,"description":"Where to put the session in the folder. Omit to put a newly added session first and leave one already here where it is."}},"required":["id"],"additionalProperties":false,"description":"Session to put in this folder, taking it out of any other folder of yours, or to reorder within it."},"removeSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false,"description":"Session to take out of this folder."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteFolder","summary":"Delete a folder","description":"Delete one of your sidebar folders. Its sessions are kept and return to your recent sessions.","tags":["Folders"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a folder","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"400":{"description":"Validation error or missing caller scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Folder or session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Folder limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"folderId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/projects/defaults":{"put":{"operationId":"updateProjectDefaults","summary":"Update project defaults","description":"Choose the default project and sandbox size for the organization.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update project defaults","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":["string","null"],"minLength":1,"maxLength":255,"description":"Project to make the organization default, or null to clear the default."},"sandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"],"description":"Default workspace VM size for the organization."}},"required":["projectId","sandboxSize"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":["string","null"],"minLength":1,"maxLength":255,"description":"Project to make the organization default, or null to clear the default."},"sandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"],"description":"Default workspace VM size for the organization."}},"required":["projectId","sandboxSize"],"additionalProperties":false}}}}},"get":{"operationId":"retrieveProjectDefaults","summary":"Retrieve project defaults","description":"Get the default sandbox size and the largest size the plan allows.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve project defaults","content":{"application/json":{"schema":{"type":"object","properties":{"sandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"],"description":"Default workspace VM size for the organization."},"maxSandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null],"description":"Largest VM size the organization plan allows, or null when unlimited."}},"required":["sandboxSize","maxSandboxSize"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/projects":{"get":{"operationId":"listProjects","summary":"List projects","description":"List projects in the authenticated organization.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List projects","content":{"application/json":{"schema":{"type":"object","properties":{"hasBuiltSnapshot":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string"},"setupScript":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"activeSnapshots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"builtAt":{"type":"string","format":"date-time"}},"required":["id","size","builtAt"],"additionalProperties":false}},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"null"}]},"agentInstructions":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"onboardingDefault":{"type":"boolean","description":"True for the project created during onboarding until it is first edited"},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"},"warmPoolSchedule":{"type":["object","null"],"properties":{"timezone":{"type":"string","minLength":1,"maxLength":100},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["timezone","days","startTime","endTime"],"additionalProperties":false}},"required":["createdAt","description","id","name","setupScript","updatedAt","activeSnapshots","resourceSettings","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","onboardingDefault","sizes","warmPoolEnabled","warmPoolSchedule"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["hasBuiltSnapshot","items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"defaultOnly","schema":{"type":"string","const":"true"},"description":"Only projects configured as defaults for at least one VM size."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":120},"description":"Search project names."}]},"post":{"operationId":"createProject","summary":"Create a project","description":"Create a reusable project environment.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a project","content":{"application/json":{"schema":{"type":"object","properties":{"jobIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"project":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string"},"setupScript":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"activeSnapshots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"builtAt":{"type":"string","format":"date-time"}},"required":["id","size","builtAt"],"additionalProperties":false}},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"null"}]},"agentInstructions":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"onboardingDefault":{"type":"boolean","description":"True for the project created during onboarding until it is first edited"},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"},"warmPoolSchedule":{"type":["object","null"],"properties":{"timezone":{"type":"string","minLength":1,"maxLength":100},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["timezone","days","startTime","endTime"],"additionalProperties":false}},"required":["createdAt","description","id","name","setupScript","updatedAt","activeSnapshots","resourceSettings","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","onboardingDefault","sizes","warmPoolEnabled","warmPoolSchedule"],"additionalProperties":false}},"required":["jobIds","project"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":300,"description":"Short project description, or null to clear it."},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Project display name."},"setupScript":{"type":["string","null"],"maxLength":100000,"description":"Setup script to run while building the environment, or null to clear it."},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255},"description":"Repository IDs included in the project environment. On update, replaces the repository selection."},"agentInstructions":{"type":["string","null"],"maxLength":20000,"description":"Instructions supplied to agents using this project, or null to clear them."},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Project display color."},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"],"description":"Project display icon."},"includeDeps":{"type":"boolean","description":"Deprecated and ignored. Project builds always install dependencies."},"includeSkills":{"type":"boolean","description":"Deprecated and ignored. Project builds always include skills."},"onboardingDefault":{"type":"boolean","description":"Make this project the onboarding default for the organization."},"runNow":{"type":"boolean","description":"Queue initial snapshot builds immediately when a build host is available. Defaults to false."},"schedule":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120,"description":"Cron expression for recurring project snapshot builds."},"timezone":{"type":"string","minLength":1,"maxLength":100,"description":"Timezone for the cron schedule. Defaults to UTC."}},"required":["cron"],"additionalProperties":false,"description":"Recurring schedule for rebuilding the project environment."},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"minItems":1,"default":["medium"],"description":"Workspace VM sizes to build for this project."},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false}],"default":{"automaticSizing":false}}},"required":["name"],"additionalProperties":false}}}}}},"/v1/projects/{projectId}":{"get":{"operationId":"retrieveProject","summary":"Retrieve a project","description":"Retrieve project configuration. Use the project subresources to list snapshots, builds, schedules, and environment variables.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a project","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string"},"setupScript":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"activeSnapshots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"builtAt":{"type":"string","format":"date-time"}},"required":["id","size","builtAt"],"additionalProperties":false}},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"null"}]},"agentInstructions":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"onboardingDefault":{"type":"boolean","description":"True for the project created during onboarding until it is first edited"},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"},"warmPoolSchedule":{"type":["object","null"],"properties":{"timezone":{"type":"string","minLength":1,"maxLength":100},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["timezone","days","startTime","endTime"],"additionalProperties":false}},"required":["createdAt","description","id","name","setupScript","updatedAt","activeSnapshots","resourceSettings","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","onboardingDefault","sizes","warmPoolEnabled","warmPoolSchedule"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"patch":{"operationId":"updateProject","summary":"Update a project","description":"Update project repositories, setup script, agent instructions, environment variables, VM sizes and defaults; enable or pause scheduled builds or the warm pool; rename or customize its appearance.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a project","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string"},"setupScript":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"activeSnapshots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"builtAt":{"type":"string","format":"date-time"}},"required":["id","size","builtAt"],"additionalProperties":false}},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"null"}]},"agentInstructions":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"onboardingDefault":{"type":"boolean","description":"True for the project created during onboarding until it is first edited"},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"},"warmPoolSchedule":{"type":["object","null"],"properties":{"timezone":{"type":"string","minLength":1,"maxLength":100},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["timezone","days","startTime","endTime"],"additionalProperties":false}},"required":["createdAt","description","id","name","setupScript","updatedAt","activeSnapshots","resourceSettings","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","onboardingDefault","sizes","warmPoolEnabled","warmPoolSchedule"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":300,"description":"Short project description, or null to clear it."},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Project display name."},"setupScript":{"type":["string","null"],"maxLength":100000,"description":"Setup script to run while building the environment, or null to clear it."},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255},"description":"Repository IDs included in the project environment. On update, replaces the repository selection."},"agentInstructions":{"type":["string","null"],"maxLength":20000,"description":"Instructions supplied to agents using this project, or null to clear them."},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"],"description":"Project display color."},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"],"description":"Project display icon."},"includeDeps":{"type":"boolean","description":"Deprecated and ignored. Project builds always install dependencies."},"includeSkills":{"type":"boolean","description":"Deprecated and ignored. Project builds always include skills."},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false}],"default":{"automaticSizing":false}},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"description":"VM sizes for which this project is the organization default. An empty array removes its default assignments."},"environmentVariables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{"type":"string","maxLength":10000},"description":"Replace the complete environment-variable map. Use createProjectEnvironmentVariables to add or replace individual keys instead."},"schedule":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120,"description":"Replace the recurring project build cron expression."},"enabled":{"type":"boolean","description":"Enable or pause scheduled project builds."},"timezone":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Timezone for the cron schedule, or null to clear it."}},"additionalProperties":false,"description":"Change the project build schedule, including enabling or pausing it."},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"minItems":1,"description":"Replace the workspace VM sizes built for this project."},"warmPoolSchedule":{"type":["object","null"],"properties":{"timezone":{"type":"string","minLength":1,"maxLength":100},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["timezone","days","startTime","endTime"],"additionalProperties":false,"description":"Weekly availability for prewarmed VMs. Null means always on; days use 0=Sunday. Overnight windows end the following day."},"warmPoolEnabled":{"type":"boolean","description":"Enable or disable prewarmed VMs for this project."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteProject","summary":"Delete a project","description":"Archive a project, remove its default VM-size assignments, and disable its build schedule. This does not permanently delete the project record.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a project","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/projects/{projectId}/duplicate":{"post":{"operationId":"duplicateProject","summary":"Duplicate a project","description":"Create a new project with the same configuration, environment variables, and schedule as an existing project. Snapshots are not copied.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Duplicate a project","content":{"application/json":{"schema":{"type":"object","properties":{"jobIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"project":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string"},"setupScript":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"activeSnapshots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"builtAt":{"type":"string","format":"date-time"}},"required":["id","size","builtAt"],"additionalProperties":false}},"resourceSettings":{"oneOf":[{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":true},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"object","properties":{"automaticSizing":{"type":"boolean","const":false},"allocation":{"type":"object","properties":{"cpuMin":{"type":"integer","exclusiveMinimum":0},"cpuMax":{"type":"integer","exclusiveMinimum":0},"memoryMinMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"memoryMaxMb":{"type":"integer","multipleOf":1024,"exclusiveMinimum":0},"diskSizeGb":{"type":"integer","exclusiveMinimum":0}},"required":["memoryMinMb","memoryMaxMb","diskSizeGb"],"additionalProperties":false}},"required":["automaticSizing"],"additionalProperties":false},{"type":"null"}]},"agentInstructions":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"icon":{"type":"string","enum":["folder","code","terminal","book","brain","bug","building","cloud","globe","idea","tools","magic","processor","sandbox","server","tasks","tactics","images","database","api","mobile","package"]},"onboardingDefault":{"type":"boolean","description":"True for the project created during onboarding until it is first edited"},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"},"warmPoolSchedule":{"type":["object","null"],"properties":{"timezone":{"type":"string","minLength":1,"maxLength":100},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["timezone","days","startTime","endTime"],"additionalProperties":false}},"required":["createdAt","description","id","name","setupScript","updatedAt","activeSnapshots","resourceSettings","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","onboardingDefault","sizes","warmPoolEnabled","warmPoolSchedule"],"additionalProperties":false}},"required":["jobIds","project"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/projects/{projectId}/environment-variables":{"get":{"operationId":"listProjectEnvironmentVariables","summary":"List project environment variables","description":"List environment-variable names without exposing values.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List project environment variables","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["key"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"post":{"operationId":"createProjectEnvironmentVariables","summary":"Create project environment variables","description":"Create one or more encrypted project environment variables.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create project environment variables","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["key"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Environment-variable name."},"value":{"type":"string","minLength":1,"maxLength":10000,"description":"Secret environment-variable value; stored encrypted and not returned by list operations."}},"required":["key","value"],"additionalProperties":false},"minItems":1,"maxItems":100,"description":"Environment variables to add or replace by key, preserving other keys. Values are encrypted and not returned by list operations."}},"required":["secrets"],"additionalProperties":false}}}}}},"/v1/projects/{projectId}/environment-variables/{key}":{"delete":{"operationId":"deleteProjectEnvironmentVariable","summary":"Delete a project environment variable","description":"Delete one encrypted project environment variable.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a project environment variable","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["deleted","key"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"key","schema":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"required":true}]}},"/v1/projects/{projectId}/snapshots":{"get":{"operationId":"listProjectSnapshots","summary":"List project snapshots","description":"List recent VM snapshots built for a project.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List project snapshots","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"isActive":{"type":"boolean"},"name":{"type":["string","null"]},"pinnedAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"automaticSizing":{"type":"boolean"},"buildDurationMs":{"type":["number","null"],"minimum":0},"builtAt":{"type":["string","null"],"format":"date-time"},"cpu":{"type":["integer","null"],"exclusiveMinimum":0},"diskSizeGb":{"type":["number","null"],"exclusiveMinimum":0},"hasSetupScript":{"type":["boolean","null"]},"includesRepos":{"type":["boolean","null"]},"isKvm":{"type":["boolean","null"]},"memoryMb":{"type":["integer","null"],"exclusiveMinimum":0},"projectId":{"type":"string","minLength":1,"maxLength":255},"rebuildOfSnapshotId":{"type":["string","null"],"minLength":1,"maxLength":255},"repositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"setupScript":{"type":["string","null"],"maxLength":100000},"size":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sizeBytes":{"type":["string","null"],"pattern":"^\\d+$"},"trigger":{"type":["string","null"],"enum":["manual","scheduled","rebuild","manager_reconcile","admin",null]}},"required":["createdAt","id","isActive","name","pinnedAt","updatedAt","automaticSizing","buildDurationMs","builtAt","cpu","diskSizeGb","hasSetupScript","includesRepos","isKvm","memoryMb","projectId","rebuildOfSnapshotId","repositoryIds","setupScript","size","sizeBytes","trigger"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/projects/{projectId}/snapshots/{snapshotId}":{"get":{"operationId":"retrieveProjectSnapshot","summary":"Retrieve a project snapshot","description":"Retrieve one project snapshot.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a project snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"isActive":{"type":"boolean"},"name":{"type":["string","null"]},"pinnedAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"automaticSizing":{"type":"boolean"},"buildDurationMs":{"type":["number","null"],"minimum":0},"builtAt":{"type":["string","null"],"format":"date-time"},"cpu":{"type":["integer","null"],"exclusiveMinimum":0},"diskSizeGb":{"type":["number","null"],"exclusiveMinimum":0},"hasSetupScript":{"type":["boolean","null"]},"includesRepos":{"type":["boolean","null"]},"isKvm":{"type":["boolean","null"]},"memoryMb":{"type":["integer","null"],"exclusiveMinimum":0},"projectId":{"type":"string","minLength":1,"maxLength":255},"rebuildOfSnapshotId":{"type":["string","null"],"minLength":1,"maxLength":255},"repositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"setupScript":{"type":["string","null"],"maxLength":100000},"size":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sizeBytes":{"type":["string","null"],"pattern":"^\\d+$"},"trigger":{"type":["string","null"],"enum":["manual","scheduled","rebuild","manager_reconcile","admin",null]}},"required":["createdAt","id","isActive","name","pinnedAt","updatedAt","automaticSizing","buildDurationMs","builtAt","cpu","diskSizeGb","hasSetupScript","includesRepos","isKvm","memoryMb","projectId","rebuildOfSnapshotId","repositoryIds","setupScript","size","sizeBytes","trigger"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"snapshotId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"patch":{"operationId":"updateProjectSnapshot","summary":"Update a project snapshot","description":"Rename a snapshot or choose whether it is pinned.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a project snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"isActive":{"type":"boolean"},"name":{"type":["string","null"]},"pinnedAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"automaticSizing":{"type":"boolean"},"buildDurationMs":{"type":["number","null"],"minimum":0},"builtAt":{"type":["string","null"],"format":"date-time"},"cpu":{"type":["integer","null"],"exclusiveMinimum":0},"diskSizeGb":{"type":["number","null"],"exclusiveMinimum":0},"hasSetupScript":{"type":["boolean","null"]},"includesRepos":{"type":["boolean","null"]},"isKvm":{"type":["boolean","null"]},"memoryMb":{"type":["integer","null"],"exclusiveMinimum":0},"projectId":{"type":"string","minLength":1,"maxLength":255},"rebuildOfSnapshotId":{"type":["string","null"],"minLength":1,"maxLength":255},"repositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"setupScript":{"type":["string","null"],"maxLength":100000},"size":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"sizeBytes":{"type":["string","null"],"pattern":"^\\d+$"},"trigger":{"type":["string","null"],"enum":["manual","scheduled","rebuild","manager_reconcile","admin",null]}},"required":["createdAt","id","isActive","name","pinnedAt","updatedAt","automaticSizing","buildDurationMs","builtAt","cpu","diskSizeGb","hasSetupScript","includesRepos","isKvm","memoryMb","projectId","rebuildOfSnapshotId","repositoryIds","setupScript","size","sizeBytes","trigger"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"snapshotId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":120,"description":"Rename the snapshot, or null to clear its name."},"pinned":{"type":"boolean","description":"Pin the snapshot with true to retain it, or unpin with false. This is separate from user sidebar resource pins."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteProjectSnapshot","summary":"Delete a project snapshot","description":"Delete a project snapshot.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a project snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"cleanupJobCount":{"type":"integer","minimum":0},"deleted":{"type":"boolean","const":true},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["cleanupJobCount","deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"snapshotId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/projects/{projectId}/builds":{"get":{"operationId":"listProjectBuilds","summary":"List project builds","description":"List recent queued, running, and failed project builds.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List project builds","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"automaticSizing":{"type":"boolean"},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0},"failure":{"type":["string","null"]},"name":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"message":{"type":["string","null"]},"percent":{"type":["number","null"],"minimum":0,"maximum":100},"phase":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["message","percent","phase","updatedAt"],"additionalProperties":false},"projectId":{"type":"string","minLength":1,"maxLength":255},"repositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"sandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"setupScript":{"type":["string","null"],"maxLength":100000},"startedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","running","failed","completed","cancelled"]},"trigger":{"type":"string","enum":["manual","scheduled","rebuild"]}},"required":["createdAt","id","automaticSizing","completedAt","durationMs","failure","name","progress","projectId","repositoryIds","sandboxSize","setupScript","startedAt","status","trigger"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]},"post":{"operationId":"createProjectBuild","summary":"Create a project build","description":"Build selected project sizes or rebuild one snapshot.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a project build","content":{"application/json":{"schema":{"type":"object","properties":{"jobIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"minItems":1}},"required":["jobIds"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"minItems":1,"description":"VM sizes to build. Omit to use the project sizes. Cannot be combined with snapshotId."},"snapshotId":{"type":"string","minLength":1,"maxLength":255,"description":"Rebuild one existing snapshot instead of building project sizes. Cannot be combined with sizes."}},"additionalProperties":false}}}}}},"/v1/projects/{projectId}/builds/{buildId}":{"get":{"operationId":"retrieveProjectBuild","summary":"Retrieve a project build","description":"Retrieve project build status.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a project build","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"automaticSizing":{"type":"boolean"},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0},"failure":{"type":["string","null"]},"name":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"message":{"type":["string","null"]},"percent":{"type":["number","null"],"minimum":0,"maximum":100},"phase":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["message","percent","phase","updatedAt"],"additionalProperties":false},"projectId":{"type":"string","minLength":1,"maxLength":255},"repositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"sandboxSize":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"setupScript":{"type":["string","null"],"maxLength":100000},"startedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","running","failed","completed","cancelled"]},"trigger":{"type":"string","enum":["manual","scheduled","rebuild"]}},"required":["createdAt","id","automaticSizing","completedAt","durationMs","failure","name","progress","projectId","repositoryIds","sandboxSize","setupScript","startedAt","status","trigger"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"buildId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/projects/{projectId}/builds/{buildId}/cancel":{"post":{"operationId":"cancelProjectBuild","summary":"Cancel a project build","description":"Cancel an active queued or running project build.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Cancel a project build","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"boolean","const":true},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["cancelled","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"buildId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/projects/{projectId}/schedules":{"get":{"operationId":"listProjectSchedules","summary":"List project schedules","description":"List schedules linked to a project.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List project schedules","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"cron":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"timezone":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","minLength":1,"maxLength":255}},"required":["createdAt","cron","enabledAt","id","lastRunAt","nextRunAt","timezone","updatedAt","projectId"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]},"post":{"operationId":"createProjectSchedule","summary":"Create a project schedule","description":"Create a recurring project build schedule.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create a project schedule","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"cron":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"timezone":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","minLength":1,"maxLength":255}},"required":["createdAt","cron","enabledAt","id","lastRunAt","nextRunAt","timezone","updatedAt","projectId"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120,"description":"Cron expression for recurring project snapshot builds."},"timezone":{"type":"string","minLength":1,"maxLength":100,"description":"Timezone for the cron schedule. Defaults to UTC."}},"required":["cron"],"additionalProperties":false}}}}}},"/v1/projects/{projectId}/schedules/{scheduleId}":{"get":{"operationId":"retrieveProjectSchedule","summary":"Retrieve a project schedule","description":"Retrieve one project build schedule.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a project schedule","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"cron":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"timezone":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","minLength":1,"maxLength":255}},"required":["createdAt","cron","enabledAt","id","lastRunAt","nextRunAt","timezone","updatedAt","projectId"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"patch":{"operationId":"updateProjectSchedule","summary":"Update a project schedule","description":"Update timing or enabled state for a project schedule.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a project schedule","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"cron":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"timezone":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"projectId":{"type":"string","minLength":1,"maxLength":255}},"required":["createdAt","cron","enabledAt","id","lastRunAt","nextRunAt","timezone","updatedAt","projectId"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120,"description":"Replace the recurring project build cron expression."},"enabled":{"type":"boolean","description":"Enable or pause scheduled project builds."},"timezone":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Timezone for the cron schedule, or null to clear it."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteProjectSchedule","summary":"Delete a project schedule","description":"Disable a project build schedule.","tags":["Projects"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a project schedule","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Project resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Project resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Project operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/pull-requests":{"get":{"operationId":"listPullRequests","summary":"List pull requests","description":"List pull requests for the authenticated organization with cursor pagination.","tags":["Pull requests"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List pull requests","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"externalId":{"type":"string"},"externalProvider":{"type":"string"},"id":{"type":"string"},"isDraft":{"type":"boolean"},"mergedAt":{"type":["string","null"],"format":"date-time"},"reviewDecision":{"type":["string","null"],"enum":["APPROVED","CHANGES_REQUESTED","REVIEW_REQUIRED",null]},"sourceBranch":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"],"default":"open"},"title":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"url":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":["string","null"]},"login":{"type":["string","null"]},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"profileUrl":{"type":["string","null"]}},"required":["id","login","name","avatarUrl","profileUrl"],"additionalProperties":false},"baseBranch":{"type":["string","null"]},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":"string"},"owner":{"type":["string","null"]},"targetBranch":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","url","owner","targetBranch","baseBranch","provider"],"additionalProperties":false},"headSha":{"type":["string","null"]},"number":{"type":["integer","null"],"exclusiveMinimum":0},"owner":{"type":["string","null"]},"reviewers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":["string","null"]},"profileUrl":{"type":["string","null"]},"type":{"type":"string","enum":["bot","user"]},"reviewRequested":{"type":"boolean"},"commented":{"type":"boolean"},"approved":{"type":"boolean"},"state":{"type":"string","enum":["approved","changes_requested","commented","awaiting"]},"changesRequested":{"type":"boolean"},"awaitingReview":{"type":"boolean"}},"required":["id","login","name","avatarUrl","profileUrl","reviewRequested","commented","approved"],"additionalProperties":false}},"state":{"type":"string","enum":["approved","needs review","draft","merged","closed"]},"approvers":{"type":"array","items":{"type":"object","properties":{"login":{"type":"string"},"avatarUrl":{"type":["string","null"]}},"required":["login","avatarUrl"],"additionalProperties":false}},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0}},"required":["additions","deletions"],"additionalProperties":false},"session":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string"},"htmlUrl":{"type":"string"},"visibility":{"type":"string","enum":["private","public"]}},"required":["id","title","kind","htmlUrl"],"additionalProperties":false}},"required":["createdAt","description","externalId","externalProvider","id","isDraft","mergedAt","reviewDecision","sourceBranch","status","title","updatedAt","url","author","baseBranch","codeRepository","headSha","number","owner","reviewers","state","approvers","diff","session"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"},"totalCount":{"type":"integer","minimum":0}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Pull request not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Pull request conflicts with an existing resource","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Pull request operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Repository provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"authorIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter authors by comma-separated provider:identifier values, such as github:octocat."},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"},"description":"Only pull requests created after this ISO 8601 timestamp."},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"excludeAuthorIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Exclude authors by comma-separated provider:identifier values."},{"in":"query","name":"excludeOrganizationName","schema":{"type":"string","minLength":1},"description":"Exclude pull requests from the named organization within the caller access scope."},{"in":"query","name":"excludeReturnedAuthorIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Exclude returned pull requests by these comma-separated provider:identifier author values."},{"in":"query","name":"excludeReviewerIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Exclude pull requests assigned to these comma-separated reviewer identifiers."},{"in":"query","name":"hasTemboSession","schema":{"type":"boolean"},"description":"When true, only return pull requests with a linked Tembo session."},{"in":"query","name":"includeAuthors","schema":{"type":"boolean"},"description":"Request author filter options. Public responses do not include organization-wide author options."},{"in":"query","name":"includeTotal","schema":{"type":"boolean"},"description":"Include the total count of matching pull requests."},{"in":"query","name":"includeStacks","schema":{"type":"boolean"},"description":"Include each open pull request's position in its stack of dependent pull requests. Public responses do not include stacks."},{"in":"query","name":"repositoryIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by repository IDs, supplied as a comma-separated list."},{"in":"query","name":"reviewerIds","schema":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"description":"Filter by assigned reviewer identifiers, supplied as a comma-separated list."},{"in":"query","name":"mergedAfter","schema":{"type":"string","format":"date-time"},"description":"Only pull requests merged after this ISO 8601 timestamp."},{"in":"query","name":"search","schema":{"type":"string","minLength":1},"description":"Search pull requests."},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["createdAt","updatedAt"]},"description":"Sort by creation time or last update time."},{"in":"query","name":"state","schema":{"type":"string","enum":["open","returned","approved","needs review","draft","merged","closed"]},"description":"Filter by lifecycle or review state, including open, returned, approved, needs review, draft, merged, or closed."},{"in":"query","name":"updatedAfter","schema":{"type":"string","format":"date-time"},"description":"Only pull requests updated after this ISO 8601 timestamp."}]}},"/v1/pull-requests/{pullRequestId}":{"get":{"operationId":"retrievePullRequest","summary":"Retrieve a pull request","description":"Retrieve a pull request for the authenticated organization.","tags":["Pull requests"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a pull request","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"externalId":{"type":"string"},"externalProvider":{"type":"string"},"id":{"type":"string"},"isDraft":{"type":"boolean"},"mergedAt":{"type":["string","null"],"format":"date-time"},"reviewDecision":{"type":["string","null"],"enum":["APPROVED","CHANGES_REQUESTED","REVIEW_REQUIRED",null]},"sourceBranch":{"type":["string","null"]},"status":{"type":"string","enum":["open","merged","closed"],"default":"open"},"title":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"url":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":["string","null"]},"login":{"type":["string","null"]},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"profileUrl":{"type":["string","null"]}},"required":["id","login","name","avatarUrl","profileUrl"],"additionalProperties":false},"baseBranch":{"type":["string","null"]},"codeRepository":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":"string"},"owner":{"type":["string","null"]},"targetBranch":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"provider":{"type":"string"}},"required":["id","name","url","owner","targetBranch","baseBranch","provider"],"additionalProperties":false},"diff":{"type":["object","null"],"properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"data":{"type":"string"}},"required":["additions","deletions","data"],"additionalProperties":false},"headSha":{"type":["string","null"]},"number":{"type":["integer","null"],"exclusiveMinimum":0},"owner":{"type":["string","null"]},"reviewers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":["string","null"]},"profileUrl":{"type":["string","null"]},"type":{"type":"string","enum":["bot","user"]},"reviewRequested":{"type":"boolean"},"commented":{"type":"boolean"},"approved":{"type":"boolean"},"state":{"type":"string","enum":["approved","changes_requested","commented","awaiting"]},"changesRequested":{"type":"boolean"},"awaitingReview":{"type":"boolean"}},"required":["id","login","name","avatarUrl","profileUrl","reviewRequested","commented","approved"],"additionalProperties":false}},"state":{"type":"string","enum":["approved","needs review","draft","merged","closed"]},"session":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string"},"htmlUrl":{"type":"string"},"visibility":{"type":"string","enum":["private","public"]}},"required":["id","title","kind","htmlUrl"],"additionalProperties":false}},"required":["createdAt","description","externalId","externalProvider","id","isDraft","mergedAt","reviewDecision","sourceBranch","status","title","updatedAt","url","author","baseBranch","codeRepository","diff","headSha","number","owner","reviewers","state","session"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller is not permitted to perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Pull request not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Pull request conflicts with an existing resource","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Pull request operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Repository provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"pullRequestId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/agents":{"get":{"operationId":"listAgents","summary":"List agents","description":"List agents available in your organization, with optional search, status, integration, and author filters.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List agents","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":["string","null"],"minLength":1,"maxLength":255},"organizationName":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"name":{"type":"string"},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}]},"agent":{"type":["string","null"],"description":"Runtime and model selection key; not the ID of an agent resource."},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"Selected MCP server identifiers, including built-in server keys."},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"createdAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"lastRun":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false},"scheduleCount":{"type":"integer","minimum":0},"triggerCount":{"type":"integer","minimum":0},"hasPausedSchedule":{"type":"boolean"},"hasPausedTrigger":{"type":"boolean"},"integrationIds":{"type":"array","items":{"type":"string","format":"uuid"}},"integrationTypes":{"type":"array","items":{"type":"string"}},"codeRepositoryCount":{"type":"integer","minimum":0}},"required":["id","organizationId","organizationName","createdBy","name","instructions","agent","mcpServers","artifactType","createdAt","archivedAt","enabledAt","lastRun","scheduleCount","triggerCount","hasPausedSchedule","hasPausedTrigger","integrationIds","integrationTypes","codeRepositoryCount"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"filterOptions":{"type":"object","properties":{"hasAgents":{"type":"boolean"},"integrationTypes":{"type":"array","items":{"type":"string"}}},"required":["hasAgents","integrationTypes"],"additionalProperties":false}},"required":["items","nextCursor","filterOptions"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","maxLength":2000},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"ids","schema":{"type":"string","maxLength":10000},"description":"Filter by agent IDs, supplied as a comma-separated list."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Search agent names."},{"in":"query","name":"archived","schema":{"type":"boolean"},"description":"true lists archived agents; false or omitted lists unarchived agents. Use this to find agents to restore."},{"in":"query","name":"sort","schema":{"type":"string","enum":["latestRun","runCount"]},"description":"Sort agents by latest run or run count."},{"in":"query","name":"status","schema":{"type":"string","maxLength":10000},"description":"Filter by enabled (running) or paused status, supplied as a comma-separated list; this is not individual run execution status."},{"in":"query","name":"integration","schema":{"type":"string","maxLength":10000},"description":"Filter by integration provider types, supplied as a comma-separated list."},{"in":"query","name":"author","schema":{"type":"string","maxLength":10000},"description":"Filter by creator user IDs, supplied as a comma-separated list."}]},"post":{"operationId":"createAgent","summary":"Create an agent","description":"Create an agent from instructions, a template, or another agent. sourceAgentId cannot be combined with other fields. Template creation accepts only templateName, name, and triggers; creation from scratch requires name.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an agent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"projectId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"contentVersion":{"type":"integer","default":1},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"organizationId":{"type":["string","null"],"minLength":1,"maxLength":255},"organizationName":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}]},"agent":{"type":["string","null"],"description":"Runtime and model selection key; not the ID of an agent resource."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"Selected MCP server identifiers, including built-in server keys."},"userState":{"oneOf":[{"$ref":"#/components/schemas/AgentState"},{"type":"null"}]},"codeRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"integrationId":{"type":"string","format":"uuid"},"integrationType":{"type":"string"}},"required":["id","name","owner","integrationId","integrationType"],"additionalProperties":false},"maxItems":250},"lastRun":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false},"scheduleCount":{"type":"integer","minimum":0},"triggerCount":{"type":"integer","minimum":0},"hasPausedSchedule":{"type":"boolean"},"hasPausedTrigger":{"type":"boolean"},"integrationIds":{"type":"array","items":{"type":"string","format":"uuid"}},"integrationTypes":{"type":"array","items":{"type":"string"}}},"required":["id","name","key","sandboxSize","projectId","templateId","contentVersion","script","artifactType","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","scheduleCount","triggerCount","hasPausedSchedule","hasPausedTrigger","integrationIds","integrationTypes"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Agent display name. Required when creating from scratch."},"instructions":{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"MCP server or connection IDs available to agent runs."},"agent":{"type":"string","minLength":1,"maxLength":200,"description":"Coding agent and model key used for runs. Omit to use the default."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput","description":"Agent-specific runtime options, such as reasoning effort."},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","medium","large","xl","xxl","ultra",null],"description":"Workspace VM size used for agent runs."},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"tembo"},{"type":"null"}],"description":"Project environment used for agent runs."},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null],"description":"Artifact type produced by this agent."},"repositoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250,"description":"Repository IDs available to agent runs."},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Integration event name. Use listIntegrationTriggers to discover supported triggers."},"integrationType":{"type":"string","minLength":1,"maxLength":100,"description":"Provider type for the trigger, such as github or slack."},"integrationId":{"type":"string","format":"uuid","description":"Connected integration that supplies trigger events."},"filters":{"$ref":"#/components/schemas/TriggerFilters","description":"Event-specific trigger filters. Use retrieveIntegrationTrigger and listIntegrationTriggerFilterOptions to discover supported fields and values."}},"required":["name"],"additionalProperties":false},"maxItems":50,"description":"Integration events that automatically start agent runs."},"schedules":{"type":"array","items":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":500,"description":"Cron expression for recurring agent runs. Agent enabled and archived state controls whether the schedule runs."}},"required":["cron"],"additionalProperties":false},"maxItems":50,"description":"Recurring cron schedules that automatically start agent runs."},"templateName":{"type":"string","enum":["addTestCoverage","addTestCoverageFromJira","autoAgentsMdMaintainer","autoDocsMaintainer","publicApiReleaseMaintainer","commitOfTheDay","customerHealthMonitoringAgent","deadCodeCleanup","dependencySweepAgent","autoFixCi","autoFixSentryError","dailySlackChangelog","duplicateTicketDetector","fixBugsReportedInSlack","enrichGithubIssue","enrichJiraIssue","enrichLinearIssue","hubspotCallTaskCoach","hubspotEmailTaskDrafter","hubspotTicketToLinearBug","prDescription","prReview","pagePerformanceReport","prioritizeSentry","productFaqAgent","productFinanceAgent","queryPerformanceReport","securityFixFromJira","securityScan","skillProgressionMap","slackChannelListener","slopCop","testAudit","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug"],"description":"Create from a template discovered with listAgentTemplates. Only name and triggers may also be supplied."},"sourceAgentId":{"type":"string","format":"uuid","description":"Duplicate an existing agent. Must be the only field; cannot be combined with templateName or overrides."}},"additionalProperties":false}}}}}},"/v1/agents/templates":{"get":{"operationId":"listAgentTemplates","summary":"List agent templates","description":"List reusable agent templates and their configuration requirements.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List agent templates","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["addTestCoverage","addTestCoverageFromJira","autoAgentsMdMaintainer","autoDocsMaintainer","publicApiReleaseMaintainer","commitOfTheDay","customerHealthMonitoringAgent","deadCodeCleanup","dependencySweepAgent","autoFixCi","autoFixSentryError","dailySlackChangelog","duplicateTicketDetector","fixBugsReportedInSlack","enrichGithubIssue","enrichJiraIssue","enrichLinearIssue","hubspotCallTaskCoach","hubspotEmailTaskDrafter","hubspotTicketToLinearBug","prDescription","prReview","pagePerformanceReport","prioritizeSentry","productFaqAgent","productFinanceAgent","queryPerformanceReport","securityFixFromJira","securityScan","skillProgressionMap","slackChannelListener","slopCop","testAudit","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug"]},"title":{"type":"string"},"description":{"type":"string"},"label":{"type":"string","enum":["Code Review","Productivity","Documentation","Reporting","Monitoring","Management"]},"instructions":{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},"connectedApps":{"type":"array","items":{"type":"string"}},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"agent":{"type":"string"},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"integrationType":{"type":"string"},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["name","displayName","integrationType"],"additionalProperties":false}},"schedules":{"type":"array","items":{"type":"string"}},"requiredParams":{"type":"array","items":{"type":"string","const":"repository"}}},"required":["name","title","description","label","instructions","connectedApps","agent"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"enum":["addTestCoverage","addTestCoverageFromJira","autoAgentsMdMaintainer","autoDocsMaintainer","publicApiReleaseMaintainer","commitOfTheDay","customerHealthMonitoringAgent","deadCodeCleanup","dependencySweepAgent","autoFixCi","autoFixSentryError","dailySlackChangelog","duplicateTicketDetector","fixBugsReportedInSlack","enrichGithubIssue","enrichJiraIssue","enrichLinearIssue","hubspotCallTaskCoach","hubspotEmailTaskDrafter","hubspotTicketToLinearBug","prDescription","prReview","pagePerformanceReport","prioritizeSentry","productFaqAgent","productFinanceAgent","queryPerformanceReport","securityFixFromJira","securityScan","skillProgressionMap","slackChannelListener","slopCop","testAudit","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug",null]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","enum":["addTestCoverage","addTestCoverageFromJira","autoAgentsMdMaintainer","autoDocsMaintainer","publicApiReleaseMaintainer","commitOfTheDay","customerHealthMonitoringAgent","deadCodeCleanup","dependencySweepAgent","autoFixCi","autoFixSentryError","dailySlackChangelog","duplicateTicketDetector","fixBugsReportedInSlack","enrichGithubIssue","enrichJiraIssue","enrichLinearIssue","hubspotCallTaskCoach","hubspotEmailTaskDrafter","hubspotTicketToLinearBug","prDescription","prReview","pagePerformanceReport","prioritizeSentry","productFaqAgent","productFinanceAgent","queryPerformanceReport","securityFixFromJira","securityScan","skillProgressionMap","slackChannelListener","slopCop","testAudit","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug"]},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/agents/templates/{templateName}":{"get":{"operationId":"retrieveAgentTemplate","summary":"Retrieve an agent template","description":"Retrieve a reusable agent template by name, including its instructions and required parameters.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an agent template","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","enum":["addTestCoverage","addTestCoverageFromJira","autoAgentsMdMaintainer","autoDocsMaintainer","publicApiReleaseMaintainer","commitOfTheDay","customerHealthMonitoringAgent","deadCodeCleanup","dependencySweepAgent","autoFixCi","autoFixSentryError","dailySlackChangelog","duplicateTicketDetector","fixBugsReportedInSlack","enrichGithubIssue","enrichJiraIssue","enrichLinearIssue","hubspotCallTaskCoach","hubspotEmailTaskDrafter","hubspotTicketToLinearBug","prDescription","prReview","pagePerformanceReport","prioritizeSentry","productFaqAgent","productFinanceAgent","queryPerformanceReport","securityFixFromJira","securityScan","skillProgressionMap","slackChannelListener","slopCop","testAudit","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug"]},"title":{"type":"string"},"description":{"type":"string"},"label":{"type":"string","enum":["Code Review","Productivity","Documentation","Reporting","Monitoring","Management"]},"instructions":{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},"connectedApps":{"type":"array","items":{"type":"string"}},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"agent":{"type":"string"},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"integrationType":{"type":"string"},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["name","displayName","integrationType"],"additionalProperties":false}},"schedules":{"type":"array","items":{"type":"string"}},"requiredParams":{"type":"array","items":{"type":"string","const":"repository"}}},"required":["name","title","description","label","instructions","connectedApps","agent"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"templateName","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}]}},"/v1/agents/{agentId}":{"get":{"operationId":"retrieveAgent","summary":"Retrieve an agent","description":"Retrieve an agent and its configuration, repository associations, and run summary.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an agent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"projectId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"contentVersion":{"type":"integer","default":1},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"organizationId":{"type":["string","null"],"minLength":1,"maxLength":255},"organizationName":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}]},"agent":{"type":["string","null"],"description":"Runtime and model selection key; not the ID of an agent resource."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"Selected MCP server identifiers, including built-in server keys."},"userState":{"oneOf":[{"$ref":"#/components/schemas/AgentState"},{"type":"null"}]},"codeRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"integrationId":{"type":"string","format":"uuid"},"integrationType":{"type":"string"}},"required":["id","name","owner","integrationId","integrationType"],"additionalProperties":false},"maxItems":250},"lastRun":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false},"scheduleCount":{"type":"integer","minimum":0},"triggerCount":{"type":"integer","minimum":0},"hasPausedSchedule":{"type":"boolean"},"hasPausedTrigger":{"type":"boolean"},"integrationIds":{"type":"array","items":{"type":"string","format":"uuid"}},"integrationTypes":{"type":"array","items":{"type":"string"}}},"required":["id","name","key","sandboxSize","projectId","templateId","contentVersion","script","artifactType","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","scheduleCount","triggerCount","hasPausedSchedule","hasPausedTrigger","integrationIds","integrationTypes"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateAgent","summary":"Update an agent","description":"Update agent instructions, model, workspace, repositories, or persistent state; enable or pause the agent; archive or restore it. enabled and archived also control its schedules and triggers. Supply expectedUpdatedAt to reject concurrent changes.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an agent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"projectId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"contentVersion":{"type":"integer","default":1},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"organizationId":{"type":["string","null"],"minLength":1,"maxLength":255},"organizationName":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}]},"agent":{"type":["string","null"],"description":"Runtime and model selection key; not the ID of an agent resource."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"Selected MCP server identifiers, including built-in server keys."},"userState":{"oneOf":[{"$ref":"#/components/schemas/AgentState"},{"type":"null"}]},"codeRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"integrationId":{"type":"string","format":"uuid"},"integrationType":{"type":"string"}},"required":["id","name","owner","integrationId","integrationType"],"additionalProperties":false},"maxItems":250},"lastRun":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false},"scheduleCount":{"type":"integer","minimum":0},"triggerCount":{"type":"integer","minimum":0},"hasPausedSchedule":{"type":"boolean"},"hasPausedTrigger":{"type":"boolean"},"integrationIds":{"type":"array","items":{"type":"string","format":"uuid"}},"integrationTypes":{"type":"array","items":{"type":"string"}}},"required":["id","name","key","sandboxSize","projectId","templateId","contentVersion","script","artifactType","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","scheduleCount","triggerCount","hasPausedSchedule","hasPausedTrigger","integrationIds","integrationTypes"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","format":"date-time","description":"Value of updatedAt from the last retrieved agent. A concurrent change causes a conflict instead of overwriting newer changes."},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Rename the agent."},"key":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Change the agent lookup key, or null to clear it."},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}],"description":"Replace the agent instruction document, or null to clear it."},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"Replace the MCP server or connection IDs. An empty array clears the selection."},"agent":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Change the coding agent and model key. Null clears the override."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput","description":"Change agent-specific runtime options, such as reasoning effort."},"userState":{"$ref":"#/components/schemas/AgentState","description":"Replace the user-managed persistent agent state."},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","medium","large","xl","xxl","ultra",null],"description":"Change the workspace VM size. Null clears the override."},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"tembo"},{"type":"null"}],"description":"Change the project environment for runs. Null clears the override."},"templateId":{"type":["string","null"],"maxLength":200,"description":"Change the associated agent template identifier, or null to clear it."},"script":{"type":["string","null"],"maxLength":100000,"description":"Replace the agent script, or null to clear it."},"artifactType":{"type":["string","null","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null,null],"description":"Change the artifact type produced by the agent, or null to clear it."},"repositoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250,"description":"Replace repository associations. An empty array removes all associations."},"enabled":{"type":"boolean","description":"Enable or pause the agent and its schedules and triggers. Archived agents remain paused until restored."},"archived":{"type":"boolean","description":"Archive with true or restore with false. Archiving disables schedules and triggers; restoring follows the agent enabled state."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteAgent","summary":"Delete an agent","description":"Archive an agent and disable its scheduled and triggered jobs without permanently deleting it. Restore with updateAgent and archived=false.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an agent","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/agents/{agentId}/content-revisions":{"get":{"operationId":"listAgentContentRevisions","summary":"List agent instruction revisions","description":"List saved revisions of an agent’s instruction JSON document, newest first. Revisions do not include other agent configuration. Author details are redacted from public API responses.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List agent instruction revisions","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0},"authorId":{"type":["string","null"]},"authorName":{"type":["string","null"]},"source":{"type":"string"},"restoredFromVersion":{"type":["integer","null"],"exclusiveMinimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["version","authorId","authorName","source","restoredFromVersion","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^[1-9]\\d*$"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/agents/{agentId}/content-revisions/{version}":{"get":{"operationId":"retrieveAgentContentRevision","summary":"Retrieve an agent instruction revision","description":"Retrieve the instruction JSON document saved in one revision. Other agent configuration is not included. Author details are redacted from public API responses.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an agent instruction revision","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0},"authorId":{"type":["string","null"]},"authorName":{"type":["string","null"]},"source":{"type":"string"},"restoredFromVersion":{"type":["integer","null"],"exclusiveMinimum":0},"createdAt":{"type":"string","format":"date-time"},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}],"description":"The instruction JSON document saved in this revision. Other agent configuration is not versioned."}},"required":["version","authorId","authorName","source","restoredFromVersion","createdAt","instructions"],"additionalProperties":false,"description":"A saved revision of an agent’s instruction JSON document."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"version","schema":{"type":"integer","exclusiveMinimum":0},"required":true}]}},"/v1/agents/{agentId}/content-revisions/{version}/restore":{"post":{"operationId":"restoreAgentContentRevision","summary":"Restore agent instructions","description":"Restore a saved instruction JSON document and its mentioned integrations, without reverting other agent configuration. A changed document creates a new revision attributed to the caller. Supply the agent’s current contentVersion as expectedContentVersion; a concurrent instruction change returns 409.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Restore agent instructions","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"projectId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"contentVersion":{"type":"integer","default":1},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"organizationId":{"type":["string","null"],"minLength":1,"maxLength":255},"organizationName":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"instructions":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument","description":"Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent."},{"type":"null"}]},"agent":{"type":["string","null"],"description":"Runtime and model selection key; not the ID of an agent resource."},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"description":"Selected MCP server identifiers, including built-in server keys."},"userState":{"oneOf":[{"$ref":"#/components/schemas/AgentState"},{"type":"null"}]},"codeRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"integrationId":{"type":"string","format":"uuid"},"integrationType":{"type":"string"}},"required":["id","name","owner","integrationId","integrationType"],"additionalProperties":false},"maxItems":250},"lastRun":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false},"scheduleCount":{"type":"integer","minimum":0},"triggerCount":{"type":"integer","minimum":0},"hasPausedSchedule":{"type":"boolean"},"hasPausedTrigger":{"type":"boolean"},"integrationIds":{"type":"array","items":{"type":"string","format":"uuid"}},"integrationTypes":{"type":"array","items":{"type":"string"}}},"required":["id","name","key","sandboxSize","projectId","templateId","contentVersion","script","artifactType","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","scheduleCount","triggerCount","hasPausedSchedule","hasPausedTrigger","integrationIds","integrationTypes"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"version","schema":{"type":"integer","exclusiveMinimum":0},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedContentVersion":{"type":"integer","exclusiveMinimum":0,"description":"The agent’s current instruction version, used to reject a restore if the instructions have changed."}},"required":["expectedContentVersion"],"additionalProperties":false}}}}}},"/v1/agents/{agentId}/schedules":{"get":{"operationId":"listAgentSchedules","summary":"List agent schedules","description":"List the schedules configured for an agent.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List agent schedules","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cron":{"type":"string"},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"}},"required":["id","cron","lastRunAt","nextRunAt","enabledAt","createdAt","updatedAt","agentId"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]},"post":{"operationId":"createAgentSchedule","summary":"Create an agent schedule","description":"Create a recurring schedule that starts agent runs using a cron expression.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an agent schedule","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cron":{"type":"string"},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"}},"required":["id","cron","lastRunAt","nextRunAt","enabledAt","createdAt","updatedAt","agentId"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":500,"description":"Cron expression for recurring agent runs. Agent enabled and archived state controls whether the schedule runs."}},"required":["cron"],"additionalProperties":false}}}}}},"/v1/agents/{agentId}/schedules/{scheduleId}":{"get":{"operationId":"retrieveAgentSchedule","summary":"Retrieve an agent schedule","description":"Retrieve an agent schedule, including its enabled state and next execution time.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an agent schedule","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cron":{"type":"string"},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"}},"required":["id","cron","lastRunAt","nextRunAt","enabledAt","createdAt","updatedAt","agentId"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"scheduleId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateAgentSchedule","summary":"Update an agent schedule","description":"Change an agent schedule cron expression. Use updateAgent with enabled to enable or pause the agent and its schedules.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an agent schedule","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cron":{"type":"string"},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"}},"required":["id","cron","lastRunAt","nextRunAt","enabledAt","createdAt","updatedAt","agentId"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"scheduleId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":500,"description":"Cron expression for recurring agent runs. Agent enabled and archived state controls whether the schedule runs."}},"required":["cron"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteAgentSchedule","summary":"Delete an agent schedule","description":"Delete a recurring agent schedule.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an agent schedule","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"scheduleId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/agents/{agentId}/triggers":{"get":{"operationId":"listAgentTriggers","summary":"List agent triggers","description":"List the integration events configured to start runs of an agent.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List agent triggers","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"triggerName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"},"triggerDisplayName":{"type":"string","minLength":1,"maxLength":200},"integrationId":{"type":["string","null"],"format":"uuid"},"integrationType":{"type":["string","null"]},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["id","triggerName","enabledAt","createdAt","updatedAt","agentId","triggerDisplayName","integrationId","integrationType","filters"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]},"post":{"operationId":"createAgentTrigger","summary":"Create an agent trigger","description":"Configure an integration event to start agent runs. Available filters depend on the integration and event name.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an agent trigger","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"triggerName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"},"triggerDisplayName":{"type":"string","minLength":1,"maxLength":200},"integrationId":{"type":["string","null"],"format":"uuid"},"integrationType":{"type":["string","null"]},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["id","triggerName","enabledAt","createdAt","updatedAt","agentId","triggerDisplayName","integrationId","integrationType","filters"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Integration event name. Use listIntegrationTriggers to discover supported triggers."},"integrationType":{"type":"string","minLength":1,"maxLength":100,"description":"Provider type for the trigger, such as github or slack."},"integrationId":{"type":"string","format":"uuid","description":"Connected integration that supplies trigger events."},"filters":{"$ref":"#/components/schemas/TriggerFilters","description":"Event-specific trigger filters. Use retrieveIntegrationTrigger and listIntegrationTriggerFilterOptions to discover supported fields and values."}},"required":["name"],"additionalProperties":false}}}}}},"/v1/agents/{agentId}/triggers/{triggerId}":{"get":{"operationId":"retrieveAgentTrigger","summary":"Retrieve an agent trigger","description":"Retrieve an agent trigger and its integration event filters.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an agent trigger","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"triggerName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"},"triggerDisplayName":{"type":"string","minLength":1,"maxLength":200},"integrationId":{"type":["string","null"],"format":"uuid"},"integrationType":{"type":["string","null"]},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["id","triggerName","enabledAt","createdAt","updatedAt","agentId","triggerDisplayName","integrationId","integrationType","filters"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"triggerId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateAgentTrigger","summary":"Update an agent trigger","description":"Change an agent trigger event, integration, or filters. Use updateAgent with enabled to enable or pause the agent and its triggers.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an agent trigger","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"triggerName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"},"triggerDisplayName":{"type":"string","minLength":1,"maxLength":200},"integrationId":{"type":["string","null"],"format":"uuid"},"integrationType":{"type":["string","null"]},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["id","triggerName","enabledAt","createdAt","updatedAt","agentId","triggerDisplayName","integrationId","integrationType","filters"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"triggerId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Integration event name. Use listIntegrationTriggers to discover supported triggers."},"integrationId":{"type":"string","format":"uuid","description":"Connected integration that supplies trigger events."},"filters":{"$ref":"#/components/schemas/TriggerFilters","description":"Event-specific trigger filters. Use retrieveIntegrationTrigger and listIntegrationTriggerFilterOptions to discover supported fields and values."}},"required":["name"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteAgentTrigger","summary":"Delete an agent trigger","description":"Delete an integration event trigger for an agent.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an agent trigger","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string","format":"uuid"}},"required":["deleted","id"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"triggerId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/agents/{agentId}/runs":{"get":{"operationId":"listAgentRuns","summary":"List agent runs","description":"List executions of an agent, including status, linked session, measured duration, and failure summary.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List agent runs","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]},"post":{"operationId":"createAgentRun","summary":"Create an agent run","description":"Queue an agent run. The entire JSON object body is passed to the agent as event input; no eventPayload wrapper is needed. Omit the body to run without event input. The response confirms queuing, not completed execution, and includes the run ID to poll for its status and session.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an agent run","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"runId":{"type":"string","format":"uuid","description":"ID of the agent run. Retrieve it with GET /v1/agents/{agentId}/runs/{runId}; its sessionId is set once the run starts its session."},"agentId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"}},"required":["jobId","runId","agentId","status"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The workspace requires a linked GitHub account to run agents","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunEventPayload"}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/agents/{agentId}/runs/{runId}":{"get":{"operationId":"retrieveAgentRun","summary":"Retrieve an agent run","description":"Retrieve the status, linked session, measured duration, and failure summary of an agent run.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an agent run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":["string","null"]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","description":"Measured duration of the agent run in milliseconds."},"errorMessage":{"type":["string","null"]}},"required":["id","sessionId","status","createdAt","updatedAt","durationMs","errorMessage"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Agent operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"agentId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"runId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/repositories":{"get":{"operationId":"listRepositories","summary":"List repositories","description":"List repositories in the authenticated organization. Defaults to enabled repositories.","tags":["Repositories"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List repositories","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"baseBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"provider":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":500},"integrationId":{"type":"string","format":"uuid"},"type":{"type":"string","minLength":1,"maxLength":100}},"required":["displayName","integrationId","type"],"additionalProperties":false},"targetBranch":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"url":{"type":"string"}},"required":["baseBranch","createdAt","description","enabledAt","id","name","owner","provider","targetBranch","updatedAt","url"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Provider authorization failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Repository, integration, or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Repository conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Repository operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Repository provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Repository provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"enabled","schema":{"type":"string","enum":["all","true","false"],"default":"all"},"description":"Select enabled repositories, disabled repositories, or all. The public API defaults to enabled repositories."},{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100},"description":"Filter by repository IDs, supplied as a comma-separated list."},{"in":"query","name":"integrationId","schema":{"type":"string","format":"uuid"},"description":"Filter repositories belonging to this integration."},{"in":"query","name":"order","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort direction: ascending or descending."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":500},"description":"Search repository names and owners."},{"in":"query","name":"sort","schema":{"type":"string","enum":["createdAt","integration","name","pullRequests","updatedAt"],"default":"pullRequests"},"description":"Sort by creation time, integration, name, pull request count, or update time."}]}},"/v1/repositories/{repositoryId}":{"get":{"operationId":"retrieveRepository","summary":"Retrieve a repository","description":"Retrieve a repository in the authenticated organization.","tags":["Repositories"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve a repository","content":{"application/json":{"schema":{"type":"object","properties":{"baseBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"provider":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":500},"integrationId":{"type":"string","format":"uuid"},"type":{"type":"string","minLength":1,"maxLength":100}},"required":["displayName","integrationId","type"],"additionalProperties":false},"targetBranch":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"url":{"type":"string"}},"required":["baseBranch","createdAt","description","enabledAt","id","name","owner","provider","targetBranch","updatedAt","url"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Provider authorization failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Repository, integration, or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Repository conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Repository operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Repository provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Repository provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"repositoryId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateRepository","summary":"Update a repository","description":"Update repository configuration or enable or disable it.","tags":["Repositories"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update a repository","content":{"application/json":{"schema":{"type":"object","properties":{"baseBranch":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":["string","null"]},"provider":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":500},"integrationId":{"type":"string","format":"uuid"},"type":{"type":"string","minLength":1,"maxLength":100}},"required":["displayName","integrationId","type"],"additionalProperties":false},"targetBranch":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"url":{"type":"string"}},"required":["baseBranch","createdAt","description","enabledAt","id","name","owner","provider","targetBranch","updatedAt","url"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing required organization or user information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Provider authorization failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Repository, integration, or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Repository conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Repository operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Repository provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Repository provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"repositoryId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Enable or disable this repository for Tembo. Disabled by default on creation."},"baseBranch":{"type":["string","null"],"minLength":1,"maxLength":1024,"description":"Default Git branch to start sessions from. Null clears the override."},"targetBranch":{"type":["string","null"],"minLength":1,"maxLength":1024,"description":"Default target branch for agent-created pull requests. Null clears the override."}},"additionalProperties":false}}}}}},"/v1/integrations":{"get":{"operationId":"listIntegrations","summary":"List integrations","description":"List integrations visible to the current organization or authenticated admin.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List integrations","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"displayName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"repositoryCount":{"type":"integer","minimum":0},"sourceCount":{"type":"integer","minimum":0},"type":{"type":"string","minLength":1,"maxLength":100},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","displayName","enabledAt","id","lastSyncedAt","repositoryCount","sourceCount","type","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"format":"uuid"},"totalCount":{"type":"integer","minimum":0}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"enabled","schema":{"type":"boolean"},"description":"Filter by whether integrations are enabled."},{"in":"query","name":"hasEnabledRepositories","schema":{"type":"boolean"},"description":"Filter by whether integrations have enabled repositories."},{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100},"description":"Filter by integration IDs, supplied as a comma-separated list."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Search integration provider types and external IDs."},{"in":"query","name":"type","schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":18},"description":"Filter provider types, supplied as a comma-separated list."},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"},"description":"Only integrations created after this ISO 8601 timestamp."},{"in":"query","name":"excludeOrganizationName","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Exclude integrations belonging to the named organization within the caller access scope."},{"in":"query","name":"includeTotal","schema":{"type":"boolean","default":false},"description":"Include totalCount for matching integrations."}]},"post":{"operationId":"createIntegration","summary":"Create an integration","description":"Connect AWS, BigQuery, GitLab, PostgreSQL, Snyk, OpenConnect VPN, or Tailscale using provider credentials. For browser-authorized providers, use listIntegrationProviders and authorizeIntegration instead.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an integration","content":{"application/json":{"schema":{"type":"object","properties":{"integration":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"displayName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"repositoryCount":{"type":"integer","minimum":0},"sourceCount":{"type":"integer","minimum":0},"type":{"type":"string","minLength":1,"maxLength":100},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","displayName","enabledAt","id","lastSyncedAt","repositoryCount","sourceCount","type","updatedAt"],"additionalProperties":false},"sessionSourceId":{"type":["string","null"],"format":"uuid"}},"required":["integration","sessionSourceId"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"environment":{"type":"string","minLength":1,"maxLength":200,"description":"Display label for the AWS environment."},"roleArn":{"type":"string","minLength":1,"maxLength":2048,"description":"AWS IAM role ARN to assume for account access."},"type":{"type":"string","const":"aws","description":"Create an AWS account integration."}},"required":["environment","roleArn","type"],"additionalProperties":false},{"type":"object","properties":{"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$","description":"Google Cloud project ID for BigQuery."},"serviceAccountJson":{"type":"string","minLength":1,"maxLength":1000000,"description":"Google Cloud service-account JSON credentials for BigQuery."},"type":{"type":"string","const":"bigquery","description":"Create a BigQuery integration."}},"required":["projectId","serviceAccountJson","type"],"additionalProperties":false},{"type":"object","properties":{"accessToken":{"type":"string","minLength":1,"maxLength":65536,"description":"GitLab access token used to connect the integration."},"type":{"type":"string","const":"gitlab","description":"Create a GitLab integration."}},"required":["accessToken","type"],"additionalProperties":false},{"type":"object","properties":{"gateway":{"type":"string","minLength":1,"maxLength":2048,"description":"VPN gateway hostname or URL for OpenConnect."},"instanceName":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the VPN connection."},"password":{"type":"string","minLength":1,"maxLength":65536,"description":"VPN login password."},"protocol":{"type":"string","enum":["fortinet","anyconnect","gp","nc"],"description":"OpenConnect VPN protocol supported by the gateway."},"type":{"type":"string","const":"openconnect","description":"Create an OpenConnect VPN integration."},"username":{"type":"string","minLength":1,"maxLength":4096,"description":"VPN login username."}},"required":["gateway","instanceName","password","protocol","type","username"],"additionalProperties":false},{"type":"object","properties":{"caCertificate":{"type":"string","maxLength":1000000,"description":"Optional CA certificate for the PostgreSQL TLS connection."},"connectionString":{"type":"string","minLength":1,"maxLength":16384,"description":"PostgreSQL connection URI, including credentials. Stored as secret configuration."},"instanceName":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the PostgreSQL instance."},"type":{"type":"string","const":"postgres","description":"Create a PostgreSQL integration."}},"required":["connectionString","instanceName","type"],"additionalProperties":false},{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":16384,"description":"Snyk service-account client ID."},"clientSecret":{"type":"string","minLength":1,"maxLength":65536,"description":"Snyk service-account client secret."},"organizationId":{"type":"string","format":"uuid","description":"Snyk organization ID, not a Tembo organization ID. Discover choices with discoverSnykOrganizations."},"organizationName":{"type":"string","minLength":1,"maxLength":500,"description":"Optional display name for the Snyk organization."},"type":{"type":"string","const":"snyk","description":"Create a Snyk integration."}},"required":["clientId","clientSecret","organizationId","type"],"additionalProperties":false},{"type":"object","properties":{"instanceName":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the Tailscale connection."},"oauthClientId":{"type":"string","minLength":1,"maxLength":16384,"description":"Tailscale OAuth client ID authorized to create tagged devices."},"oauthClientSecret":{"type":"string","minLength":1,"maxLength":65536,"description":"Tailscale OAuth client secret."},"tags":{"type":"array","items":{"type":"string","pattern":"^tag:[a-z0-9][a-z0-9-]*$"},"minItems":1,"maxItems":100,"description":"Tags to assign to connected devices, such as tag:tembo. Must be authorized for the OAuth client."},"tailnet":{"type":"string","minLength":1,"maxLength":500,"default":"-","description":"Tailnet name. The default - uses the OAuth client tailnet."},"type":{"type":"string","const":"tailscale","description":"Create a Tailscale private-network integration."}},"required":["instanceName","oauthClientId","oauthClientSecret","tags","type"],"additionalProperties":false}]}}}}}},"/v1/integrations/sync":{"post":{"operationId":"syncIntegrations","summary":"Sync eligible integrations","description":"Queue integration and pull-request sync jobs for integrations with enabled repositories.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Sync eligible integrations","content":{"application/json":{"schema":{"type":"object","properties":{"eligibleIntegrationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"integrationSyncJobCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"pullRequestSyncJobCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["eligibleIntegrationCount","integrationSyncJobCount","pullRequestSyncJobCount"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}}}},"/v1/integrations/sync/status":{"get":{"operationId":"retrieveIntegrationSyncStatus","summary":"Retrieve integration sync status","description":"Count active sync jobs for an integration or eligible integrations.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve integration sync status","content":{"application/json":{"schema":{"type":"object","properties":{"hasActiveJobs":{"type":"boolean"},"eligibleIntegrationCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["hasActiveJobs","eligibleIntegrationCount"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"integrationId","schema":{"type":"string","format":"uuid"}}]}},"/v1/integrations/providers":{"get":{"operationId":"listIntegrationProviders","summary":"List integration providers","description":"List providers available to the current organization.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List integration providers","content":{"application/json":{"schema":{"type":"object","properties":{"installedCounts":{"type":"object","properties":{"github":{"type":"integer","minimum":0},"gitlab":{"type":"integer","minimum":0},"bitbucket":{"type":"integer","minimum":0},"atlassian":{"type":"integer","minimum":0},"linear":{"type":"integer","minimum":0},"slack":{"type":"integer","minimum":0},"sentry":{"type":"integer","minimum":0},"aws":{"type":"integer","minimum":0},"agent":{"type":"integer","minimum":0},"notion":{"type":"integer","minimum":0},"postgres":{"type":"integer","minimum":0},"bigquery":{"type":"integer","minimum":0},"azure":{"type":"integer","minimum":0},"ms-teams":{"type":"integer","minimum":0},"snyk":{"type":"integer","minimum":0},"hubspot":{"type":"integer","minimum":0},"openconnect":{"type":"integer","minimum":0},"tailscale":{"type":"integer","minimum":0}},"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"authorizeUrl":{"type":"string","maxLength":8192},"category":{"type":"string","maxLength":200},"comingSoon":{"type":"boolean"},"description":{"type":"string","maxLength":4096},"displayName":{"type":"string","maxLength":500},"installed":{"type":"boolean"},"integrationType":{"type":"string","enum":["github","gitlab","bitbucket","atlassian","linear","slack","sentry","aws","agent","notion","postgres","bigquery","azure","ms-teams","snyk","hubspot","openconnect","tailscale"]},"isOAuth":{"type":"boolean"},"name":{"type":"string","maxLength":500},"oidcIssuerHost":{"type":"string","maxLength":2048},"redirectUrl":{"type":"string","maxLength":8192},"templateUrl":{"type":"string","maxLength":8192}},"required":["authorizeUrl","category","comingSoon","description","displayName","installed","integrationType","isOAuth","name"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":["string","null"],"pattern":"^\\d+$","maxLength":10}},"required":["installedCounts","items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$","maxLength":10},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"returnUrl","schema":{"type":"string","format":"uri","maxLength":8192},"description":"URL to return to after provider authorization. Must use HTTPS or localhost HTTP."}]}},"/v1/integrations/triggers":{"get":{"operationId":"listIntegrationTriggers","summary":"List integration triggers","description":"List visible automation triggers grouped by provider.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List integration triggers","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"integrationType":{"type":"string","enum":["github","gitlab","bitbucket","atlassian","linear","slack","sentry","aws","agent","notion","postgres","bigquery","azure","ms-teams","snyk","hubspot","openconnect","tailscale"]},"triggers":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":4096},"displayName":{"type":"string","maxLength":500},"filters":{"type":"object","properties":{"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"oneOf":[{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"type":{"type":"string","const":"boolean"},"default":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"enum":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":100},"type":{"type":"string","const":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"items":{"type":"object","properties":{"enum":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":100},"type":{"type":"string","const":"string"}},"required":["type"],"additionalProperties":false},"type":{"type":"string","const":"array"}},"required":["items","type"],"additionalProperties":false}]}}},"required":["properties"],"additionalProperties":false},"hasFilterOptions":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":500}},"required":["description","displayName","hasFilterOptions","name"],"additionalProperties":false},"maxItems":100}},"required":["integrationType","triggers"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":["string","null"],"pattern":"^\\d+$","maxLength":10}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$","maxLength":10},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/integrations/{integrationId}/triggers/{triggerName}":{"get":{"operationId":"retrieveIntegrationTrigger","summary":"Retrieve an integration trigger","description":"Retrieve a trigger definition and its default filter values for an integration in the current organization.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an integration trigger","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","maxLength":4096},"displayName":{"type":"string","maxLength":500},"filters":{"type":"object","properties":{"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"oneOf":[{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"type":{"type":"string","const":"boolean"},"default":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"enum":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":100},"type":{"type":"string","const":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"items":{"type":"object","properties":{"enum":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":100},"type":{"type":"string","const":"string"}},"required":["type"],"additionalProperties":false},"type":{"type":"string","const":"array"}},"required":["items","type"],"additionalProperties":false}]}}},"required":["properties"],"additionalProperties":false},"hasFilterOptions":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":500},"integrationId":{"type":"string","format":"uuid"},"integrationType":{"type":"string","enum":["github","gitlab","bitbucket","atlassian","linear","slack","sentry","aws","agent","notion","postgres","bigquery","azure","ms-teams","snyk","hubspot","openconnect","tailscale"]},"defaultFilters":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":500},"maxItems":10000}]}}},"required":["description","displayName","hasFilterOptions","name","integrationId","integrationType","defaultFilters"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"triggerName","schema":{"type":"string","minLength":1,"maxLength":500},"required":true}]}},"/v1/integrations/{integrationId}/triggers/{triggerName}/filter-options/{field}":{"get":{"operationId":"listIntegrationTriggerFilterOptions","summary":"List integration trigger filter options","description":"List one cursor-page of selectable values for an integration trigger filter field, with optional search.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List integration trigger filter options","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","maxLength":500},"label":{"type":"string","maxLength":500}},"required":["value","label"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":8192}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"triggerName","schema":{"type":"string","minLength":1,"maxLength":500},"required":true},{"in":"path","name":"field","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Search selectable values for this integration trigger filter."}]}},"/v1/integrations/providers/snyk/organizations":{"post":{"operationId":"discoverSnykOrganizations","summary":"Discover Snyk organizations","description":"Validate Snyk service-account credentials and list accessible organizations.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Discover Snyk organizations","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]}},"required":["id","name","slug"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":2048}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":16384,"description":"Snyk service-account client ID to validate and use for organization discovery."},"clientSecret":{"type":"string","minLength":1,"maxLength":65536,"description":"Snyk service-account client secret. Used for discovery without saving an integration."},"cursor":{"type":"string","minLength":1,"maxLength":2048,"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}},"required":["clientId","clientSecret"],"additionalProperties":false}}}}}},"/v1/integrations/{integrationId}":{"get":{"operationId":"retrieveIntegration","summary":"Retrieve an integration","description":"Retrieve an integration and its configuration.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an integration","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"displayName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"repositoryCount":{"type":"integer","minimum":0},"sourceCount":{"type":"integer","minimum":0},"type":{"type":"string","minLength":1,"maxLength":100},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","displayName","enabledAt","id","lastSyncedAt","repositoryCount","sourceCount","type","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true}]},"patch":{"operationId":"updateIntegration","summary":"Update an integration","description":"Update integration settings such as the default repository, Slack channel restrictions, automatic solving, or Sentry environments; replace AWS or PostgreSQL configuration; rotate GitLab service account access tokens; set or remove Atlassian service-account credentials.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update an integration","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"displayName":{"type":"string"},"enabledAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"repositoryCount":{"type":"integer","minimum":0},"sourceCount":{"type":"integer","minimum":0},"type":{"type":"string","minLength":1,"maxLength":100},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","displayName","enabledAt","id","lastSyncedAt","repositoryCount","sourceCount","type","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"settings":{"type":"object","properties":{"defaultRepositoryId":{"type":["string","null"],"format":"uuid"},"disallowedSlackChannelIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":1000},"instantSolve":{"type":"boolean"},"sentryEnvironments":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":1000}},"additionalProperties":false,"description":"Update integration settings, preserving unspecified settings."}},"required":["settings"],"additionalProperties":false},{"type":"object","properties":{"aws":{"type":"object","properties":{"environment":{"type":"string","minLength":1,"maxLength":200,"description":"Display label for the AWS environment."},"roleArn":{"type":"string","minLength":1,"maxLength":2048,"description":"AWS IAM role ARN to assume for account access."}},"required":["environment","roleArn"],"additionalProperties":false,"description":"Replace AWS environment and assumed-role configuration."}},"required":["aws"],"additionalProperties":false},{"type":"object","properties":{"postgres":{"type":"object","properties":{"caCertificate":{"type":"string","maxLength":1000000,"description":"Optional CA certificate for the PostgreSQL TLS connection."},"connectionString":{"type":"string","minLength":1,"maxLength":16384,"description":"PostgreSQL connection URI, including credentials. Stored as secret configuration."},"instanceName":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the PostgreSQL instance."}},"required":["connectionString","instanceName"],"additionalProperties":false,"description":"Replace PostgreSQL connection configuration."}},"required":["postgres"],"additionalProperties":false},{"type":"object","properties":{"gitlab":{"type":"object","properties":{"accessToken":{"type":"string","minLength":1,"maxLength":65536,"description":"GitLab access token used to connect the integration."}},"required":["accessToken"],"additionalProperties":false,"description":"Replace GitLab credentials with a service account access token, keeping repositories and projects connected."}},"required":["gitlab"],"additionalProperties":false},{"type":"object","properties":{"atlassianServiceAccount":{"type":["object","null"],"properties":{"clientId":{"type":"string","minLength":1,"maxLength":4096},"clientSecret":{"type":"string","minLength":1,"maxLength":65536}},"required":["clientId","clientSecret"],"additionalProperties":false,"description":"Set Atlassian service-account OAuth credentials for triggers, or null to remove them."}},"required":["atlassianServiceAccount"],"additionalProperties":false}]}}}}},"delete":{"operationId":"deleteIntegration","summary":"Delete an integration","description":"Uninstall an integration from its provider when supported, then delete it from Tembo.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete an integration","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/integrations/{integrationId}/authorize":{"post":{"operationId":"authorizeIntegration","summary":"Authorize an integration","description":"Return the provider authorization URL for an integration.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Authorize an integration","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"}},"required":["authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"returnUrl","schema":{"type":"string","format":"uri","maxLength":8192},"description":"URL to return to after provider authorization. Must use HTTPS or localhost HTTP."},{"in":"query","name":"capability","schema":{"type":"string","const":"confluenceTriggers"},"description":"Request authorization for Confluence automation triggers instead of the default integration capability."}]}},"/v1/integrations/{integrationId}/test":{"post":{"operationId":"testIntegration","summary":"Test an integration","description":"Test the saved provider connection.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Test an integration","content":{"application/json":{"schema":{"type":"object","properties":{"healthy":{"type":"boolean"},"message":{"type":"string"}},"required":["healthy","message"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/integrations/{integrationId}/sync":{"post":{"operationId":"syncIntegration","summary":"Sync an integration","description":"Queue or immediately perform an integration sync.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Sync an integration","content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string","format":"uuid"},"jobId":{"type":["string","null"]},"mode":{"type":"string","enum":["immediate","queued"]}},"required":["integrationId","jobId","mode"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["immediate","queued"],"default":"queued","description":"queued schedules a background integration sync; immediate performs the sync in this request."}},"additionalProperties":false}}}}}},"/v1/integrations/{integrationId}/rate-limit":{"get":{"operationId":"retrieveIntegrationRateLimit","summary":"Retrieve an integration rate limit","description":"Retrieve the GitHub installation rate-limit state.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve an integration rate limit","content":{"application/json":{"schema":{"type":"object","properties":{"core":{"type":"object","properties":{"limit":{"type":"number"},"remaining":{"type":"number"},"resetAt":{"type":"string","format":"date-time"},"used":{"type":"number"}},"required":["limit","remaining","resetAt","used"],"additionalProperties":false},"graphql":{"type":"object","properties":{"limit":{"type":"number"},"remaining":{"type":"number"},"resetAt":{"type":"string","format":"date-time"},"used":{"type":"number"}},"required":["limit","remaining","resetAt","used"],"additionalProperties":false},"search":{"type":"object","properties":{"limit":{"type":"number"},"remaining":{"type":"number"},"resetAt":{"type":"string","format":"date-time"},"used":{"type":"number"}},"required":["limit","remaining","resetAt","used"],"additionalProperties":false}},"required":["core","graphql","search"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true}]}},"/v1/integrations/{integrationId}/sentry-environments":{"get":{"operationId":"listIntegrationSentryEnvironments","summary":"List Sentry environments","description":"List environments visible to a Sentry integration.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List Sentry environments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string","maxLength":255},"maxItems":100},"nextCursor":{"type":["string","null"],"pattern":"^\\d+$","maxLength":10}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$","maxLength":10},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."}]}},"/v1/integrations/{integrationId}/slack-channels":{"get":{"operationId":"listIntegrationSlackChannels","summary":"List Slack channels","description":"List channels visible to a Slack integration.","tags":["Integrations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List Slack channels","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":["string","null"],"pattern":"^\\d+$","maxLength":10}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Provider authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The caller cannot perform this operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Integration, trigger, or filter field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Integration conflict or unsupported operation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Integration operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Integration provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Requested integration capability is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Integration provider operation timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"integrationId","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$","maxLength":10},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Search Slack channel names."}]}},"/v1/billing":{"get":{"operationId":"retrieveBilling","summary":"Retrieve billing","description":"Retrieve billing and credit information for the organization.","tags":["Billing"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve billing","content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"object","properties":{"state":{"type":"string","enum":["blocked","trial","paid"]},"canExecute":{"type":"boolean"},"blockedReason":{"type":["string","null"],"enum":["awaiting_demo","trial_expired","trial_allowance_exhausted","subscription_ended",null],"default":null}},"required":["state","canExecute","blockedReason"]},"trial":{"type":["object","null"],"properties":{"status":{"type":"string","const":"Trialing"},"startedAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allowance":{"type":"number"},"remainingAllowance":{"type":"number"},"purchasedCredits":{"type":"number"},"exhausted":{"type":"boolean"},"managedInferenceAllowance":{"type":["number","null"]},"remainingManagedInference":{"type":["number","null"]},"managedInferenceExhausted":{"type":"boolean"}},"required":["status","startedAt","endsAt","allowance","remainingAllowance","purchasedCredits","exhausted","managedInferenceAllowance","remainingManagedInference","managedInferenceExhausted"],"default":null},"billingEnabled":{"type":"boolean"},"availablePlans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"title":{"type":"string","maxLength":255},"tier":{"type":"integer","minimum":0},"description":{"type":"string","maxLength":2000},"includedCredits":{"type":"number","minimum":0},"monthlyPrice":{"type":"number","minimum":0},"yearlyPrice":{"type":["number","null"],"minimum":0}},"required":["id","title","tier","description","includedCredits","monthlyPrice","yearlyPrice"],"additionalProperties":false},"maxItems":20},"balance":{"type":"object","properties":{"calculatedBalance":{"type":"number"},"availableBalance":{"type":"number"},"availableOnDemandUsage":{"type":"number"},"lastTransaction":{"type":["object","null"],"properties":{"amount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["amount","createdAt"],"additionalProperties":false},"unlimitedCredits":{"type":"boolean"}},"required":["calculatedBalance","availableBalance","availableOnDemandUsage","lastTransaction","unlimitedCredits"],"additionalProperties":false},"onDemand":{"type":"object","properties":{"enabled":{"type":"boolean"},"currentUsage":{"type":"number"},"maxCreditUsage":{"type":"number","minimum":0}},"required":["enabled","currentUsage","maxCreditUsage"],"additionalProperties":false},"subscription":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["Active","PastDue","Unpaid","Canceled","Trialing","Incomplete","IncompleteExpired"]},"canceledAt":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","const":"paid"},"plan":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":255},"title":{"type":"string","maxLength":255},"tier":{"type":"integer","minimum":0},"description":{"type":"string","maxLength":2000},"includedCredits":{"type":"number","minimum":0},"monthlyPrice":{"type":"number","minimum":0},"yearlyPrice":{"type":["number","null"],"minimum":0}},"required":["id","title","tier","description","includedCredits","monthlyPrice","yearlyPrice"],"additionalProperties":false},"currentTier":{"type":"integer","minimum":0},"upgradablePlans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"title":{"type":"string","maxLength":255},"tier":{"type":"integer","minimum":0},"description":{"type":"string","maxLength":2000},"includedCredits":{"type":"number","minimum":0},"monthlyPrice":{"type":"number","minimum":0},"yearlyPrice":{"type":["number","null"],"minimum":0}},"required":["id","title","tier","description","includedCredits","monthlyPrice","yearlyPrice"],"additionalProperties":false},"maxItems":20}},"required":["status","canceledAt","periodEnd","type","plan","currentTier","upgradablePlans"],"additionalProperties":false}},"required":["access","trial","billingEnabled","availablePlans","balance","onDemand","subscription"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization billing information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Billing resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Billing operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Billing provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/usage":{"get":{"operationId":"listBillingUsage","summary":"List billing usage","description":"List session usage by default, or include warm pool compute with the type filter. Uses cursor pagination.","tags":["Billing"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List billing usage","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"agent":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":255},"title":{"type":"string"},"kind":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"managedInferenceCredits":{"type":"number","minimum":0},"computeCredits":{"type":"number","minimum":0},"totalCredits":{"type":"number","minimum":0},"type":{"type":"string","const":"session"}},"required":["agent","id","title","kind","createdAt","managedInferenceCredits","computeCredits","totalCredits","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255},"virtualMachineId":{"type":"string","minLength":1,"maxLength":255},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"runtimeMs":{"type":"number","minimum":0},"cpu":{"type":"number"},"memoryMb":{"type":"number"},"computeCredits":{"type":"number","minimum":0},"type":{"type":"string","const":"warm-pool"}},"required":["id","virtualMachineId","startedAt","endedAt","runtimeMs","cpu","memoryMb","computeCredits","type"],"additionalProperties":false}]},"maxItems":100},"nextCursor":{"type":["string","null"],"maxLength":2048},"asOf":{"type":"string","format":"date-time"}},"required":["items","nextCursor","asOf"],"additionalProperties":false}}}},"400":{"description":"Invalid request or missing organization billing information.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Billing resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Billing operation conflicts with its current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Billing provider operation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":2048},"description":"Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Maximum number of items to return in one page. Use nextCursor from the response to fetch more items."},{"in":"query","name":"type","schema":{"type":"string","enum":["all","sessions","warm-pool"]},"description":"Usage types to include. Defaults to sessions for backwards compatibility."},{"in":"query","name":"sessionId","schema":{"type":"string","minLength":1,"maxLength":255},"description":"Filter billing usage to this session."},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"},"description":"Include sessions created or warm pool runtime at or after this ISO 8601 timestamp."},{"in":"query","name":"createdBefore","schema":{"type":"string","format":"date-time"},"description":"Include sessions created or warm pool runtime before this ISO 8601 timestamp."},{"in":"query","name":"createdBy","schema":{"type":"array","items":{"type":"string","minLength":1}},"description":"Filter by creator IDs, supplied as a comma-separated list."},{"in":"query","name":"models","schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"description":"Filter by model names, supplied as a comma-separated list."},{"in":"query","name":"agentIds","schema":{"type":"array","items":{"type":"string","format":"uuid"}},"description":"Filter by the agents that created sessions, supplied as a comma-separated list of agent IDs."}]}}}}