{"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"]},"speed":{"type":"string","enum":["normal","fast"]},"goal":{"type":"object","properties":{"enabled":{"type":"boolean"},"objective":{"type":"string","maxLength":100000}},"additionalProperties":false}},"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"]},"speed":{"type":"string","enum":["normal","fast"]},"goal":{"type":"object","properties":{"enabled":{"type":"boolean"},"objective":{"type":"string","maxLength":100000}},"additionalProperties":false}},"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/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/GitlabMergeRequestClosedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestMergedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestOpenedFilters"}],"additionalProperties":{}},{"allOf":[{"$ref":"#/components/schemas/GitlabMergeRequestUpdatedFilters"}],"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"}}},"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":{"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","description":"Enable agent for Tembo-created pull requests (disabled 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","description":"Enable agent for Tembo-created pull requests (disabled 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","description":"Enable agent for Tembo-created pull requests (disabled 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","description":"Enable agent for Tembo-created pull requests (disabled 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","description":"Enable agent for Tembo-created pull requests (disabled 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)"}}},"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)"}}},"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."},"AgentRunMetadata":{"type":"object","additionalProperties":{},"description":"Additional metadata associated with the agent run."},"AgentRunFailure":{"anyOf":[{"$ref":"#/components/schemas/AgentRunFailureDetails"},{"$ref":"#/components/schemas/AgentRunFailureObject"},{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"null"}]},"AgentRunFailureDetails":{"type":"object","properties":{"error":{"anyOf":[{"$ref":"#/components/schemas/SerializedAgentRunError"},{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}}]},"sentryErrorId":{"type":"string"}},"additionalProperties":true},"SerializedAgentRunError":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"stack":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"number"}]},"cause":{}},"additionalProperties":true},"AgentRunFailureObject":{"type":"object","additionalProperties":{},"description":"Details of an agent run failure, including runtime-specific error fields."}}},"paths":{"/session/create":{"post":{"operationId":"createSessionCompatibility","summary":"Create a session","description":"Create a session. For new integrations, use POST /v1/sessions.","tags":["public-api"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Session created successfully","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"},"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"},"pullRequest":{"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"},"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},"metadata":{"type":"object","properties":{"baseBranch":{"type":"string","maxLength":500},"headSha":{"type":"string","maxLength":200},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","format":"uri"},"login":{"type":"string","maxLength":500}}}}}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","codeRepository","metadata"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequest"],"additionalProperties":false}},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"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","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","description","diffSummary","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":1000000},"description":{"type":"string","minLength":1,"maxLength":1000000},"queueRightAway":{"type":"boolean"},"repositories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100},"codeRepoIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100},"targetBranch":{"type":["string","null"],"minLength":1,"maxLength":500},"baseBranch":{"type":["string","null"],"minLength":1,"maxLength":500},"branchName":{"type":["string","null"],"minLength":1,"maxLength":500},"agent":{"type":"string","minLength":1,"maxLength":500},"agentOptions":{"type":"object","additionalProperties":{}}}}}}}}},"/session/{sessionId}/messages":{"post":{"operationId":"createSessionMessageCompatibility","summary":"Create a session message","description":"Create and deliver a session message. For new integrations, use POST /v1/messages.","tags":["Messages"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Create a session message","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"isQueued":{"type":"boolean"}},"required":["id","content","createdAt","isQueued"],"additionalProperties":false},"job":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"task":{"type":"string"}},"required":["id","task"],"additionalProperties":false},"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},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"required":["message","job","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}}}},"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":"sessionId","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":1000000},"jsonContent":{"type":"string"},"artifactId":{"type":"string","format":"uuid"},"pullRequestId":{"type":"string","format":"uuid"},"mcpServers":{"type":"array","items":{"type":"string"}},"agentOptions":{"type":"object","additionalProperties":{}},"deliveryMode":{"type":"string","enum":["queue","steer"]},"slashCommand":{"type":"object","properties":{"command":{"type":"string","minLength":1},"arguments":{"type":"string"}},"required":["command"]}},"required":["content"]}}}}}},"/session/list":{"get":{"operationId":"listSessionsCompatibility","summary":"List sessions","description":"List sessions. For new integrations, use GET /v1/sessions.","tags":["public-api"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Sessions retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"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"},"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"},"pullRequest":{"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"},"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},"metadata":{"type":"object","properties":{"baseBranch":{"type":"string","maxLength":500},"headSha":{"type":"string","maxLength":200},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","format":"uri"},"login":{"type":"string","maxLength":500}}}}}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","codeRepository","metadata"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequest"],"additionalProperties":false}},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"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","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","description","diffSummary","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}},"meta":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"currentPage":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0},"hasNext":{"type":"boolean"},"hasPrevious":{"type":"boolean"}},"required":["totalCount","totalPages","currentPage","pageSize","hasNext","hasPrevious"],"additionalProperties":false}},"required":["sessions","meta"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}}]}},"/session/search":{"get":{"operationId":"searchSessionsCompatibility","summary":"Search sessions","description":"Search sessions. For new integrations, use the filters on GET /v1/sessions.","tags":["public-api"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Session search completed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"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"},"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"},"pullRequest":{"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"},"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},"metadata":{"type":"object","properties":{"baseBranch":{"type":"string","maxLength":500},"headSha":{"type":"string","maxLength":200},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","format":"uri"},"login":{"type":"string","maxLength":500}}}}}},"required":["id","url","title","status","isDraft","sourceBranch","createdAt","agent","diff","updatedAt","codeRepository","metadata"],"additionalProperties":false}}},"required":["id","type","createdAt","updatedAt","pullRequest"],"additionalProperties":false}},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"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","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","description","diffSummary","htmlUrl","isPinned","project","sessionSource","sourcePullRequest","state"],"additionalProperties":false}},"meta":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"currentPage":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0},"hasNext":{"type":"boolean"},"hasPrevious":{"type":"boolean"}},"required":["totalCount","totalPages","currentPage","pageSize","hasNext","hasPrevious"],"additionalProperties":false},"query":{"type":"string"}},"required":["sessions","meta","query"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":1000},"required":true}]}},"/session/{sessionId}/stop":{"post":{"operationId":"stopSessionCompatibility","summary":"Stop a session","description":"Stop active session work. For new integrations, use POST /v1/sessions/{sessionId}/stop.","tags":["public-api"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Session stopped successfully"},"404":{"description":"Session not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"sessionId","required":true}]}},"/repository/list":{"get":{"operationId":"getPublic-apiRepositoryList","description":"List enabled repositories for the organization. For new integrations, use GET /v1/repositories.","tags":["public-api"],"summary":"List repositories","responses":{"200":{"description":"Enabled repositories retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"codeRepositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the code repository","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Name of the repository","example":"my-awesome-project"},"url":{"type":"string","format":"uri","description":"Repository URL","example":"https://github.com/username/my-awesome-project"},"branch":{"type":"string","description":"Default branch name","example":"main"},"description":{"type":"string","description":"Repository description","example":"An awesome web application built with React"},"enabledAt":{"type":"string","format":"date-time","description":"Timestamp when the repository was enabled","example":"2023-12-01T10:30:00.000Z"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the repository was added to Tembo.","example":"2023-12-01T09:15:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the repository configuration was last updated.","example":"2023-12-01T11:45:00.000Z"},"organizationId":{"type":"string","format":"uuid","description":"ID of the organization that owns this repository.","example":"456e7890-e89b-12d3-a456-426614174001"},"integration":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the integration","example":"123e4567-e89b-12d3-a456-426614174000"},"type":{"type":"string","description":"Integration provider, such as github or gitlab.","example":"github"},"name":{"type":"string","description":"Name of the integration","example":"GitHub Integration"},"configuration":{"type":"object","additionalProperties":{},"description":"Integration configuration settings"}},"required":["id","type","name","configuration"],"description":"Associated integration details"}},"required":["id","name","enabledAt","createdAt","updatedAt","organizationId"]},"description":"Array of enabled code repositories for the organization"}},"required":["codeRepositories"]}}}},"400":{"description":"An organization ID is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Organization ID is required"}},"required":["error"]}}}}}}},"/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":"Returns the user or service identity and organization associated with the supplied OAuth access token, API key, or agent credential. Agent requests must specify the organization in the X-Agent-Org-Id header.","tags":["Authentication"],"responses":{"200":{"description":"The authenticated principal and organization. OAuth responses also include the client, granted scopes, and token expiration.","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."}}}},"/agent":{"post":{"operationId":"postPublic-apiAgent","description":"Create an agent. For new integrations, use POST /v1/agents.","summary":"Create an agent","tags":["public-api"],"responses":{"200":{"description":"Agent created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"default":{}},"createdAt":{"type":"string","default":"2026-09-28T04:55:43.320Z"},"updatedAt":{"type":"string"},"name":{"type":"string"},"key":{"type":["string","null"]},"jsonContent":{"type":"null"},"agent":{"type":["string","null"]},"agentOptions":{"default":{}},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"projectId":{"type":["string","null"]},"mcpServers":{"type":"array","items":{"type":"string"}},"userState":{"default":{}},"templateId":{"type":["string","null"]},"script":{"type":["string","null"]},"archivedAt":{"type":["string","null"]},"enabledAt":{"type":["string","null"],"default":"2026-09-28T04:55:43.320Z"},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"autoDetectRepositories":{"type":"boolean","default":true},"createdBy":{"type":["string","null"]},"organizationId":{"type":"string"},"organization":{"type":"object","additionalProperties":{}},"codeRepositories":{"type":"array","items":{}},"runs":{"type":"array","items":{}},"configuredSessions":{"type":"array","items":{}},"eventLogs":{"type":"array","items":{}},"creditUsages":{"type":"array","items":{}}},"required":["id","metadata","createdAt","updatedAt","name","agentOptions","mcpServers","userState","autoDetectRepositories"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"jsonContent":{"$ref":"#/components/schemas/TipTapDocument"},"mcpServers":{"type":"array","items":{"type":"string"}},"agent":{"type":"string"},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"integrationId":{"type":"string"},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["name","integrationId"]}},"schedules":{"type":"array","items":{"type":"object","properties":{"cron":{"type":"string"}},"required":["cron"]}}},"required":["name","jsonContent"]}}}}}},"/agent/{keyOrId}/trigger":{"post":{"operationId":"postPublic-apiAgentByKeyOrIdTrigger","description":"Queue an agent run. For new integrations, use POST /v1/agents/{agentId}/runs.","summary":"Trigger an agent","tags":["public-api"],"responses":{"200":{"description":"Agent run queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"metadata":{"$ref":"#/components/schemas/AgentRunMetadata"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"task":{"type":"string","const":"run_agent"},"data":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"type":{"type":"string","const":"trigger"},"payload":{"type":"object","properties":{"eventPayload":{"$ref":"#/components/schemas/AgentRunEventPayload"}},"required":["eventPayload"],"additionalProperties":false},"triggerName":{"type":"string","const":"webhook"},"vmId":{"type":"string"},"hostId":{"type":["string","null"]},"preferredHostId":{"type":"string"}},"required":["agentId","type","payload","triggerName"],"additionalProperties":false},"priority":{"type":"integer"},"visibleAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"},"cancelledAt":{"type":["string","null"],"format":"date-time"},"heartbeatAt":{"type":["string","null"],"format":"date-time"},"readCount":{"type":"integer","minimum":0},"durationMs":{"type":["integer","null"],"minimum":0},"failReason":{"$ref":"#/components/schemas/AgentRunFailure"},"organizationId":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["id","metadata","createdAt","updatedAt","task","data","priority","visibleAt","startedAt","completedAt","cancelledAt","heartbeatAt","readCount","durationMs","failReason","organizationId"],"additionalProperties":false}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"keyOrId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunEventPayload"}}}}}},"/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"},"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","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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]},"post":{"operationId":"createApiKey","summary":"Create an API key","description":"Create an API key for the current organization. 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"},"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","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":{"name":{"type":"string","minLength":1,"maxLength":100}},"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"},"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","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"},"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","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}},"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/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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"names","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"in":"query","name":"repositoryIds","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"}}],"default":[]}},{"in":"query","name":"search","schema":{"type":"string","minLength":1}},{"in":"query","name":"source","schema":{"type":"string","enum":["organization","repository"],"default":"organization"}}]},"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"},"filename":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["content","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"},"name":{"type":"string","minLength":1},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"filename":{"type":"string","minLength":1}},"required":["content","filename"],"additionalProperties":false},"minItems":1}},"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"},"filename":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["content","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"},"filename":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["content","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"},"name":{"type":"string","minLength":1},"files":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"filename":{"type":"string","minLength":1}},"required":["content","filename"],"additionalProperties":false},"minItems":1}},"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":{"summary":{"type":"object","properties":{"tasksCompleted":{"type":"integer"},"prsCreated":{"type":"integer"},"prsMerged":{"type":"integer"},"temboContribution":{"type":"number"},"changes":{"type":"object","properties":{"prsCreated":{"type":"number"},"prsMerged":{"type":"number"},"tasksCompleted":{"type":"number"},"temboContribution":{"type":"number"}},"required":["prsCreated","prsMerged","tasksCompleted","temboContribution"],"additionalProperties":false}},"required":["tasksCompleted","prsCreated","prsMerged","temboContribution","changes"],"additionalProperties":false},"timeSeries":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"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":["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}}}}}},"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":{"summary":{"type":"object","properties":{"tasksCompleted":{"type":"integer"},"prsCreated":{"type":"integer"},"prsMerged":{"type":"integer"},"temboContribution":{"type":"number"},"changes":{"type":"object","properties":{"prsCreated":{"type":"number"},"prsMerged":{"type":"number"},"tasksCompleted":{"type":"number"},"temboContribution":{"type":"number"}},"required":["prsCreated","prsMerged","tasksCompleted","temboContribution"],"additionalProperties":false}},"required":["tasksCompleted","prsCreated","prsMerged","temboContribution","changes"],"additionalProperties":false},"timeSeries":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"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":["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"}},"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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]}},"/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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]}},"/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},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}}}}}},"/v1/organizations/{organizationId}":{"get":{"operationId":"retrieveOrganization","summary":"Retrieve an organization","description":"Retrieve an organization profile.","tags":["Organizations"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Retrieve 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}]},"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},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","minLength":1,"maxLength":100},"onboarding":{"type":"object","properties":{"companySize":{"type":"string","minLength":1,"maxLength":100},"dismissedDashboardGetStartedCards":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"industry":{"type":"string","minLength":1,"maxLength":100},"stack":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100}},"additionalProperties":false},"onboardingCompleted":{"type":"boolean"}},"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":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"role":{"type":"string","enum":["org:admin","org:member"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":["string","null"]},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"status":{"type":"string","enum":["active","pending"]}},"required":["createdAt","id","role","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","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}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","pending"],"default":"active"}}]},"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":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"role":{"type":"string","enum":["org:admin","org:member"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":["string","null"]},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"status":{"type":"string","enum":["active","pending"]}},"required":["createdAt","id","role","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","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"},"role":{"type":"string","enum":["org:admin","org:member"],"default":"org:member"}},"required":["emailAddress"],"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":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"role":{"type":"string","enum":["org:admin","org:member"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":["string","null"]},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"status":{"type":"string","enum":["active","pending"]}},"required":["createdAt","id","role","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","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":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"maxLength":255},"role":{"type":"string","enum":["org:admin","org:member"]},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":["string","null"]},"emailAddress":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"imageUrl":{"type":["string","null"],"format":"uri"},"lastName":{"type":["string","null"]},"status":{"type":"string","enum":["active","pending"]}},"required":["createdAt","id","role","updatedAt","userId","emailAddress","firstName","imageUrl","lastName","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":{"role":{"type":"string","enum":["org:admin","org:member"]}},"required":["role"],"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"}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":255}}]},"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},"value":{"type":"string","minLength":1,"maxLength":64000}},"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},"value":{"type":"string","minLength":1,"maxLength":64000}},"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},"commitInstructions":{"type":"string","maxLength":64000},"customSystemPrompt":{"type":"string","maxLength":64000},"defaultAgent":{"type":"string","maxLength":64000},"defaultSandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"deleteBranchWhenPrClosed":{"type":"boolean"},"draftPrs":{"type":"boolean"},"enableCoderabbitBot":{"type":"boolean"},"enableCursorBot":{"type":"boolean"},"enableGeminiCodeAssistBot":{"type":"boolean"},"enableGithubActionsBot":{"type":"boolean"},"enableGraphiteBot":{"type":"boolean"},"enableGreptileBot":{"type":"boolean"},"experimentalMcp":{"type":"boolean"},"featureMentionAuthor":{"type":"boolean"},"maxBotReviews":{"type":"integer","minimum":0},"maxSolutions":{"type":"integer","minimum":0},"onDemandMaxCreditUsage":{"type":"number","minimum":0},"pgStatStatementsResetFrequency":{"type":"string","maxLength":64000},"pmSystemPrompt":{"type":"string","maxLength":64000},"prTitleInstructions":{"type":"string","maxLength":64000},"pullRequestInsightsEnabled":{"type":"boolean"},"repositoryDetectionHint":{"type":"string","maxLength":64000},"shouldSignCommits":{"type":"boolean"},"slackReviewOnTembo":{"type":"boolean"},"slowQueryThresholdMs":{"type":"number","minimum":0},"sshPublicKeys":{"type":"string","maxLength":64000},"weeklyReportEnabled":{"type":"boolean"}},"required":["cloneDepth","commitInstructions","customSystemPrompt","defaultAgent","defaultSandboxSize","deleteBranchWhenPrClosed","draftPrs","enableCoderabbitBot","enableCursorBot","enableGeminiCodeAssistBot","enableGithubActionsBot","enableGraphiteBot","enableGreptileBot","experimentalMcp","featureMentionAuthor","maxBotReviews","maxSolutions","onDemandMaxCreditUsage","pgStatStatementsResetFrequency","pmSystemPrompt","prTitleInstructions","pullRequestInsightsEnabled","repositoryDetectionHint","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":"Update one or more organization settings.","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},"commitInstructions":{"type":"string","maxLength":64000},"customSystemPrompt":{"type":"string","maxLength":64000},"defaultAgent":{"type":"string","maxLength":64000},"defaultSandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"deleteBranchWhenPrClosed":{"type":"boolean"},"draftPrs":{"type":"boolean"},"enableCoderabbitBot":{"type":"boolean"},"enableCursorBot":{"type":"boolean"},"enableGeminiCodeAssistBot":{"type":"boolean"},"enableGithubActionsBot":{"type":"boolean"},"enableGraphiteBot":{"type":"boolean"},"enableGreptileBot":{"type":"boolean"},"experimentalMcp":{"type":"boolean"},"featureMentionAuthor":{"type":"boolean"},"maxBotReviews":{"type":"integer","minimum":0},"maxSolutions":{"type":"integer","minimum":0},"onDemandMaxCreditUsage":{"type":"number","minimum":0},"pgStatStatementsResetFrequency":{"type":"string","maxLength":64000},"pmSystemPrompt":{"type":"string","maxLength":64000},"prTitleInstructions":{"type":"string","maxLength":64000},"pullRequestInsightsEnabled":{"type":"boolean"},"repositoryDetectionHint":{"type":"string","maxLength":64000},"shouldSignCommits":{"type":"boolean"},"slackReviewOnTembo":{"type":"boolean"},"slowQueryThresholdMs":{"type":"number","minimum":0},"sshPublicKeys":{"type":"string","maxLength":64000},"weeklyReportEnabled":{"type":"boolean"}},"required":["cloneDepth","commitInstructions","customSystemPrompt","defaultAgent","defaultSandboxSize","deleteBranchWhenPrClosed","draftPrs","enableCoderabbitBot","enableCursorBot","enableGeminiCodeAssistBot","enableGithubActionsBot","enableGraphiteBot","enableGreptileBot","experimentalMcp","featureMentionAuthor","maxBotReviews","maxSolutions","onDemandMaxCreditUsage","pgStatStatementsResetFrequency","pmSystemPrompt","prTitleInstructions","pullRequestInsightsEnabled","repositoryDetectionHint","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},"anthropicApiKey":{"type":"string","maxLength":64000},"awsBedrockAccessKeyId":{"type":"string","maxLength":64000},"awsBedrockRegion":{"type":"string","maxLength":64000},"awsBedrockSecretAccessKey":{"type":"string","maxLength":64000},"cloneDepth":{"type":"integer","exclusiveMinimum":0},"commitInstructions":{"type":"string","maxLength":64000},"cursorApiKey":{"type":"string","maxLength":64000},"customSystemPrompt":{"type":"string","maxLength":64000},"defaultAgent":{"type":"string","maxLength":64000},"defaultSandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"deleteBranchWhenPrClosed":{"type":"boolean"},"draftPrs":{"type":"boolean"},"enableCoderabbitBot":{"type":"boolean"},"enableCursorBot":{"type":"boolean"},"enableGeminiCodeAssistBot":{"type":"boolean"},"enableGithubActionsBot":{"type":"boolean"},"enableGraphiteBot":{"type":"boolean"},"enableGreptileBot":{"type":"boolean"},"experimentalMcp":{"type":"boolean"},"featureMentionAuthor":{"type":"boolean"},"gcpVertexAiLocation":{"type":"string","maxLength":64000},"gcpVertexAiProject":{"type":"string","maxLength":64000},"gcpVertexAiServiceAccountJson":{"type":"string","maxLength":64000},"kernelApiKey":{"type":"string","maxLength":64000},"maxBotReviews":{"type":"integer","minimum":0},"maxSolutions":{"type":"integer","minimum":0},"openaiApiKey":{"type":"string","maxLength":64000},"openrouterApiKey":{"type":"string","maxLength":64000},"pgStatStatementsResetFrequency":{"type":"string","maxLength":64000},"pmSystemPrompt":{"type":"string","maxLength":64000},"prTitleInstructions":{"type":"string","maxLength":64000},"pullRequestInsightsEnabled":{"type":"boolean"},"repositoryDetectionHint":{"type":"string","maxLength":64000},"shouldSignCommits":{"type":"boolean"},"slackReviewOnTembo":{"type":"boolean"},"slowQueryThresholdMs":{"type":"number","minimum":0},"sshPublicKeys":{"type":"string","maxLength":64000},"weeklyReportEnabled":{"type":"boolean"}},"additionalProperties":false}}}}}},"/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"]}},"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":"string","enum":["true","false"]}},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200}}]},"post":{"operationId":"createMcpConnection","summary":"Create an MCP connection","description":"Create a new stdio or Streamable HTTP MCP connection. Remote connections support OAuth, client credentials, 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"]},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null]},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","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},"args":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":100,"default":[]},"command":{"type":"string","minLength":1,"maxLength":4096},"env":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","maxLength":16384}},"type":{"type":"string","const":"stdio"},"visibility":{"type":"string","enum":["shared","personal"],"default":"shared"}},"required":["name","command","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"serverUrl":{"type":"string","format":"uri"},"authType":{"type":"string","enum":["oauth","client_credentials","static_headers"],"default":"oauth"},"clientId":{"type":"string","minLength":1,"maxLength":4096},"clientSecret":{"type":"string","minLength":1,"maxLength":65536},"headers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","maxLength":16384}},"oauthRegistration":{"type":"string","enum":["automatic","pre_registered"],"default":"automatic"},"scope":{"type":"string","minLength":1,"maxLength":4096},"type":{"type":"string","const":"remote","default":"remote"},"visibility":{"type":"string","enum":["shared","personal"],"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"]},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null]},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","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. Header and environment objects merge write-only values 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"]},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null]},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","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},"serverUrl":{"type":"string","format":"uri"},"type":{"type":"string","const":"remote"},"authType":{"type":"string","enum":["oauth","client_credentials","static_headers"]},"clientId":{"type":"string","minLength":1,"maxLength":4096},"clientSecret":{"type":"string","minLength":1,"maxLength":65536},"headers":{"type":["object","null"],"propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":["string","null"],"maxLength":16384}},"oauthRegistration":{"type":"string","enum":["automatic","pre_registered"]},"scope":{"type":"string","minLength":1,"maxLength":4096}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"command":{"type":"string","minLength":1,"maxLength":4096},"name":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","const":"stdio"},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100},"env":{"type":["object","null"],"propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":["string","null"],"maxLength":16384}}},"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"]},"args":{"type":["array","null"],"items":{"type":"string","maxLength":8192},"maxItems":100},"authType":{"type":["string","null"],"enum":["oauth","client_credentials","static_headers",null]},"command":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"envKeys":{"type":"array","items":{"type":"string"}},"headerKeys":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectedAt","id","name","serverUrl","type","visibility","args","authType","command","createdAt","envKeys","headerKeys","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"},"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","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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"jobId","schema":{"type":"string","minLength":1}},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"types","schema":{"anyOf":[{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"],"default":"PullRequest"},{"type":"array","items":{"type":"string","enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source"],"default":"PullRequest"},"minItems":1}]}}]},"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"}},"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/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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"threadId","schema":{"type":"string","format":"uuid"}}]},"post":{"operationId":"createMessage","summary":"Create a message","description":"Create a user message for a session and submit it to the session agent.","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"},"content":{"type":"string","minLength":1,"maxLength":1000000},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100},"pullRequestId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"deliveryMode":{"type":"string","enum":["queue","steer"]},"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}},"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},"richContent":{"oneOf":[{"$ref":"#/components/schemas/TipTapDocument"},{"type":"null"}]}},"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","enum":["claude-opus-5-5","claude-fable-5-1","claude-fable-5","claude-opus-5","claude-sonnet-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-4-5-haiku","gpt-6-astra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5-pro","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.2-codex","gpt-5.2","glm-5p3","glm-5p3-flash","composer-1.5","composer-2","composer-2-fast","composer-2.5","gemini-3.1-pro","gemini-3.5-flash","grok-4.7","grok","kimi-k3","minimax-m2p7","minimax-m3","deepseek-v4-pro","deepseek-v4p1-flash"]},"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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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"},"supergrokAvailable":{"type":"boolean"},"agentInferenceAvailable":{"type":"boolean"}},"required":["name","label","provider","enabled","available","unavailableReason","supportedInferenceProviders","availableInferenceProviders","configuredInferenceProvider","inferenceProvider","inferenceProviderAccess","selectedInferenceProviderAvailable","selectedInferenceProviderUnavailableReason","chatgptAvailable","chatgptSupported","workspaceChatgptAvailable","supergrokAvailable","agentInferenceAvailable"],"additionalProperties":false}},"nextCursor":{"type":["string","null"],"enum":["claude-opus-5-5","claude-fable-5-1","claude-fable-5","claude-opus-5","claude-sonnet-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-4-5-haiku","gpt-6-astra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5-pro","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.2-codex","gpt-5.2","glm-5p3","glm-5p3-flash","composer-1.5","composer-2","composer-2-fast","composer-2.5","gemini-3.1-pro","gemini-3.5-flash","grok-4.7","grok","kimi-k3","minimax-m2p7","minimax-m3","deepseek-v4-pro","deepseek-v4p1-flash",null]}},"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","enum":["claude-opus-5-5","claude-fable-5-1","claude-fable-5","claude-opus-5","claude-sonnet-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-4-5-haiku","gpt-6-astra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5-pro","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.2-codex","gpt-5.2","glm-5p3","glm-5p3-flash","composer-1.5","composer-2","composer-2-fast","composer-2.5","gemini-3.1-pro","gemini-3.5-flash","grok-4.7","grok","kimi-k3","minimax-m2p7","minimax-m3","deepseek-v4-pro","deepseek-v4p1-flash"]}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]}},"/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","enum":["claude-opus-5-5","claude-fable-5-1","claude-fable-5","claude-opus-5","claude-sonnet-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-4-5-haiku","gpt-6-astra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5-pro","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.2-codex","gpt-5.2","glm-5p3","glm-5p3-flash","composer-1.5","composer-2","composer-2-fast","composer-2.5","gemini-3.1-pro","gemini-3.5-flash","grok-4.7","grok","kimi-k3","minimax-m2p7","minimax-m3","deepseek-v4-pro","deepseek-v4p1-flash"]},"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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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","missing_credentials","unsupported_provider","chatgpt_not_connected","supergrok_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"},"supergrokAvailable":{"type":"boolean"},"agentInferenceAvailable":{"type":"boolean"}},"required":["name","label","provider","enabled","available","unavailableReason","supportedInferenceProviders","availableInferenceProviders","configuredInferenceProvider","inferenceProvider","inferenceProviderAccess","selectedInferenceProviderAvailable","selectedInferenceProviderUnavailableReason","chatgptAvailable","chatgptSupported","workspaceChatgptAvailable","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","enum":["claude-opus-5-5","claude-fable-5-1","claude-fable-5","claude-opus-5","claude-sonnet-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-4-5-haiku","gpt-6-astra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5-pro","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.2-codex","gpt-5.2","glm-5p3","glm-5p3-flash","composer-1.5","composer-2","composer-2-fast","composer-2.5","gemini-3.1-pro","gemini-3.5-flash","grok-4.7","grok","kimi-k3","minimax-m2p7","minimax-m3","deepseek-v4-pro","deepseek-v4p1-flash"]},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"inferenceProvider":{"type":["string","null"],"enum":["TemboManagedInference","BYOK","AWSBedrock","GCPVertexAI","OpenRouter",null]}},"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"},"onboarding":{"type":["object","null"],"properties":{"positionInCompany":{"type":"string","minLength":1,"maxLength":255},"useCase":{"type":"string","minLength":1,"maxLength":255},"howDidYouHear":{"type":"string","minLength":1,"maxLength":255}},"required":["positionInCompany","useCase","howDidYouHear"],"additionalProperties":false}},"required":["createdAt","email","emailVerified","id","image","name","updatedAt","onboarding"],"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":"updateUser","summary":"Update a user","description":"Update your user profile and onboarding information.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Update 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"},"onboarding":{"type":["object","null"],"properties":{"positionInCompany":{"type":"string","minLength":1,"maxLength":255},"useCase":{"type":"string","minLength":1,"maxLength":255},"howDidYouHear":{"type":"string","minLength":1,"maxLength":255}},"required":["positionInCompany","useCase","howDidYouHear"],"additionalProperties":false}},"required":["createdAt","email","emailVerified","id","image","name","updatedAt","onboarding"],"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":{"onboarding":{"type":"object","properties":{"positionInCompany":{"type":"string","minLength":1,"maxLength":255},"useCase":{"type":"string","minLength":1,"maxLength":255},"howDidYouHear":{"type":"string","minLength":1,"maxLength":255}},"required":["positionInCompany","useCase","howDidYouHear"],"additionalProperties":false}},"required":["onboarding"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteUser","summary":"Delete a user","description":"Queue permanent deletion of your user account.","tags":["Users"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Delete a user","content":{"application/json":{"schema":{"type":"object","properties":{"deletionJobId":{"type":"string","minLength":1,"maxLength":255},"deletionQueued":{"type":"boolean","const":true},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["deletionJobId","deletionQueued","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}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deletionQuestionnaire":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":20},"otherReason":{"type":"string","minLength":1,"maxLength":2000},"submittedAt":{"type":"string","format":"date-time"}},"required":["reasons","submittedAt"],"additionalProperties":false}},"additionalProperties":false}}}}}},"/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}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]}},"/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/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"}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"enabled","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}]}},{"in":"query","name":"includeTotal","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}],"default":false}},{"in":"query","name":"integrationId","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000}},{"in":"query","name":"sessionId","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"types","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}}]}},"/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 sessions you have permission to access, with 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},"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","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"}},{"in":"query","name":"createdBy","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"cursor","schema":{"type":"string","maxLength":500}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"excludePinned","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}]}},{"in":"query","name":"externalIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"hasProject","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}]}},{"in":"query","name":"includeArchived","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}],"default":true}},{"in":"query","name":"includeTotal","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}],"default":false}},{"in":"query","name":"participant","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"pendingReviewerKeys","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"projectIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"pullRequestStatuses","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[]}},{"in":"query","name":"repositoryIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000}},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["lastQueuedAt","createdAt","updatedAt"],"default":"lastQueuedAt"}},{"in":"query","name":"sourceIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"sourceTypes","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"state","schema":{"type":"string","enum":["all","active","archived"],"default":"all"}}]},"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 and agent.","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"},"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}},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"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","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","description","diffSummary","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},"baseBranch":{"type":["string","null"],"minLength":1,"maxLength":500},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":100,"default":[]},"projectId":{"type":["string","null"]},"sandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]},"targetBranch":{"type":["string","null"],"minLength":1,"maxLength":500},"visibility":{"type":"string","enum":["private","public"]},"agentOptions":{"$ref":"#/components/schemas/AgentOptions"},"autoDetectRepositories":{"type":"boolean"},"branchName":{"type":["string","null"],"minLength":1,"maxLength":500},"codeRepositoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100},"description":{"type":"string","minLength":1,"maxLength":1000000,"description":"Initial task or prompt for the session."},"id":{"type":"string","format":"uuid"},"richContent":{"$ref":"#/components/schemas/SessionTipTapDocument","description":"Optional rich-text representation of the initial task. Provide description separately."},"pullRequestId":{"type":"string","format":"uuid"},"queueRightAway":{"type":"boolean"},"sessionMode":{"type":"string","enum":["chat","terminal"]},"startupAgent":{"type":"string","enum":["claudeCode","codex","opencode","pi","amp","cursor"]}},"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}":{"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"},"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}},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"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","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","description","diffSummary","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 the configuration of a session you have permission to access.","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"},"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}},"description":{"type":["string","null"]},"diffSummary":{"type":["object","null"],"properties":{"additions":{"type":"integer"},"deletions":{"type":"integer"}},"required":["additions","deletions"],"additionalProperties":false},"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","projectId","sandboxSize","sessionType","targetBranch","title","updatedAt","visibility","artifacts","description","diffSummary","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":{"agent":{"type":["string","null"],"minLength":1,"maxLength":500},"agentOptions":{"$ref":"#/components/schemas/AgentOptions"},"baseBranch":{"type":["string","null"],"minLength":1,"maxLength":500},"branchName":{"type":["string","null"],"minLength":1,"maxLength":500},"description":{"type":"string","minLength":1,"maxLength":1000000},"richContent":{"oneOf":[{"$ref":"#/components/schemas/SessionTipTapDocument"},{"type":"null"}]},"level":{"type":"integer","minimum":0,"maximum":100},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":100},"mode":{"type":"string","enum":["normal","planning"]},"projectId":{"type":["string","null"]},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"targetBranch":{"type":["string","null"],"minLength":1,"maxLength":500},"title":{"type":"string","minLength":1,"maxLength":1000},"visibility":{"type":"string","enum":["private","public"]}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteSession","summary":"Delete a session","description":"Delete a session you have permission to access.","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}/stop":{"post":{"operationId":"stopSession","summary":"Stop a session","description":"Interrupt active session work and continue with the next queued message.","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}},"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":"string","const":"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}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"messageId","schema":{"type":"string","format":"uuid"}}]}},"/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"}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"hasChanges","schema":{"anyOf":[{"type":"string","enum":["true","false"]},{"type":"boolean"}]}}]}},"/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/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},"sandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"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},"sandboxSize":{"type":"string","enum":["nano","micro","small","medium","large","xl","xxl","ultra"]}},"required":["projectId","sandboxSize"],"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},"includeDeps":{"type":"boolean","default":true},"includeSkills":{"type":"boolean","default":true},"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}},"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"]},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"}},"required":["createdAt","description","id","includeDeps","includeSkills","name","setupScript","updatedAt","activeSnapshots","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","sizes","warmPoolEnabled"],"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}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"defaultOnly","schema":{"type":"string","const":"true"}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":120}}]},"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},"includeDeps":{"type":"boolean","default":true},"includeSkills":{"type":"boolean","default":true},"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}},"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"]},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"}},"required":["createdAt","description","id","includeDeps","includeSkills","name","setupScript","updatedAt","activeSnapshots","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","sizes","warmPoolEnabled"],"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},"includeDeps":{"type":"boolean"},"includeSkills":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":120},"setupScript":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"agentInstructions":{"type":["string","null"],"maxLength":20000},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"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"]},"runNow":{"type":"boolean"},"schedule":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":100}},"required":["cron"],"additionalProperties":false},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"minItems":1}},"required":["name","sizes"],"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},"includeDeps":{"type":"boolean","default":true},"includeSkills":{"type":"boolean","default":true},"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}},"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"]},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"}},"required":["createdAt","description","id","includeDeps","includeSkills","name","setupScript","updatedAt","activeSnapshots","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","sizes","warmPoolEnabled"],"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 configuration fields.","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},"includeDeps":{"type":"boolean","default":true},"includeSkills":{"type":"boolean","default":true},"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}},"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"]},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"warmPoolEnabled":{"type":"boolean"}},"required":["createdAt","description","id","includeDeps","includeSkills","name","setupScript","updatedAt","activeSnapshots","agentInstructions","codeRepositoryIds","color","defaultForSizes","icon","sizes","warmPoolEnabled"],"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},"includeDeps":{"type":"boolean"},"includeSkills":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":120},"setupScript":{"type":["string","null"],"maxLength":20000},"codeRepositoryIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":255}},"agentInstructions":{"type":["string","null"],"maxLength":20000},"color":{"type":"string","enum":["neutral","red","orange","yellow","green","teal","blue","purple","pink"]},"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"]},"defaultForSizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]}},"environmentVariables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{"type":"string","maxLength":10000}},"schedule":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120},"enabled":{"type":"boolean"},"timezone":{"type":["string","null"],"minLength":1,"maxLength":100}},"additionalProperties":false},"sizes":{"type":"array","items":{"type":"string","enum":["nano","micro","medium","large","xl","xxl","ultra"]},"minItems":1},"warmPoolEnabled":{"type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteProject","summary":"Delete a project","description":"Delete a project and disable its schedule.","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}/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_]*$"},"value":{"type":"string","minLength":1,"maxLength":10000}},"required":["key","value"],"additionalProperties":false},"minItems":1,"maxItems":100}},"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"},"buildDurationMs":{"type":["number","null"],"minimum":0},"builtAt":{"type":["string","null"],"format":"date-time"},"cpu":{"type":["integer","null"],"exclusiveMinimum":0},"hasSetupScript":{"type":["boolean","null"]},"includesDeps":{"type":["boolean","null"]},"includesRepos":{"type":["boolean","null"]},"includesSkills":{"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":20000},"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","buildDurationMs","builtAt","cpu","hasSetupScript","includesDeps","includesRepos","includesSkills","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}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}}]}},"/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"},"buildDurationMs":{"type":["number","null"],"minimum":0},"builtAt":{"type":["string","null"],"format":"date-time"},"cpu":{"type":["integer","null"],"exclusiveMinimum":0},"hasSetupScript":{"type":["boolean","null"]},"includesDeps":{"type":["boolean","null"]},"includesRepos":{"type":["boolean","null"]},"includesSkills":{"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":20000},"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","buildDurationMs","builtAt","cpu","hasSetupScript","includesDeps","includesRepos","includesSkills","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"},"buildDurationMs":{"type":["number","null"],"minimum":0},"builtAt":{"type":["string","null"],"format":"date-time"},"cpu":{"type":["integer","null"],"exclusiveMinimum":0},"hasSetupScript":{"type":["boolean","null"]},"includesDeps":{"type":["boolean","null"]},"includesRepos":{"type":["boolean","null"]},"includesSkills":{"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":20000},"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","buildDurationMs","builtAt","cpu","hasSetupScript","includesDeps","includesRepos","includesSkills","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},"pinned":{"type":"boolean"}},"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},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0},"failure":{"type":["string","null"]},"includeDeps":{"type":"boolean"},"includeSkills":{"type":"boolean"},"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":20000},"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","completedAt","durationMs","failure","includeDeps","includeSkills","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}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}}]},"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},"snapshotId":{"type":"string","minLength":1,"maxLength":255}},"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},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0},"failure":{"type":["string","null"]},"includeDeps":{"type":"boolean"},"includeSkills":{"type":"boolean"},"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":20000},"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","completedAt","durationMs","failure","includeDeps","includeSkills","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}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}}]},"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},"timezone":{"type":"string","minLength":1,"maxLength":100}},"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},"enabled":{"type":"boolean"},"timezone":{"type":["string","null"],"minLength":1,"maxLength":100}},"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":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"cursor","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"excludeAuthorIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"excludeOrganizationName","schema":{"type":"string","minLength":1}},{"in":"query","name":"excludeReturnedAuthorIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"excludeReviewerIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"hasTemboSession","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"includeAuthors","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"includeTotal","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"repositoryIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"reviewerIds","schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}],"default":[]}},{"in":"query","name":"mergedAfter","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"search","schema":{"type":"string","minLength":1}},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["createdAt","updatedAt"]}},{"in":"query","name":"state","schema":{"type":"string","enum":["open","returned","approved","needs review","draft","merged","closed"]}},{"in":"query","name":"updatedAfter","schema":{"type":"string","format":"date-time"}}]}},"/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},"runCount":{"type":"integer","minimum":0},"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","runCount","scheduleCount","triggerCount","hasPausedSchedule","hasPausedTrigger","integrationIds","integrationTypes","codeRepositoryCount"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"filterOptions":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0},"integrationTypes":{"type":"array","items":{"type":"string"}}},"required":["totalCount","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}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"ids","schema":{"type":"string","maxLength":10000}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"archived","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"sort","schema":{"type":"string","enum":["latestRun","runCount"]}},{"in":"query","name":"status","schema":{"type":"string","maxLength":10000}},{"in":"query","name":"integration","schema":{"type":"string","maxLength":10000}},{"in":"query","name":"author","schema":{"type":"string","maxLength":10000}}]},"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"]},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"autoDetectRepositories":{"type":"boolean","default":true},"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},"runCount":{"type":"integer","minimum":0},"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","script","artifactType","autoDetectRepositories","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","runCount","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},"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},"agent":{"type":"string","minLength":1,"maxLength":200},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"sandboxSize":{"type":["string","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null]},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"tembo"},{"type":"null"}]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"autoDetectRepositories":{"type":"boolean"},"repositoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"integrationType":{"type":"string","minLength":1,"maxLength":100},"integrationId":{"type":"string","format":"uuid"},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"required":["name"],"additionalProperties":false},"maxItems":50},"schedules":{"type":"array","items":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":500}},"required":["cron"],"additionalProperties":false},"maxItems":50},"templateName":{"type":"string","enum":["addTestCoverage","addTestCoverageFromJira","autoAgentsMdMaintainer","autoDocsMaintainer","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","testPruner","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug"]},"sourceAgentId":{"type":"string","format":"uuid"}},"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","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","testPruner","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","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","testPruner","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","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","testPruner","staleCodeComments","stalePullRequestNotifier","summarizeChangesDaily","triageNewJiraBug"]}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]}},"/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","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","testPruner","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"]},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"autoDetectRepositories":{"type":"boolean","default":true},"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},"runCount":{"type":"integer","minimum":0},"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","script","artifactType","autoDetectRepositories","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","runCount","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 configuration. Supply expectedUpdatedAt to reject an update if the agent changed since it was retrieved. Enabling or archiving an agent also updates its schedules and triggers.","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"]},"script":{"type":["string","null"]},"artifactType":{"type":["string","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null]},"autoDetectRepositories":{"type":"boolean","default":true},"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},"runCount":{"type":"integer","minimum":0},"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","script","artifactType","autoDetectRepositories","createdAt","updatedAt","archivedAt","enabledAt","organizationId","organizationName","createdBy","instructions","agent","agentOptions","mcpServers","userState","codeRepositories","lastRun","runCount","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},"key":{"type":["string","null"],"minLength":1,"maxLength":200},"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"}]},"mcpServers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100},"agent":{"type":["string","null"],"minLength":1,"maxLength":200},"agentOptions":{"$ref":"#/components/schemas/AgentOptionsInput"},"userState":{"$ref":"#/components/schemas/AgentState"},"sandboxSize":{"type":["string","null","null"],"enum":["nano","micro","small","medium","large","xl","xxl","ultra",null,null]},"projectId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"tembo"},{"type":"null"}]},"templateId":{"type":["string","null"],"maxLength":200},"script":{"type":["string","null"],"maxLength":100000},"artifactType":{"type":["string","null","null"],"enum":["PullRequest","ToolCall","Plan","Response","File","Service","Source",null,null]},"autoDetectRepositories":{"type":"boolean"},"repositoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250},"enabled":{"type":"boolean"},"archived":{"type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteAgent","summary":"Delete an agent","description":"Delete an agent and disable its scheduled and triggered jobs.","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}/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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]},"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}},"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":"Update an agent schedule, including its cron expression or enabled state.","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}},"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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]},"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},"integrationType":{"type":"string","minLength":1,"maxLength":100},"integrationId":{"type":"string","format":"uuid"},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"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":"Update an agent trigger configuration or enabled state.","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},"integrationId":{"type":"string","format":"uuid"},"filters":{"$ref":"#/components/schemas/TriggerFilters"}},"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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]},"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, just like the legacy /trigger endpoint; no eventPayload wrapper is needed. Omit the body to run without event input. The response confirms queuing, not completed execution.","tags":["Agents"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Create an agent run","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"agentId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"}},"required":["jobId","agentId","status"],"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":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 enabled repositories in the authenticated organization.","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"}},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":50}},{"in":"query","name":"ids","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}]}},{"in":"query","name":"integrationId","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"order","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":500}},{"in":"query","name":"sort","schema":{"type":"string","enum":["createdAt","integration","name","pullRequests","updatedAt"],"default":"pullRequests"}}]}},"/v1/repositories/{repositoryId}":{"get":{"operationId":"retrieveRepository","summary":"Retrieve a repository","description":"Retrieve an enabled 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}]}},"/v1/integrations":{"get":{"operationId":"listIntegrations","summary":"List integrations","description":"List integrations for the authenticated organization.","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 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}}}},"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"}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}},{"in":"query","name":"enabled","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"hasEnabledRepositories","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"ids","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}]}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"type","schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":18}]}},{"in":"query","name":"createdAfter","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"excludeOrganizationName","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"includeTotal","schema":{"type":"string","enum":["true","false"],"default":"false"}}]}},"/v1/integrations/{integrationId}":{"get":{"operationId":"retrieveIntegration","summary":"Retrieve an integration","description":"Retrieve an integration for the authenticated organization.","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 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}}}},"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/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","grace","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"},"exhausted":{"type":"boolean"}},"required":["status","startedAt","endsAt","allowance","remainingAllowance","exhausted"],"default":null},"billingEnabled":{"type":"boolean"},"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","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 with cursor pagination.","tags":["Billing"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List billing usage","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"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}},"required":["id","title","kind","createdAt","managedInferenceCredits","computeCredits","totalCredits"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":["string","null"],"minLength":1,"maxLength":255},"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":255}},{"in":"query","name":"limit","schema":{"type":"string","default":"50"}}]}},"/me":{"get":{"operationId":"getPublic-apiMe","description":"Retrieve the organization and user IDs associated with the current request.","tags":["public-api"],"summary":"Retrieve authentication information","responses":{"200":{"description":"Successfully retrieved user information","content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":["string","null"],"format":"uuid","description":"Organization ID associated with the request, or null when no organization is available.","example":"123e4567-e89b-12d3-a456-426614174000"},"userId":{"type":["string","null"],"format":"uuid","description":"User ID associated with the request, or null when the credentials are not associated with a user.","example":"456e7890-e89b-12d3-a456-426614174001"}},"required":["orgId","userId"]}}}}}}}}}