{"openapi":"3.1.0","info":{"title":"Manufact Cloud API","description":"Backend API for Manufact Cloud","version":"1.0.0"},"servers":[{"url":"https://cloud.manufact.com","description":"Manufact Cloud API"}],"paths":{"/api/v1/github/webhook":{"post":{"operationId":"postApiV1GithubWebhook","tags":["GitHub"],"description":"GitHub App webhook: verifies `X-Hub-Signature-256` (HMAC-SHA256 of the raw body), then processes installation lifecycle events and `push`, `pull_request`, and `check_run` events for auto-deploy. Not session-authenticated.","parameters":[{"name":"X-GitHub-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Hub-Signature-256","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"GitHub event-specific JSON payload (object).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Webhook accepted (may be a no-op for unhandled event types)","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"description":"Invalid JSON body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/github/installations":{"get":{"operationId":"getApiV1GithubInstallations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"installations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"installationId":{"type":"string"},"appId":{"type":"string"},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"account":{"anyOf":[{"type":"object","properties":{"login":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string"}},"required":["login","avatar_url","type"]},{"type":"null"}]}},"required":["id","installationId","appId","organizationId","createdAt","account"]}}},"required":["installations"]}}}},"400":{"description":"Missing organizationId","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"List GitHub App installations for a given organization. Requires organizationId query parameter. Scoped to the backend's configured GITHUB_APP_ID — installations from other apps (e.g. dev vs prod) are excluded, since this backend can only read their repos.","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"/api/v1/github/installations/callback":{"post":{"operationId":"postApiV1GithubInstallationsCallback","responses":{"200":{"description":"Installation saved","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"installationId":{"type":"string"},"appId":{"type":"string"},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"account":{"anyOf":[{"type":"object","properties":{"login":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string"}},"required":["login","avatar_url","type"]},{"type":"null"}]}},"required":["id","installationId","appId","organizationId","createdAt","account"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Save a new GitHub App installation after the user completes the install flow. The installation is linked to the specified organization (organizationId required).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installation_id":{"type":"string"},"setup_action":{"type":"string"},"code":{"type":"string"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["installation_id","organizationId"]}}}}}},"/api/v1/github/installations/{id}":{"delete":{"operationId":"deleteApiV1GithubInstallationsById","responses":{"200":{"description":"Disconnected","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Disconnect a GitHub App installation from the organization without deleting linked repositories or servers.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/github/installations/{installationId}/repos":{"get":{"operationId":"getApiV1GithubInstallationsByInstallationIdRepos","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"repos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"fullName":{"type":"string"},"private":{"type":"boolean"},"htmlUrl":{"type":"string"},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pushedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","fullName","private","htmlUrl","defaultBranch","pushedAt","ownerAvatarUrl"]}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"perPage":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hasMore":{"type":"boolean"},"mode":{"type":"string","enum":["browse","search"]}},"required":["repos","page","perPage","totalCount","hasMore","mode"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"List repositories accessible to a GitHub App installation.","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"in":"query","name":"page","schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"perPage","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"q","schema":{"type":"string","minLength":2,"maxLength":200}}]},"post":{"operationId":"postApiV1GithubInstallationsByInstallationIdRepos","responses":{"201":{"description":"Repository created","content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string"},"cloneUrl":{"type":"string"},"htmlUrl":{"type":"string"}},"required":["fullName","cloneUrl","htmlUrl"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Create a new GitHub repository via the installation's Octokit client. Repos created by the app are automatically accessible to the installation.","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"private":{"default":true,"type":"boolean"},"org":{"type":"string"}},"required":["name"]}}}}}},"/api/v1/github/installations/{installationId}/repos/{owner}/{repo}/access":{"get":{"operationId":"getApiV1GithubInstallationsByInstallationIdReposByOwnerByRepoAccess","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"hasAccess":{"type":"boolean"}},"required":["hasAccess"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Authoritative check for whether a GitHub App installation can access a specific repository. Uses a single `repos.get` call with the installation token (no pagination, no search-index lag), so it is reliable even for very large orgs and freshly created repositories.","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"in":"path","name":"owner","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"repo","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}]}},"/api/v1/github/installations/{installationId}/repos/{owner}/{repo}/branches":{"get":{"operationId":"getApiV1GithubInstallationsByInstallationIdReposByOwnerByRepoBranches","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"branches":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"commitSha":{"type":"string"},"protected":{"type":"boolean"}},"required":["name","commitSha","protected"]}}},"required":["branches"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"List branches for a repository via a GitHub App installation.","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"in":"path","name":"owner","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"repo","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}]}},"/api/v1/github/installations/{installationId}/repos/{owner}/{repo}/tree-paths":{"get":{"operationId":"getApiV1GithubInstallationsByInstallationIdReposByOwnerByRepoTreePaths","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string"}},"truncated":{"type":"boolean"}},"required":["paths","truncated"]}}}},"400":{"description":"Missing ref"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"List unique directory paths and Dockerfile-like file paths under the repository tree for a branch (autocomplete rootDir, watch globs, Dockerfile path).","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"in":"path","name":"owner","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"repo","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"ref","schema":{"type":"string","minLength":1,"maxLength":512},"required":true}]}},"/api/v1/github/installations/{installationId}/repos/detect-frameworks":{"post":{"operationId":"postApiV1GithubInstallationsByInstallationIdReposDetectFrameworks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"fullName":{"type":"string"},"ref":{"type":"string"},"cacheKey":{"type":"string"},"framework":{"type":"string","enum":["mcp-use","mcp-python","mcp-typescript","fastmcp","tmcp","xmcp","skybridge","other"]},"signals":{"type":"object","properties":{"runtime":{"type":"string","enum":["node","python","unknown"]},"hasDockerfile":{"type":"boolean"},"npmScripts":{"type":"object","properties":{"build":{"type":"string"},"start":{"type":"string"}}},"mainEntry":{"type":"string"},"pythonPm":{"type":"string","enum":["uv","poetry","pipenv","pip"]},"suggested":{"type":"object","properties":{"start":{"type":"string"},"build":{"type":"string"},"port":{"type":"string"}}}},"required":["runtime","hasDockerfile"]}},"required":["fullName","ref","cacheKey","framework","signals"]}}},"required":["results"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Batch detect framework stacks for many repositories (cached per repo).","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repos":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"maxLength":200},"repo":{"type":"string","minLength":1,"maxLength":200},"ref":{"type":"string","minLength":1,"maxLength":512},"pushedAt":{"type":"string"}},"required":["owner","repo"]}}},"required":["repos"]}}}}}},"/api/v1/github/installations/{installationId}/verify":{"get":{"operationId":"getApiV1GithubInstallationsByInstallationIdVerify","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"installationId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountLogin":{"anyOf":[{"type":"string"},{"type":"null"}]},"accountType":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositorySelection":{"anyOf":[{"type":"string"},{"type":"null"}]},"suspendedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","installationId","accountLogin","accountType","repositorySelection","suspendedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Verify a GitHub App installation is still valid.","parameters":[{"in":"path","name":"installationId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}},"/api/v1/github/oauth/authorize":{"get":{"operationId":"getApiV1GithubOauthAuthorize","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"state":{"type":"string"}},"required":["url","state"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Returns the GitHub OAuth authorization URL. The frontend should open this URL (popup or redirect) so the user can grant repo-creation permission."}},"/api/v1/github/oauth/token":{"post":{"operationId":"postApiV1GithubOauthToken","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"installationsUpdated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","installationsUpdated"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["GitHub"],"description":"Exchange a GitHub OAuth code for a user access token and store it on the user's GitHub App installation(s).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1},"state":{"type":"string"}},"required":["code"]}}}}}},"/api/v1/agents":{"get":{"operationId":"getApiV1Agents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"llmModel":{"type":"string"},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"serverPoolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","description","llmModel","systemPrompt","maxSteps","codeMode","serverPoolId","organizationId","creatorId","isPublic","displayPreferences","createdAt","updatedAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Agents"],"description":"List agents visible to the current user. Optional filter: organizationId. Supports offset list params: limit (default 50, max 100), skip, sort=field:asc|desc (fields: createdAt, updatedAt, name).","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"serverId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1Agents","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"llmModel":{"type":"string"},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"serverPoolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","description","llmModel","systemPrompt","maxSteps","codeMode","serverPoolId","organizationId","creatorId","isPublic","displayPreferences","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Agents"],"description":"Create a new agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":1000},"llmModel":{"type":"string","minLength":1,"maxLength":255},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"type":"integer","exclusiveMinimum":1,"exclusiveMaximum":100},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"serverPoolId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}}},"required":["name","llmModel","organizationId"]}}}}}},"/api/v1/agents/{id}":{"get":{"operationId":"getApiV1AgentsById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"llmModel":{"type":"string"},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"serverPoolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","description","llmModel","systemPrompt","maxSteps","codeMode","serverPoolId","organizationId","creatorId","isPublic","displayPreferences","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Agents"],"description":"Get a single agent by ID","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1AgentsById","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"llmModel":{"type":"string"},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"serverPoolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","description","llmModel","systemPrompt","maxSteps","codeMode","serverPoolId","organizationId","creatorId","isPublic","displayPreferences","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Agents"],"description":"Update an agent","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"llmModel":{"type":"string","minLength":1,"maxLength":255},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"type":"integer","exclusiveMinimum":1,"exclusiveMaximum":100},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"serverPoolId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteApiV1AgentsById","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Agents"],"description":"Delete an agent","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/agents/generate-system-prompt":{"post":{"operationId":"postApiV1AgentsGenerateSystemPrompt","responses":{"200":{"description":"Generated prompt","content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"}},"required":["prompt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"LLM generation error"}},"tags":["Agents"],"description":"Generate an optimized system prompt from partial agent info","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"llmModel":{"type":"string"},"serverPoolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpServers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["name"]}}}}}},"/api/v1/agents/generate-description":{"post":{"operationId":"postApiV1AgentsGenerateDescription","responses":{"200":{"description":"Generated description","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string"}},"required":["description"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"LLM generation error"}},"tags":["Agents"],"description":"Generate a description for an agent using AI","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"systemPrompt":{"type":"string"}},"required":["name"]}}}}}},"/api/v1/agents/{id}/start-chat":{"post":{"operationId":"postApiV1AgentsByIdStartChat","responses":{"200":{"description":"Chat session started","content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"type":"string"},"agentId":{"type":"string"},"llmModel":{"type":"string"},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["chatId","agentId","llmModel","systemPrompt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Agents"],"description":"Start a server chat session. The :id is the **server ID** — the endpoint finds or creates a default agent for the server, creates a fresh chat, and returns the IDs the frontend needs.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers":{"get":{"operationId":"getApiV1Servers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"List servers visible to the current user. Optional filter: organizationId. Supports offset list params: limit (default 50, max 100), skip, sort=field:asc|desc (fields: createdAt, updatedAt, name).","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1Servers","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"server":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]},"deploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["server","deploymentId"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Plan limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"feature":{"type":"string","enum":["projects","teamMembers","region","previewDeploys","coldStart","requestsPerMonth","logRetention","githubOrg","customDomain"]},"currentTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"requiredTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"current":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["error","code","feature","currentTier","requiredTier"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Create a GitHub-backed server. JSON body: type=\"github\". Multipart (Mango/Vibe/CLI): `sourceFile` tarball + organizationId, name, repoName, private, branch, commitMessage, optional org, port, env (JSON string of string map). Provide `installationId` for the user's own GitHub, or `managed=true` to deploy via the platform-managed org (no user GitHub required).","requestBody":{"required":false,"content":{"application/json":{"schema":{"vendor":"zod"}}}}}},"/api/v1/servers/{id}/env-variables":{"get":{"operationId":"getApiV1ServersByIdEnvVariables","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"key":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"environments":{"type":"array","items":{"type":"string"}},"phase":{"type":"string"},"sensitive":{"type":"boolean"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","key","value","environments","phase","sensitive","branch","createdAt","updatedAt"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"List environment variables for a server (sensitive values masked). Optional `?branch=NAME` filters to that branch's rows; omit for production scope (branch IS NULL).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]},"post":{"operationId":"postApiV1ServersByIdEnvVariables","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"key":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"environments":{"type":"array","items":{"type":"string"}},"phase":{"type":"string"},"sensitive":{"type":"boolean"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","key","value","environments","phase","sensitive","branch","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Create an environment variable for a server","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"},"environments":{"default":["production"],"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"phase":{"default":"both","type":"string","enum":["runtime","build","both"]},"sensitive":{"default":false,"type":"boolean"},"branch":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["key","value"]}}}}},"put":{"operationId":"putApiV1ServersByIdEnvVariables","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"key":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"environments":{"type":"array","items":{"type":"string"}},"phase":{"type":"string"},"sensitive":{"type":"boolean"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","key","value","environments","phase","sensitive","branch","createdAt","updatedAt"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Bulk-sync environment variables for a server. Replaces all existing variables for the targeted branch scope with the provided list. Optional `?branch=NAME` scopes the sync to that branch (default: production / branch IS NULL).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"environments":{"default":["production"],"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"phase":{"default":"both","type":"string","enum":["runtime","build","both"]},"sensitive":{"default":false,"type":"boolean"},"branch":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["key","value"]}}}}}}},"/api/v1/servers/{id}/env-variables/managed":{"get":{"operationId":"getApiV1ServersByIdEnvVariablesManaged","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"List the platform-managed runtime env defaults (e.g. MCP_URL, CSP_URLS) the deploy pipeline injects for this environment, before any user override. Optional `?branch=NAME` scopes to that branch's preview; omit for production.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/servers/{id}/env-variables/{varId}":{"patch":{"operationId":"patchApiV1ServersByIdEnvVariablesByVarId","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"key":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"environments":{"type":"array","items":{"type":"string"}},"phase":{"type":"string"},"sensitive":{"type":"boolean"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","key","value","environments","phase","sensitive","branch","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Update an environment variable","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"varId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"environments":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"phase":{"type":"string","enum":["runtime","build","both"]},"sensitive":{"type":"boolean"},"branch":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteApiV1ServersByIdEnvVariablesByVarId","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Delete an environment variable","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"varId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}":{"patch":{"operationId":"patchApiV1ServersById","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Update a server","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1024},"slug":{"anyOf":[{"type":"string","minLength":3,"maxLength":63,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"productionBranch":{"type":"string"},"watchPaths":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":512}},"deployBranchPatterns":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"waitForCi":{"type":"boolean"},"config":{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"internalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"transport":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"number"},{"type":"null"}]},"startCommand":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string"},{"type":"null"}]},"rootDir":{"anyOf":[{"type":"string"},{"type":"null"}]},"dockerfilePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"observabilityCapturePayloads":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"auth":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string"},"expires_at":{"type":"number"},"scope":{"type":"string"},"token_endpoint":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"updated_at":{"type":"string"},"refresh_status":{"type":"string"},"refresh_failed_at":{"type":"string"}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},"replaceConfig":{"type":"boolean"},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"externalUrl":{"type":"string","maxLength":2048,"format":"uri"},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string","maxLength":255},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":2048,"format":"uri"}]},{"type":"null"}]}}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteApiV1ServersById","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Delete a server and all its deployments","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"get":{"operationId":"getApiV1ServersById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Get a single server by ID or slug. Includes deployments (last 10, without build logs) plus the active deployment if it is not in that window, domains (last 20), template, and deployment count.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/api/v1/servers/{id}/github/branches":{"get":{"operationId":"getApiV1ServersByIdGithubBranches","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"branches":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"commitSha":{"type":"string"},"protected":{"type":"boolean"}},"required":["name","commitSha","protected"]}}},"required":["branches"]}}}},"400":{"description":"No linked repo or disconnected installation"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"List branches for the server's linked GitHub repository. Resolves the correct installation from the connected repository.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/api/v1/servers/{id}/github/tree-paths":{"get":{"operationId":"getApiV1ServersByIdGithubTreePaths","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string"}},"truncated":{"type":"boolean"}},"required":["paths","truncated"]}}}},"400":{"description":"No linked repo or missing branch"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"List unique directory paths and Dockerfile-like file paths in the linked GitHub repo for a branch (rootDir / watch-path / Dockerfile autocomplete). Defaults ref to the server's production branch.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true},{"in":"query","name":"ref","schema":{"type":"string","minLength":1,"maxLength":512}}]}},"/api/v1/servers/{id}/submission-draft":{"get":{"operationId":"getApiV1ServersByIdSubmissionDraft","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"boolean","const":true},"mcpServerUrl":{"type":"string"},"toolsFetchOk":{"type":"boolean"},"toolsFetchError":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing":{"type":"object","properties":{"appName":{"type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"privacyPolicyUrl":{"type":"string"},"termsOfServiceUrl":{"type":"string"},"demoRecordingUrl":{"type":"string"},"categorySuggestion":{"type":"string"},"releaseNotes":{"type":"string"}},"required":["appName","subtitle","description","privacyPolicyUrl","termsOfServiceUrl","demoRecordingUrl","categorySuggestion","releaseNotes"]},"toolJustifications":{"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string"},"readOnlyHint":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"openWorldHint":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"destructiveHint":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"templateJustification":{"type":"string"}},"required":["toolName","readOnlyHint","openWorldHint","destructiveHint","templateJustification"]}},"positiveTestCasesMarkdown":{"type":"string"},"negativeTestCasesMarkdown":{"type":"string"}},"required":["preview","mcpServerUrl","toolsFetchOk","toolsFetchError","listing","toolJustifications","positiveTestCasesMarkdown","negativeTestCasesMarkdown"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"ChatGPT App Directory draft payload: listing placeholders, tool justification templates from live tools/list (when reachable), and Markdown skeletons for reviewer test cases. Preview only — verify against OpenAI's submission form.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/servers/{id}/gateway-metrics":{"get":{"operationId":"getApiV1ServersByIdGatewayMetrics","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"totalEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"successEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"avgDuration":{"type":"number"},"avgRequestSize":{"anyOf":[{"type":"number"},{"type":"null"}]},"avgResponseSize":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["totalEvents","successEvents","errorEvents","avgDuration","avgRequestSize","avgResponseSize"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Aggregated gateway observability metrics for a server since startTime (policy-enforced).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"startTime","schema":{"type":"string","minLength":1},"required":true,"description":"ISO 8601 lower bound (inclusive)"},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255},"description":"Optional environment scope: branch name to filter to its preview subdomain. Omit for production."}]}},"/api/v1/servers/{id}/gateway-events":{"get":{"operationId":"getApiV1ServersByIdGatewayEvents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"time":{"type":"string"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"server_id":{"type":"string"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcp_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcp_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcp_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcp_response_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"request_payload":{"anyOf":[{},{"type":"null"}]},"response_payload":{"anyOf":[{},{"type":"null"}]},"client_info":{"anyOf":[{},{"type":"null"}]},"protocol_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"server_info":{"anyOf":[{},{"type":"null"}]},"tool_call_success":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"http_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"anyOf":[{"type":"string"},{"type":"null"}]},"query_params":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"request_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"response_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"resource_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_ip":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"referer":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"subdomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"cf_ray":{"anyOf":[{"type":"string"},{"type":"null"}]},"auth_method":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","time","request_id","server_id","user_id","mcp_method","mcp_request_id","mcp_session_id","mcp_response_status","request_payload","response_payload","client_info","protocol_version","server_info","tool_call_success","error_code","error_message","http_method","path","query_params","status_code","duration_ms","request_size","response_size","resource_type","resource_name","client_ip","country","user_agent","origin","referer","target_url","subdomain","hostname","status","cf_ray","auth_method"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["events","nextCursor"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Paginated gateway observability events for a server (keyset via cursor, policy-enforced).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"startTime","schema":{"type":"string","minLength":1},"required":true,"description":"ISO 8601 lower bound (inclusive)"},{"in":"query","name":"endTime","schema":{"type":"string"},"description":"ISO 8601 upper bound (exclusive)"},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":1000}},{"in":"query","name":"cursor","schema":{"type":"string"},"description":"ISO 8601 exclusive upper bound (events strictly older than this)"},{"in":"query","name":"status","schema":{"type":"string","enum":["success","error","4xx","5xx"]},"description":"Filter by event status or status code range"},{"in":"query","name":"mcpOnly","schema":{"default":false,"type":"boolean"},"description":"Only include recognized MCP protocol events"},{"in":"query","name":"search","schema":{"type":"string","maxLength":500},"description":"Server-side search. Supports tokens like status:200, status:4xx, tool:<name>, client:<name>, session:<id>, duration>100, duration<500 plus free text."},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255},"description":"Optional environment scope: branch name to filter to its preview subdomain. Omit for production."}]}},"/api/v1/servers/{id}/analytics/requests-by-country":{"get":{"operationId":"getApiV1ServersByIdAnalyticsRequestsByCountry","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"requestCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sessionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clients":{"type":"array","items":{"type":"object","properties":{"clientName":{"type":"string"},"requestCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["clientName","requestCount"]}}},"required":["country","requestCount","sessionCount","clients"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Requests grouped by country for a server over a time range (policy-enforced).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"timeRange","schema":{"default":"30d","type":"string","enum":["7d","30d","90d"]}},{"in":"query","name":"excludeToolsList","schema":{"default":true,"type":"boolean"}},{"in":"query","name":"groupBy","schema":{"type":"string","enum":["day","week","month"]}},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/servers/{id}/analytics/client-breakdown":{"get":{"operationId":"getApiV1ServersByIdAnalyticsClientBreakdown","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"type":"array","items":{"type":"object","properties":{"clientName":{"type":"string"},"clientVersion":{"type":"string"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["clientName","clientVersion","protocol","sessionCount","requestCount"]}},"timeline":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string"},"clientName":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["bucket","clientName","count"]}}},"required":["clients","timeline"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Client breakdown (sessions + requests per client) and timeline for a server.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"timeRange","schema":{"default":"30d","type":"string","enum":["24h","7d","30d","90d"]}},{"in":"query","name":"granularity","schema":{"default":"day","type":"string","enum":["minute","hour","day","week","month"]}},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/servers/{id}/analytics/tool-breakdown":{"get":{"operationId":"getApiV1ServersByIdAnalyticsToolBreakdown","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"breakdown":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string"},"method":{"type":"string"},"resourceName":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["bucket","method","resourceName","count"]}}},"required":["breakdown"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Tool / resource / prompt usage breakdown bucketed by time for a server.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"timeRange","schema":{"default":"30d","type":"string","enum":["24h","7d","30d","90d"]}},{"in":"query","name":"granularity","schema":{"default":"day","type":"string","enum":["minute","hour","day","week","month"]}},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/servers/{id}/domain/status":{"get":{"operationId":"getApiV1ServersByIdDomainStatus","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"verified":{"type":"boolean"},"hostnameId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"sslStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"verificationErrors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified","hostnameId","status","sslStatus","cnameTarget","configuredAt","verificationErrors"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Get custom domain status for a server","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/domain/verify":{"post":{"operationId":"postApiV1ServersByIdDomainVerify","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"verified":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"sslStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"verificationErrors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["success","verified"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No domain configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"domain":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Verify custom hostname for a server. Checks Cloudflare Custom Hostname status — both hostname and SSL must be active.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/domain/request":{"post":{"operationId":"postApiV1ServersByIdDomainRequest","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"domain":{"type":"string"},"hostnameId":{"type":"string"},"status":{"type":"string"},"sslStatus":{"type":"string"},"cnameTarget":{"type":"null"},"dnsInstructions":{"type":"string"}},"required":["success","domain","hostnameId","status","sslStatus","cnameTarget","dnsInstructions"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"domain":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Server not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"domain":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Domain already in use (same hostname on another server you can access, or globally)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"domain":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Request a custom domain for a server. Creates a Cloudflare Custom Hostname and returns CNAME instructions. Domain starts unverified — call verify after configuring DNS.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1},"branch":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["domain"]}}}}}},"/api/v1/servers/{id}/domain/cancel-removal":{"post":{"operationId":"postApiV1ServersByIdDomainCancelRemoval","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"pending":{"type":"boolean"},"pendingRemovalAt":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Cancel pending custom domain removal for a server","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/domain/sync":{"post":{"operationId":"postApiV1ServersByIdDomainSync","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"pending":{"type":"boolean"},"pendingRemovalAt":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"No activated custom domain or no active deployment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"domain":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"Gateway KV write failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"domain":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Re-sync gateway routing for a server based on current domain state. Useful to force a slug-routing cutover (disable the bare slug subdomain in favor of an active custom domain) without waiting for a production redeploy. Requires at least one custom domain already activated by a previous prod deploy (`activatedAt != null`) — otherwise the custom domain mapping isn't in gateway KV yet and disabling the slug would leave the server unreachable.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/domain":{"delete":{"operationId":"deleteApiV1ServersByIdDomain","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"pending":{"type":"boolean"},"pendingRemovalAt":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Remove custom domain from a server","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/public-chat/config":{"get":{"operationId":"getApiV1ServersByIdPublicChatConfig","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"enabled":{"type":"boolean"},"showSecurityWarningBanner":{"type":"boolean"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"suggestedQuestions":{"type":"array","items":{"type":"string"}},"agentId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","enabled","showSecurityWarningBanner","title","description","suggestedQuestions","agentId","createdBy","createdAt","updatedAt"]},{"type":"null"}]},"hasConfig":{"type":"boolean"},"publicChatUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["config","hasConfig","publicChatUrl"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["PublicChat"],"description":"Get server public chat config (owner/org access only).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1ServersByIdPublicChatConfig","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"enabled":{"type":"boolean"},"showSecurityWarningBanner":{"type":"boolean"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"suggestedQuestions":{"type":"array","items":{"type":"string"}},"agentId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","enabled","showSecurityWarningBanner","title","description","suggestedQuestions","agentId","createdBy","createdAt","updatedAt"]},{"type":"null"}]},"hasConfig":{"type":"boolean"},"publicChatUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["config","hasConfig","publicChatUrl"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["PublicChat"],"description":"Create/update public chat config for a server. First row is created only when enabled=true.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"showSecurityWarningBanner":{"type":"boolean"},"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"suggestedQuestions":{"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}}}}}}}},"/api/v1/servers/{id}/public-chat/chats":{"get":{"operationId":"getApiV1ServersByIdPublicChatChats","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","createdAt","updatedAt","userId"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["PublicChat"],"description":"Paginated list of stored public chat transcripts for a server.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]}},"/api/v1/servers/{id}/public-chat/chats/{chatId}/events":{"get":{"operationId":"getApiV1ServersByIdPublicChatChatsByChatIdEvents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chatId":{"type":"string"},"type":{"type":"string"},"eventData":{},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","chatId","type","eventData","createdBy","createdAt"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["PublicChat"],"description":"Read stored events for a single public chat transcript.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"chatId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/public-chat/generate-quick-questions":{"post":{"operationId":"postApiV1ServersByIdPublicChatGenerateQuickQuestions","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal error"}},"tags":["PublicChat"],"description":"Generate 3–6 quick-prompt chips shown on the public chat landing. Uses Claude Haiku over the MCP server's tool list, persists the result to PublicChatConfig.suggestedQuestions, and syncs to the gateway KV. Owner/org access only.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/source":{"post":{"operationId":"postApiV1ServersByIdSource","responses":{"200":{"description":"Pushed","content":{"application/json":{"schema":{"type":"object","properties":{"commitSha":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"htmlUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"type":"string"}},"required":["commitSha","repoFullName","htmlUrl","branch"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Mango/Vibe: push a new gzip tarball as a commit on the server's GitHub repo (redeploy). Multipart: sourceFile, branch, commitMessage.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/repository/migrate":{"post":{"operationId":"postApiV1ServersByIdRepositoryMigrate","responses":{"200":{"description":"Migrated","content":{"application/json":{"schema":{"type":"object","properties":{"repoFullName":{"type":"string"},"deploymentId":{"type":"string"}},"required":["repoFullName","deploymentId"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Move a managed server's repo into the user's connected GitHub installation (re-create + push), then redeploy from it.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"repoName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9._-]+$"},"private":{"type":"boolean"}},"required":["installationId"]}}}}}},"/api/v1/deployments":{"get":{"operationId":"getApiV1Deployments","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"source":{},"status":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"healthCheckPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"appName":{"type":"string"},"providerInfo":{"anyOf":[{},{"type":"null"}]},"pipelineMeta":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildLogs":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"pipelinePhase":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"serverId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"failureMeta":{"anyOf":[{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"feature":{"type":"string","enum":["projects","teamMembers","region","previewDeploys","coldStart","requestsPerMonth","logRetention","githubOrg","customDomain"]},"currentTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"requiredTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"current":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["error","code","feature","currentTier","requiredTier"]},{"type":"null"}]},"mcpUrl":{"type":"string"}},"required":["id","name","source","status","port","healthCheckPath","provider","appName","providerInfo","pipelineMeta","error","buildLogs","gitCommitSha","gitBranch","gitCommitMessage","isProductionDeployment","previousDeploymentId","deploymentVersion","deploymentTrigger","pipelinePhase","userId","serverId","organizationId","createdAt","updatedAt","buildStartedAt","buildCompletedAt","archivedAt","mcpUrl"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"List deployments visible to the current user. Optional filters: serverId, organizationId, status, take (max 100).","parameters":[{"in":"query","name":"serverId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"organizationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1Deployments","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Plan limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"feature":{"type":"string","enum":["projects","teamMembers","region","previewDeploys","coldStart","requestsPerMonth","logRetention","githubOrg","customDomain"]},"currentTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"requiredTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"current":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["error","code","feature","currentTier","requiredTier"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Trigger a new deployment for an existing GitHub server","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"serverId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","maxLength":255},"branch":{"type":"string"},"commitSha":{"type":"string"},"commitMessage":{"type":"string"},"trigger":{"type":"string","enum":["manual","webhook","redeploy","rollback"]},"prNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["serverId"]}}}}}},"/api/v1/deployments/{id}":{"get":{"operationId":"getApiV1DeploymentsById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"source":{},"status":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"healthCheckPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"appName":{"type":"string"},"providerInfo":{"anyOf":[{},{"type":"null"}]},"pipelineMeta":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildLogs":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"pipelinePhase":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"serverId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"failureMeta":{"anyOf":[{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"feature":{"type":"string","enum":["projects","teamMembers","region","previewDeploys","coldStart","requestsPerMonth","logRetention","githubOrg","customDomain"]},"currentTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"requiredTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"current":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["error","code","feature","currentTier","requiredTier"]},{"type":"null"}]},"mcpUrl":{"type":"string"}},"required":["id","name","source","status","port","healthCheckPath","provider","appName","providerInfo","pipelineMeta","error","buildLogs","gitCommitSha","gitBranch","gitCommitMessage","isProductionDeployment","previousDeploymentId","deploymentVersion","deploymentTrigger","pipelinePhase","userId","serverId","organizationId","createdAt","updatedAt","buildStartedAt","buildCompletedAt","archivedAt","mcpUrl"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Get a single deployment by ID","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]},"delete":{"operationId":"deleteApiV1DeploymentsById","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Delete a deployment and tear down its infrastructure","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]},"patch":{"operationId":"patchApiV1DeploymentsById","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"source":{},"status":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"healthCheckPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"appName":{"type":"string"},"providerInfo":{"anyOf":[{},{"type":"null"}]},"pipelineMeta":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildLogs":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"pipelinePhase":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"serverId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"failureMeta":{"anyOf":[{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"feature":{"type":"string","enum":["projects","teamMembers","region","previewDeploys","coldStart","requestsPerMonth","logRetention","githubOrg","customDomain"]},"currentTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"requiredTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"current":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["error","code","feature","currentTier","requiredTier"]},{"type":"null"}]},"mcpUrl":{"type":"string"}},"required":["id","name","source","status","port","healthCheckPath","provider","appName","providerInfo","pipelineMeta","error","buildLogs","gitCommitSha","gitBranch","gitCommitMessage","isProductionDeployment","previousDeploymentId","deploymentVersion","deploymentTrigger","pipelinePhase","userId","serverId","organizationId","createdAt","updatedAt","buildStartedAt","buildCompletedAt","archivedAt","mcpUrl"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Update a deployment","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildLogs":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildStartedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"buildCompletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"providerInfo":{"anyOf":[{},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}}}}}}}},"/api/v1/deployments/{id}/build-logs":{"get":{"operationId":"getApiV1DeploymentsByIdBuildLogs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"string"},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalLength":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string"}},"required":["logs","offset","totalLength","status"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Get build logs for a deployment. Supports offset-based tailing: pass `offset` (character index) to receive only new content appended after that position. Returns `logs` (the text slice), `offset` (character position to send on the next request), `status` (current deployment status), and `totalLength`.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}}]}},"/api/v1/deployments/{id}/logs":{"get":{"operationId":"getApiV1DeploymentsByIdLogs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"string"}},"required":["logs"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Get runtime logs for a deployment. Optional query `lines` (1–5000) limits how many trailing log lines are returned after provider fetch.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true},{"in":"query","name":"lines","schema":{"type":"integer","minimum":1,"maximum":5000}}]}},"/api/v1/deployments/{id}/stop":{"post":{"operationId":"postApiV1DeploymentsByIdStop","responses":{"200":{"description":"Stopped","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Stop a running deployment","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/api/v1/deployments/{id}/activate":{"post":{"operationId":"postApiV1DeploymentsByIdActivate","responses":{"200":{"description":"Activated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"source":{},"status":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"healthCheckPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"appName":{"type":"string"},"providerInfo":{"anyOf":[{},{"type":"null"}]},"pipelineMeta":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildLogs":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"pipelinePhase":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"serverId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"failureMeta":{"anyOf":[{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"feature":{"type":"string","enum":["projects","teamMembers","region","previewDeploys","coldStart","requestsPerMonth","logRetention","githubOrg","customDomain"]},"currentTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"requiredTier":{"type":"string","enum":["free","hobby","startup","enterprise"]},"current":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["error","code","feature","currentTier","requiredTier"]},{"type":"null"}]},"mcpUrl":{"type":"string"}},"required":["id","name","source","status","port","healthCheckPath","provider","appName","providerInfo","pipelineMeta","error","buildLogs","gitCommitSha","gitBranch","gitCommitMessage","isProductionDeployment","previousDeploymentId","deploymentVersion","deploymentTrigger","pipelinePhase","userId","serverId","organizationId","createdAt","updatedAt","buildStartedAt","buildCompletedAt","archivedAt","mcpUrl"]}}}},"400":{"description":"Deployment cannot be activated (not running or missing hostname)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Deployments"],"description":"Promote a deployment to be the active (production) deployment for its server. Updates gateway routing, server config, and tears down the previous production deployment.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/api/v1/chats/shared/{token}":{"get":{"operationId":"getApiV1ChatsSharedByToken","tags":["Chats"],"description":"Get a shared chat by its share token (public, no auth required)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"agentId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareIsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["chat","agent_execution"]}},"required":["id","title","agentId","organizationId","userId","shareToken","shareCreatedBy","shareCreatedAt","shareUntil","shareIsActive","createdAt","updatedAt","type"]},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"llmModel":{"type":"string"},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxSteps":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"codeMode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"serverPoolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"isPublic":{"type":"boolean"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","description","llmModel","systemPrompt","maxSteps","codeMode","serverPoolId","organizationId","creatorId","isPublic","displayPreferences","createdAt","updatedAt"]},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chatId":{"type":"string"},"type":{"type":"string"},"eventData":{},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","chatId","type","eventData","createdBy","createdAt"]}},"serverSlugs":{"type":"array","items":{"type":"string"}},"primaryMcpUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["chat","agent","events","serverSlugs","primaryMcpUrl"]}}}}},"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":1,"maxLength":512},"required":true}]}},"/api/v1/chats":{"get":{"operationId":"getApiV1Chats","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"agentId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareIsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["chat","agent_execution"]},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]}},"required":["id","title","agentId","organizationId","userId","shareToken","shareCreatedBy","shareCreatedAt","shareUntil","shareIsActive","createdAt","updatedAt","type","agent"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"List chats visible to the current user","parameters":[{"in":"query","name":"agentId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"type","schema":{"type":"string","enum":["chat","agent_execution"]}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1Chats","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"agentId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareIsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["chat","agent_execution"]}},"required":["id","title","agentId","organizationId","userId","shareToken","shareCreatedBy","shareCreatedAt","shareUntil","shareIsActive","createdAt","updatedAt","type"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"Create a new chat","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"default":"New Chat","type":"string"},"agentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["chat","agent_execution"]}},"required":["title","agentId"]}}}}}},"/api/v1/chats/{id}/generate-title":{"post":{"operationId":"postApiV1ChatsByIdGenerateTitle","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"]}}}},"400":{"description":"No user message stored yet"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"Title generation failed"}},"tags":["Chats"],"description":"Suggest a chat title from the first persisted user message (no request body; not derived from client-supplied text).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/chats/{id}":{"get":{"operationId":"getApiV1ChatsById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"agentId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareIsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["chat","agent_execution"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chatId":{"type":"string"},"type":{"type":"string"},"eventData":{},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","chatId","type","eventData","createdBy","createdAt"]}}},"required":["id","title","agentId","organizationId","userId","shareToken","shareCreatedBy","shareCreatedAt","shareUntil","shareIsActive","createdAt","updatedAt","type","events"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"Get a single chat by ID, including events","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1ChatsById","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"agentId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareIsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["chat","agent_execution"]}},"required":["id","title","agentId","organizationId","userId","shareToken","shareCreatedBy","shareCreatedAt","shareUntil","shareIsActive","createdAt","updatedAt","type"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"Update a chat","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"shareToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareCreatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"shareIsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteApiV1ChatsById","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"Delete a chat","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/chats/{id}/share":{"post":{"operationId":"postApiV1ChatsByIdShare","responses":{"200":{"description":"Share token created","content":{"application/json":{"schema":{"type":"object","properties":{"shareToken":{"type":"string"},"shareCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"shareUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["shareToken","shareCreatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"Generate a share token for a chat, making it publicly readable","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/chats/{id}/events":{"get":{"operationId":"getApiV1ChatsByIdEvents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chatId":{"type":"string"},"type":{"type":"string"},"eventData":{},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","chatId","type","eventData","createdBy","createdAt"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"List events for a chat","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/chats/{id}/stream":{"post":{"operationId":"allApiV1Chats","responses":{"200":{"description":"Streaming text/plain body (Vercel AI Data Stream v1). Not JSON — see route description."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Configuration or server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Chats"],"description":"Stream an assistant reply for a chat using the Vercel AI data-stream protocol (text/plain; custom line-oriented codes). Requires a non-empty `messages` array (AI SDK / model messages). Optional `disabledTools` omits those tool names from the MCP toolset. Request body schema comes from the route JSON validator.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"minItems":1,"type":"array","items":{}},"disabledTools":{"type":"array","items":{"type":"string"}},"serverBranchById":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["messages"],"additionalProperties":{}}}}}}},"/api/v1/server-pools":{"get":{"operationId":"getApiV1ServerPools","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlugs":{"type":"array","items":{"type":"string"}},"userId":{"type":"string"},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}}},"required":["id","name","description","serverSlugs","userId","organizationId","createdAt","updatedAt","displayPreferences"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Server Pools"],"description":"List server pools visible to the current user","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1ServerPools","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlugs":{"type":"array","items":{"type":"string"}},"userId":{"type":"string"},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"servers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]}}},"required":["id","name","description","serverSlugs","userId","organizationId","createdAt","updatedAt","displayPreferences","servers"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Server Pools"],"description":"Create a new server pool. Optional serverIds connects M:N servers; serverSlugs is derived from those servers when serverIds is non-empty.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlugs":{"type":"array","items":{"type":"string"}},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"serverIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"icon":{"type":"string"},"color":{"type":"string"}},"required":["name","organizationId","displayPreferences","userId"]}}}}}},"/api/v1/server-pools/{id}":{"get":{"operationId":"getApiV1ServerPoolsById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlugs":{"type":"array","items":{"type":"string"}},"userId":{"type":"string"},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"servers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]}}},"required":["id","name","description","serverSlugs","userId","organizationId","createdAt","updatedAt","displayPreferences","servers"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Server Pools"],"description":"Get a single server pool by ID (includes linked servers)","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1ServerPoolsById","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlugs":{"type":"array","items":{"type":"string"}},"userId":{"type":"string"},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"servers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"config":{},"dashboardConnectionUrls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"slugRoutingDisabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"status":{"type":"string"},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"type":"string","enum":["AUTO","US","EU","APAC"]},"providerRegion":{"type":"string"},"runProvider":{"type":"string"},"buildProvider":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedRepository":{"type":"object","properties":{"id":{"type":"string"},"repoFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"productionBranch":{"type":"string"},"watchPaths":{"type":"array","items":{"type":"string"}},"deployBranchPatterns":{"type":"array","items":{"type":"string"}},"waitForCi":{"type":"boolean"},"pendingWebhookCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingWebhookPrNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pendingWebhookCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isManaged":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"githubInstallationId":{"type":"string"}},"required":["id","repoFullName","productionBranch","watchPaths","deployBranchPatterns","waitForCi","pendingWebhookCommitSha","pendingWebhookBranch","pendingWebhookPrNumber","pendingWebhookCommitMessage","isActive","isManaged","createdAt","updatedAt","userId","githubInstallationId"]},"latestDeploymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string"},"pendingRemovalAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domain","verified"]}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string"},"provider":{"type":"string"},"appName":{"type":"string"},"buildStartedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"buildCompletedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"gitCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"gitCommitMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverId":{"type":"string"},"isProductionDeployment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"deploymentVersion":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"deploymentTrigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","createdAt","updatedAt","status","provider","appName","buildStartedAt","buildCompletedAt","gitCommitSha","gitBranch","gitCommitMessage","serverId","isProductionDeployment","deploymentVersion","deploymentTrigger","archivedAt"]}},"_count":{"type":"object","properties":{"deployments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"gatewayDomain":{"type":"string"},"isExternal":{"type":"boolean"},"environments":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["production","branch"]},"label":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeDeploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"chatUrl":{"type":"string"},"slugGatewayHostname":{"type":"string"},"customDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","verified"]}}},"required":["kind","label","branch","activeDeploymentId","mcpUrl","dashboardUrl","chatUrl","slugGatewayHostname","customDomains"]}}},"required":["id","slug","pendingSlug","name","description","tags","config","dashboardConnectionUrls","createdAt","updatedAt","slugRoutingDisabledAt","displayPreferences","status","activeDeploymentId","previousDeploymentId","connectedRepositoryId","externalUrl","region","providerRegion","runProvider","buildProvider","organizationId","userId","mcpUrl","dashboardUrl","chatUrl","gatewayDomain","isExternal","environments"]}}},"required":["id","name","description","serverSlugs","userId","organizationId","createdAt","updatedAt","displayPreferences","servers"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Server Pools"],"description":"Update a server pool. When serverIds is sent (including []), replaces M:N membership and syncs serverSlugs.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlugs":{"type":"array","items":{"type":"string"}},"displayPreferences":{"type":"object","properties":{"icon":{"type":"string"},"color":{"type":"string"}}},"serverIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"icon":{"type":"string"},"color":{"type":"string"}}}}}}},"delete":{"operationId":"deleteApiV1ServerPoolsById","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Server Pools"],"description":"Delete a server pool","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/user-preferences":{"get":{"operationId":"getApiV1UserPreferences","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"defaultOrganizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notifyDeploymentFailed":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["userId","defaultOrganizationId","notifyDeploymentFailed","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["User Preferences"],"description":"Get preferences for the current user"},"put":{"operationId":"putApiV1UserPreferences","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"defaultOrganizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notifyDeploymentFailed":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["userId","defaultOrganizationId","notifyDeploymentFailed","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["User Preferences"],"description":"Create or update preferences for the current user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"defaultOrganizationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"notifyDeploymentFailed":{"type":"boolean"}}}}}}}},"/api/v1/onboarding":{"post":{"operationId":"postApiV1Onboarding","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Onboarding"],"description":"Save onboarding progress and optionally mark as completed","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"boolean"},"whatTryingToDo":{"type":"array","items":{"type":"string"}},"useCase":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"company":{"type":"string"},"companyWebsite":{"type":"string"},"companySize":{"type":"string"},"role":{"type":"string"},"fullName":{"type":"string"}}}}}}}},"/api/v1/organizations/{id}/analytics/tool-calls":{"get":{"operationId":"getApiV1OrganizationsByIdAnalyticsToolCalls","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Organizations"],"description":"Count of MCP tool calls across all org servers since startTime (policy-enforced, plan retention clamped).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"startTime","schema":{"type":"string","minLength":1},"required":true,"description":"ISO 8601 lower bound (inclusive)"}]}},"/api/v1/organizations/{id}/analytics/sessions":{"get":{"operationId":"getApiV1OrganizationsByIdAnalyticsSessions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Organizations"],"description":"Count of distinct MCP sessions across all org servers since startTime (policy-enforced, plan retention clamped).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"startTime","schema":{"type":"string","minLength":1},"required":true,"description":"ISO 8601 lower bound (inclusive)"}]}},"/api/v1/organizations/{id}/logo":{"post":{"operationId":"postApiV1OrganizationsByIdLogo","responses":{"200":{"description":"Logo uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Organizations"],"description":"Upload or replace the organization logo. Accepts multipart/form-data with a single `file` field (PNG, JPEG, WebP, GIF; max 2 MB). Returns the public URL of the uploaded image.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}}}},"/api/v1/billing/{id}":{"get":{"operationId":"getApiV1BillingById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"object","properties":{"name":{"type":"string"},"tier":{"type":"string","enum":["free","hobby","startup","enterprise","custom"]},"displayName":{"type":"string"},"interval":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}]},"limits":{"type":"object","properties":{"projects":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"requestsPerMonth":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"analyticsDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"regions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","const":"all"}]},"previewDeploys":{"type":"boolean"},"githubOrgDeployAllowed":{"type":"boolean"},"coldStart":{"type":"boolean"},"teamMembers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"support":{"type":"string","enum":["community","email","slack","priority"]}},"required":["projects","requestsPerMonth","analyticsDays","regions","previewDeploys","githubOrgDeployAllowed","coldStart","teamMembers","support"]},"features":{"type":"array","items":{"type":"string"}}},"required":["name","tier","displayName","interval","limits","features"]},"effectiveLimits":{"type":"object","properties":{"projects":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"requestsPerMonth":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"analyticsDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"regions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","const":"all"}]},"previewDeploys":{"type":"boolean"},"githubOrgDeployAllowed":{"type":"boolean"},"coldStart":{"type":"boolean"},"teamMembers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"support":{"type":"string","enum":["community","email","slack","priority"]}},"required":["projects","requestsPerMonth","analyticsDays","regions","previewDeploys","githubOrgDeployAllowed","coldStart","teamMembers","support"]},"features":{"type":"array","items":{"type":"string"}},"subscription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"periodStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"periodEnd":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"cancelAtPeriodEnd":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"cancelAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"billingInterval":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","periodStart","periodEnd","cancelAtPeriodEnd","cancelAt","billingInterval","stripeSubscriptionId"]},{"type":"null"}]},"usage":{"type":"object","properties":{"projects":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestsThisPeriod":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"periodStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"periodEnd":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["projects","requestsThisPeriod","periodStart","periodEnd"]}},"required":["plan","effectiveLimits","features","subscription","usage"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Billing"],"description":"Summary of the org's current plan, effective entitlements (base plan + active add-ons), subscription state, and current-period usage.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/billing/{id}/portal":{"post":{"operationId":"postApiV1BillingByIdPortal","responses":{"200":{"description":"Portal session created","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Billing"],"description":"Create a Stripe Billing Portal session for the org and return its redirect URL. Requires org membership.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","format":"uri"}},"required":["returnUrl"]}}}}}},"/api/v1/plan-catalog":{"get":{"operationId":"getApiV1PlanCatalog","tags":["Billing"],"description":"Public catalog of available plans. Returns two views of the same data: `plans` is a flat array (one row per active Price; convenient for monthly/yearly toggle UIs) and `catalog` is a Plan-grouped array (one entry per Plan with all of its prices + entitlement keys nested).","responses":{"200":{"description":"Public plan catalog","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"tier":{"type":"string","enum":["free","hobby","startup","enterprise","custom"]},"displayName":{"type":"string"},"interval":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}]},"priceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"type":"object","properties":{"projects":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"requestsPerMonth":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"analyticsDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"regions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","const":"all"}]},"previewDeploys":{"type":"boolean"},"githubOrgDeployAllowed":{"type":"boolean"},"coldStart":{"type":"boolean"},"teamMembers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"support":{"type":"string","enum":["community","email","slack","priority"]}},"required":["projects","requestsPerMonth","analyticsDays","regions","previewDeploys","githubOrgDeployAllowed","coldStart","teamMembers","support"]},"features":{"type":"array","items":{"type":"string"}}},"required":["name","tier","displayName","interval","priceId","limits","features"]}},"catalog":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lookupKey":{"type":"string"},"displayName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"type":"string","enum":["free","hobby","startup","enterprise","custom"]},"isPublic":{"type":"boolean"},"limits":{"type":"object","properties":{"projects":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"requestsPerMonth":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"analyticsDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"regions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","const":"all"}]},"previewDeploys":{"type":"boolean"},"githubOrgDeployAllowed":{"type":"boolean"},"coldStart":{"type":"boolean"},"teamMembers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","const":"unlimited"}]},"support":{"type":"string","enum":["community","email","slack","priority"]}},"required":["projects","requestsPerMonth","analyticsDays","regions","previewDeploys","githubOrgDeployAllowed","coldStart","teamMembers","support"]},"features":{"type":"array","items":{"type":"object","properties":{"lookupKey":{"type":"string"},"name":{"type":"string"},"metadata":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"limit"},"limit":{"type":"string","enum":["projects","requestsPerMonth","analyticsDays","teamMembers"]},"value":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}]}},"required":["kind","limit","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"region"},"region":{"type":"string"}},"required":["kind","region"]},{"type":"object","properties":{"kind":{"type":"string","const":"scalar"},"scalar":{"type":"string","const":"support"},"value":{"type":"string","enum":["community","email","slack","priority"]}},"required":["kind","scalar","value"]}]}},"required":["lookupKey","name","metadata"]}},"prices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lookupKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string"},"unitAmount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"interval":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}]}},"required":["id","lookupKey","currency","unitAmount","interval"]}},"display":{"anyOf":[{"type":"object","properties":{"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"highlighted":{"type":"boolean"},"priceNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardFeatures":{"type":"array","items":{"type":"string"}},"prices":{"type":"object","properties":{"monthly":{"anyOf":[{"type":"number"},{"type":"string","const":"Custom"}]},"yearly":{"anyOf":[{"type":"number"},{"type":"string","const":"Custom"}]}},"required":["monthly","yearly"]}},"required":["subtitle","highlighted","priceNote","cardFeatures","prices"]},{"type":"null"}]}},"required":["id","lookupKey","displayName","description","tier","isPublic","limits","features","prices","display"]}},"comparisonSections":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"features":{"type":"array","items":{"type":"object","properties":{"feature":{"type":"string"},"free":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"hobby":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"startup":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"enterprise":{"anyOf":[{"type":"string"},{"type":"boolean"}]}},"required":["feature","free","hobby","startup","enterprise"]}}},"required":["title","features"]}},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["plans","catalog","comparisonSections","generatedAt"]}}}}}}},"/api/v1/permissions/catalog":{"get":{"operationId":"getApiV1PermissionsCatalog","tags":["Permissions"],"description":"Permission resources and default org role grants","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"},"description":{"type":"string"},"internal":{"type":"boolean"},"actions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]}}},"required":["resource","label","group","actions"]}},"defaultRoles":{"type":"object","properties":{"member":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"admin":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"owner":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["member","admin","owner"]}},"required":["resources","defaultRoles"]}}}}}}},"/api/v1/models":{"get":{"operationId":"getApiV1Models","tags":["Models"],"description":"List curated LLM models from OpenRouter (tools-capable slugs, server-cached).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"number"},{"type":"null"}]},"supportsTools":{"type":"boolean"},"pricing":{"anyOf":[{"type":"object","properties":{"prompt":{"anyOf":[{"type":"number"},{"type":"null"}]},"completion":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["prompt","completion"]},{"type":"null"}]}},"required":["id","name","provider","description","contextLength","supportsTools","pricing"]}},"cachedAt":{"type":"string"},"defaultModelId":{"type":"string"}},"required":["models","cachedAt","defaultModelId"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/server-evals/{serverId}/suites":{"get":{"operationId":"getApiV1ServerEvalsByServerIdSuites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"type":"string"},"name":{"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"rubric":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"requiredTools":{},"disallowedTools":{},"models":{},"toolNames":{},"runOn":{},"enabled":{"type":"boolean"},"clientTargets":{},"clientSettings":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"serverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"inputArgs":{},"assertions":{},"sortOrder":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scenarioId":{"type":"string"},"client":{"type":"string"},"modelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshots":{},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshotUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentResponse":{},"toolCalls":{},"conversation":{},"assertionResults":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rubricPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"toolsPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"judgement":{"anyOf":[{"type":"string"},{"type":"null"}]},"judgeModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolAssertions":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","scenarioId","client","modelName","status","startedAt","completedAt","durationMs","error","screenshots","videoUrl","screenshotUrl","agentResponse","toolCalls","conversation","assertionResults","score","pass","rubricPassed","toolsPassed","judgement","judgeModel","toolAssertions","createdAt","updatedAt"]}}},"required":["id","runId","type","name","description","prompt","flow","messages","requiredTools","toolNames","inputArgs","assertions","sortOrder","createdAt","updatedAt"]}}},"required":["id","suiteId","serverId","createdBy","status","serverUrl","prompt","flow","messages","requiredTools","toolNames","score","pass","startedAt","completedAt","createdAt","updatedAt"]}}},"required":["id","serverId","createdBy","name","prompt","flow","rubric","threshold","requiredTools","disallowedTools","models","toolNames","runOn","enabled","clientTargets","clientSettings","createdAt","updatedAt"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"List all eval suites for a server, each with its latest run.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postApiV1ServerEvalsByServerIdSuites","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"type":"string"},"name":{"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"rubric":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"requiredTools":{},"disallowedTools":{},"models":{},"toolNames":{},"runOn":{},"enabled":{"type":"boolean"},"clientTargets":{},"clientSettings":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"serverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"inputArgs":{},"assertions":{},"sortOrder":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scenarioId":{"type":"string"},"client":{"type":"string"},"modelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshots":{},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshotUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentResponse":{},"toolCalls":{},"conversation":{},"assertionResults":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rubricPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"toolsPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"judgement":{"anyOf":[{"type":"string"},{"type":"null"}]},"judgeModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolAssertions":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","scenarioId","client","modelName","status","startedAt","completedAt","durationMs","error","screenshots","videoUrl","screenshotUrl","agentResponse","toolCalls","conversation","assertionResults","score","pass","rubricPassed","toolsPassed","judgement","judgeModel","toolAssertions","createdAt","updatedAt"]}}},"required":["id","runId","type","name","description","prompt","flow","messages","requiredTools","toolNames","inputArgs","assertions","sortOrder","createdAt","updatedAt"]}}},"required":["id","suiteId","serverId","createdBy","status","serverUrl","prompt","flow","messages","requiredTools","toolNames","score","pass","startedAt","completedAt","createdAt","updatedAt"]}}},"required":["id","serverId","createdBy","name","prompt","flow","rubric","threshold","requiredTools","disallowedTools","models","toolNames","runOn","enabled","clientTargets","clientSettings","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Create a new eval suite for a server.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"prompt":{"type":"string","maxLength":10000},"flow":{"default":[],"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"user"},"content":{"type":"string"}},"required":["kind","content"]},{"type":"object","properties":{"kind":{"type":"string","const":"tool_call"},"name":{"type":"string"},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","name"]},{"type":"object","properties":{"kind":{"type":"string","const":"assistant_text"},"note":{"type":"string"}},"required":["kind"]}]}},"rubric":{"type":"string","maxLength":10000},"threshold":{"default":0.7,"type":"number","minimum":0,"maximum":1},"requiredTools":{"default":[],"type":"array","items":{}},"disallowedTools":{"default":[],"type":"array","items":{"type":"string"}},"models":{"default":["openai/gpt-4o"],"type":"array","items":{"type":"string"}},"toolNames":{"default":[],"type":"array","items":{"type":"string"}},"runOn":{"default":["manual"],"type":"array","items":{"type":"string","enum":["manual","ci","cron"]}},"clientTargets":{"default":["inspector"],"type":"array","items":{"type":"string"}},"clientSettings":{}},"required":["name"]}}}}}},"/api/v1/server-evals/{serverId}/suites/{suiteId}":{"patch":{"operationId":"patchApiV1ServerEvalsByServerIdSuitesBySuiteId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"type":"string"},"name":{"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"rubric":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"requiredTools":{},"disallowedTools":{},"models":{},"toolNames":{},"runOn":{},"enabled":{"type":"boolean"},"clientTargets":{},"clientSettings":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"serverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"inputArgs":{},"assertions":{},"sortOrder":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scenarioId":{"type":"string"},"client":{"type":"string"},"modelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshots":{},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshotUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentResponse":{},"toolCalls":{},"conversation":{},"assertionResults":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rubricPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"toolsPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"judgement":{"anyOf":[{"type":"string"},{"type":"null"}]},"judgeModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolAssertions":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","scenarioId","client","modelName","status","startedAt","completedAt","durationMs","error","screenshots","videoUrl","screenshotUrl","agentResponse","toolCalls","conversation","assertionResults","score","pass","rubricPassed","toolsPassed","judgement","judgeModel","toolAssertions","createdAt","updatedAt"]}}},"required":["id","runId","type","name","description","prompt","flow","messages","requiredTools","toolNames","inputArgs","assertions","sortOrder","createdAt","updatedAt"]}}},"required":["id","suiteId","serverId","createdBy","status","serverUrl","prompt","flow","messages","requiredTools","toolNames","score","pass","startedAt","completedAt","createdAt","updatedAt"]}}},"required":["id","serverId","createdBy","name","prompt","flow","rubric","threshold","requiredTools","disallowedTools","models","toolNames","runOn","enabled","clientTargets","clientSettings","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Update an eval suite.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"suiteId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"prompt":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"flow":{"default":[],"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"user"},"content":{"type":"string"}},"required":["kind","content"]},{"type":"object","properties":{"kind":{"type":"string","const":"tool_call"},"name":{"type":"string"},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","name"]},{"type":"object","properties":{"kind":{"type":"string","const":"assistant_text"},"note":{"type":"string"}},"required":["kind"]}]}},"rubric":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"threshold":{"default":0.7,"type":"number","minimum":0,"maximum":1},"requiredTools":{"default":[],"type":"array","items":{}},"disallowedTools":{"default":[],"type":"array","items":{"type":"string"}},"models":{"default":["openai/gpt-4o"],"type":"array","items":{"type":"string"}},"toolNames":{"default":[],"type":"array","items":{"type":"string"}},"runOn":{"default":["manual"],"type":"array","items":{"type":"string","enum":["manual","ci","cron"]}},"clientTargets":{"default":["inspector"],"type":"array","items":{"type":"string"}},"clientSettings":{},"enabled":{"type":"boolean"}}}}}}},"delete":{"operationId":"deleteApiV1ServerEvalsByServerIdSuitesBySuiteId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Delete an eval suite, its runs, and cancel any in-flight BullMQ eval jobs.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"suiteId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/server-evals/{serverId}/suites/bulk-delete":{"post":{"operationId":"postApiV1ServerEvalsByServerIdSuitesBulkDelete","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"killedJobs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["deleted","killedJobs"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Delete many eval suites at once. Cascade-removes their runs/scenarios/executions and cancels any in-flight BullMQ eval jobs.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["ids"]}}}}}},"/api/v1/server-evals/{serverId}/suites/{suiteId}/runs":{"post":{"operationId":"postApiV1ServerEvalsByServerIdSuitesBySuiteIdRuns","responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"serverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"inputArgs":{},"assertions":{},"sortOrder":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scenarioId":{"type":"string"},"client":{"type":"string"},"modelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshots":{},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshotUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentResponse":{},"toolCalls":{},"conversation":{},"assertionResults":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rubricPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"toolsPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"judgement":{"anyOf":[{"type":"string"},{"type":"null"}]},"judgeModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolAssertions":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","scenarioId","client","modelName","status","startedAt","completedAt","durationMs","error","screenshots","videoUrl","screenshotUrl","agentResponse","toolCalls","conversation","assertionResults","score","pass","rubricPassed","toolsPassed","judgement","judgeModel","toolAssertions","createdAt","updatedAt"]}}},"required":["id","runId","type","name","description","prompt","flow","messages","requiredTools","toolNames","inputArgs","assertions","sortOrder","createdAt","updatedAt"]}}},"required":["id","suiteId","serverId","createdBy","status","serverUrl","prompt","flow","messages","requiredTools","toolNames","score","pass","startedAt","completedAt","createdAt","updatedAt"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Trigger a new eval run for a suite. Returns 202 while the run executes in the background.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"suiteId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/server-evals/{serverId}/runs":{"get":{"operationId":"getApiV1ServerEvalsByServerIdRuns","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"serverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"inputArgs":{},"assertions":{},"sortOrder":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scenarioId":{"type":"string"},"client":{"type":"string"},"modelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshots":{},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshotUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentResponse":{},"toolCalls":{},"conversation":{},"assertionResults":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rubricPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"toolsPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"judgement":{"anyOf":[{"type":"string"},{"type":"null"}]},"judgeModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolAssertions":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","scenarioId","client","modelName","status","startedAt","completedAt","durationMs","error","screenshots","videoUrl","screenshotUrl","agentResponse","toolCalls","conversation","assertionResults","score","pass","rubricPassed","toolsPassed","judgement","judgeModel","toolAssertions","createdAt","updatedAt"]}}},"required":["id","runId","type","name","description","prompt","flow","messages","requiredTools","toolNames","inputArgs","assertions","sortOrder","createdAt","updatedAt"]}}},"required":["id","suiteId","serverId","createdBy","status","serverUrl","prompt","flow","messages","requiredTools","toolNames","score","pass","startedAt","completedAt","createdAt","updatedAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"List eval runs for a server. Optional filter by suiteId.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"suiteId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]}},"/api/v1/server-evals/{serverId}/runs/{runId}":{"get":{"operationId":"getApiV1ServerEvalsByServerIdRunsByRunId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"serverId":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"serverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scenarios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{},"messages":{},"requiredTools":{},"toolNames":{},"inputArgs":{},"assertions":{},"sortOrder":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scenarioId":{"type":"string"},"client":{"type":"string"},"modelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshots":{},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshotUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentResponse":{},"toolCalls":{},"conversation":{},"assertionResults":{},"score":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rubricPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"toolsPassed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"judgement":{"anyOf":[{"type":"string"},{"type":"null"}]},"judgeModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolAssertions":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","scenarioId","client","modelName","status","startedAt","completedAt","durationMs","error","screenshots","videoUrl","screenshotUrl","agentResponse","toolCalls","conversation","assertionResults","score","pass","rubricPassed","toolsPassed","judgement","judgeModel","toolAssertions","createdAt","updatedAt"]}}},"required":["id","runId","type","name","description","prompt","flow","messages","requiredTools","toolNames","inputArgs","assertions","sortOrder","createdAt","updatedAt"]}}},"required":["id","suiteId","serverId","createdBy","status","serverUrl","prompt","flow","messages","requiredTools","toolNames","score","pass","startedAt","completedAt","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Get a single eval run with all scenarios and executions.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"runId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"delete":{"operationId":"deleteApiV1ServerEvalsByServerIdRunsByRunId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Delete an eval run and cancel its BullMQ job if still in-flight.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"runId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/server-evals/{serverId}/runs/bulk-delete":{"post":{"operationId":"postApiV1ServerEvalsByServerIdRunsBulkDelete","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"killedJobs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["deleted","killedJobs"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Delete many eval runs at once. Also cancels any in-flight BullMQ jobs attached to them.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["ids"]}}}}}},"/api/v1/server-evals/{serverId}/runs/{runId}/cancel":{"post":{"operationId":"postApiV1ServerEvalsByServerIdRunsByRunIdCancel","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"jobExisted":{"type":"boolean"},"previousJobState":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["success","jobExisted","previousJobState"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerEvals"],"description":"Cancel an in-flight eval run: remove its BullMQ job and mark the run 'failed'. Useful for stuck tasks that didn't terminate cleanly.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"runId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/server-audits/{serverId}/audits":{"post":{"operationId":"postApiV1ServerAuditsByServerIdAudits","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed"]}},"required":["id","status"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerAudits"],"description":"Trigger a new MCP server audit.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"runE2E":{"type":"boolean"},"branch":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}}}}}}},"get":{"operationId":"getApiV1ServerAuditsByServerIdAudits","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"deploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"targetUrl":{"type":"string"},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","completed","failed"]},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"isReadyForChatgpt":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"isReadyForClaudeai":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"type":"string"},"checkId":{"type":"string"},"checkName":{"type":"string"},"status":{"type":"string","enum":["pass","fail","skip","pending"]},"severity":{"type":"string"},"category":{"type":"string"},"scope":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{},{"type":"null"}]},"hint":{"anyOf":[{},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","auditId","checkId","checkName","status","severity","category","scope","platforms","message","details","hint","durationMs","createdAt"]}}},"required":["id","serverId","deploymentId","organizationId","targetUrl","gitBranch","status","durationMs","isReadyForChatgpt","isReadyForClaudeai","startedAt","completedAt","createdAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerAudits"],"description":"List audits for a server.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]}},"/api/v1/server-audits/{serverId}/audits/{auditId}":{"get":{"operationId":"getApiV1ServerAuditsByServerIdAuditsByAuditId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"deploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"targetUrl":{"type":"string"},"gitBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","completed","failed"]},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"isReadyForChatgpt":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"isReadyForClaudeai":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"type":"string"},"checkId":{"type":"string"},"checkName":{"type":"string"},"status":{"type":"string","enum":["pass","fail","skip","pending"]},"severity":{"type":"string"},"category":{"type":"string"},"scope":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{},{"type":"null"}]},"hint":{"anyOf":[{},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","auditId","checkId","checkName","status","severity","category","scope","platforms","message","details","hint","durationMs","createdAt"]}}},"required":["id","serverId","deploymentId","organizationId","targetUrl","gitBranch","status","durationMs","isReadyForChatgpt","isReadyForClaudeai","startedAt","completedAt","createdAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerAudits"],"description":"Get a single audit with all its checks.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"auditId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/server-audits/{serverId}/audits/{auditId}/autofix":{"post":{"operationId":"postApiV1ServerAuditsByServerIdAuditsByAuditIdAutofix","responses":{"200":{"description":"Autofix job enqueued or existing PR returned","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed"]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"prUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"filesChanged":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobMeta":{"anyOf":[{"type":"object","properties":{"phase":{"anyOf":[{"type":"string"},{"type":"null"}]},"phaseLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"tool_use"},"tool":{"type":"string"},"input":{"type":"string"}},"required":["seq","t","type","tool"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"tool_result"},"tool":{"type":"string"},"ok":{"type":"boolean"},"text":{"type":"string"}},"required":["seq","t","type","ok"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"assistant_text"},"text":{"type":"string"}},"required":["seq","t","type","text"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"thinking"},"text":{"type":"string"}},"required":["seq","t","type","text"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"phase"},"phase":{"type":"string"},"label":{"type":"string"},"percent":{"type":"number"}},"required":["seq","t","type","phase","label","percent"]}]}},"logsTail":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","auditId","status","branch","prUrl","prNumber","filesChanged","errorMessage","jobMeta","startedAt","completedAt","createdAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Autofix already running"},"422":{"description":"No connected repository or audit not fixable"}},"tags":["ServerAudits"],"description":"Trigger an automated autofix for a completed audit. Clones the connected GitHub repo in a sandbox, runs a Claude agent to fix failing checks, pushes a branch, and opens a pull request.","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"auditId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"get":{"operationId":"getApiV1ServerAuditsByServerIdAuditsByAuditIdAutofix","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"auditId":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed"]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"prUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"prNumber":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"filesChanged":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobMeta":{"anyOf":[{"type":"object","properties":{"phase":{"anyOf":[{"type":"string"},{"type":"null"}]},"phaseLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"tool_use"},"tool":{"type":"string"},"input":{"type":"string"}},"required":["seq","t","type","tool"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"tool_result"},"tool":{"type":"string"},"ok":{"type":"boolean"},"text":{"type":"string"}},"required":["seq","t","type","ok"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"assistant_text"},"text":{"type":"string"}},"required":["seq","t","type","text"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"thinking"},"text":{"type":"string"}},"required":["seq","t","type","text"]},{"type":"object","properties":{"seq":{"type":"number"},"t":{"type":"number"},"type":{"type":"string","const":"phase"},"phase":{"type":"string"},"label":{"type":"string"},"percent":{"type":"number"}},"required":["seq","t","type","phase","label","percent"]}]}},"logsTail":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","auditId","status","branch","prUrl","prNumber","filesChanged","errorMessage","jobMeta","startedAt","completedAt","createdAt"]},{"type":"null"}]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["ServerAudits"],"description":"Get autofix status for an audit (PR link when complete).","parameters":[{"in":"path","name":"serverId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"auditId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/polls/options":{"get":{"operationId":"getApiV1PollsOptions","tags":["Polls"],"description":"List poll options with offset pagination.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"votes":{"type":"number"},"createdAt":{"type":"string"},"solved":{"type":"boolean"},"implementationComment":{"anyOf":[{"type":"string"},{"type":"null"}]},"link":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","text","votes"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1PollsOptions","tags":["Polls"],"description":"Create a new poll option and auto-vote for it.","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"votes":{"type":"number"},"createdAt":{"type":"string"},"solved":{"type":"boolean"},"implementationComment":{"anyOf":[{"type":"string"},{"type":"null"}]},"link":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","text","votes"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500}},"required":["text"]}}}}}},"/api/v1/polls/options/{id}/vote":{"post":{"operationId":"postApiV1PollsOptionsByIdVote","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"votes":{"type":"number"}},"required":["id","text","votes"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Polls"],"description":"Increment the vote count for a poll option (authenticated users only).","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/public-chat/{id}/metadata":{"get":{"operationId":"getApiV1PublicChatByIdMetadata","tags":["PublicChat"],"description":"Fresh public-chat landing metadata from Postgres for gateway SSR hydration. Callable only with X-Gateway-API-Key (same-origin browser requests use GET /chat/metadata on the gateway worker).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"suggestedQuestions":{"type":"array","items":{"type":"string"}},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"showSecurityWarningBanner":{"type":"boolean"},"isOAuthServer":{"type":"boolean"}},"required":["suggestedQuestions","title","description","showSecurityWarningBanner","isOAuthServer"]}}}},"401":{"description":"Missing or invalid gateway API key"}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/public-chat/{id}/stream":{"post":{"operationId":"postApiV1PublicChatByIdStream","tags":["PublicChat"],"description":"Public stream endpoint for gateway-hosted server chat. Persists one transcript per request in Chat + ChatEvent using the server's PublicChatConfig agent.","responses":{"200":{"description":"Vercel AI data-stream format"},"400":{"description":"Bad request"},"429":{"description":"Rate limited"},"500":{"description":"Internal error"}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mcpServerUrl":{"type":"string","format":"uri"},"messages":{"minItems":1,"type":"array","items":{}},"mcpAuthHeaders":{"type":"object","properties":{"authorization":{"type":"string","minLength":1,"maxLength":8192}},"required":["authorization"],"additionalProperties":false}},"required":["mcpServerUrl","messages"]}}}}}},"/api/v1/servers/{id}/gateway/ip-access":{"get":{"operationId":"getApiV1ServersByIdGatewayIpAccess","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"enabled":{"type":"boolean"},"customCidrs":{"type":"array","items":{"type":"string"}},"chatgptPreset":{"type":"boolean"},"anthropicPreset":{"type":"boolean"},"manufactPreset":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","enabled","customCidrs","chatgptPreset","anthropicPreset","manufactPreset","createdAt","updatedAt"]},{"type":"null"}]},"hasConfig":{"type":"boolean"}},"required":["config","hasConfig"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Get IP access config for a server (owner/org access).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1ServersByIdGatewayIpAccess","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"enabled":{"type":"boolean"},"customCidrs":{"type":"array","items":{"type":"string"}},"chatgptPreset":{"type":"boolean"},"anthropicPreset":{"type":"boolean"},"manufactPreset":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","enabled","customCidrs","chatgptPreset","anthropicPreset","manufactPreset","createdAt","updatedAt"]},{"type":"null"}]},"hasConfig":{"type":"boolean"}},"required":["config","hasConfig"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Servers"],"description":"Create/update IP access config for a server. Pushes changes to the gateway KV immediately.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"customCidrs":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^(?:(?:\\d{1,3}\\.){3}\\d{1,3}(?:\\/(?:\\d|[12]\\d|3[012]))?|(?:[0-9a-fA-F:]+)(?:\\/(?:\\d{1,3}))?)$"}},"chatgptPreset":{"type":"boolean"},"anthropicPreset":{"type":"boolean"},"manufactPreset":{"type":"boolean"}}}}}}}},"/api/v1/servers/{id}/app-submissions":{"get":{"operationId":"getApiV1ServersByIdAppSubmissions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AppSubmission"],"description":"List all app submissions for a server, ordered by semver descending.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"post":{"operationId":"postApiV1ServersByIdAppSubmissions","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Version already exists for this server"}},"tags":["AppSubmission"],"description":"Create a new app submission for a server. Version defaults to 1.0.0 when no submissions exist, or next-patch of the current latest.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"openaiVerificationToken":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"openaiSubmissionJson":{},"openaiDemoVideoUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}}}}}}}},"/api/v1/servers/{id}/app-submissions/{submissionId}":{"get":{"operationId":"getApiV1ServersByIdAppSubmissionsBySubmissionId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AppSubmission"],"description":"Get a single app submission by id.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1ServersByIdAppSubmissionsBySubmissionId","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AppSubmission"],"description":"Update mutable fields of an app submission. Syncs the latest verification token to the gateway KV.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"openaiVerificationToken":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"openaiSubmissionJson":{},"openaiDemoVideoUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v1/servers/{id}/app-submissions/{submissionId}/generate-openai-json":{"post":{"operationId":"postApiV1ServersByIdAppSubmissionsBySubmissionIdGenerateOpenaiJson","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Job already queued or running"},"422":{"description":"No connected repository or production deployment"},"502":{"description":"OpenAI skill unreachable — try again shortly"}},"tags":["AppSubmission"],"description":"Trigger AI-powered generation of the chatgpt-app-submission.json for this submission. Enqueues a background job that runs a Claude agent in a sandbox against the server's GitHub source. Returns 409 if a job is already running. Returns 422 if no connected repo/deployment exists.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/app-submissions/{submissionId}/generate-demo-video":{"post":{"operationId":"postApiV1ServersByIdAppSubmissionsBySubmissionIdGenerateDemoVideo","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Job already queued or running"},"422":{"description":"No connected repository or production deployment"},"501":{"description":"Mobile viewport not yet supported"},"502":{"description":"GitHub token mint failed"}},"tags":["AppSubmission"],"description":"Trigger AI-powered demo video generation for this submission. Runs a director agent in a sandbox to write a ChatGPT script, then records the session via Notte, and trims/encodes the result with ffmpeg (≤30s, ≤50MB). Returns 409 if a job is already running. Returns 422 if no connected repo/deployment exists. Returns 501 if viewport != 'desktop' (mobile not yet supported).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"viewport":{"default":"desktop","type":"string","enum":["desktop","mobile"]},"branch":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}}}}}}}},"/api/v1/servers/{id}/app-submissions/{submissionId}/generate-screenshots":{"post":{"operationId":"postApiV1ServersByIdAppSubmissionsBySubmissionIdGenerateScreenshots","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Job already queued or running"},"422":{"description":"No production deployment"}},"tags":["AppSubmission"],"description":"Trigger screenshot asset generation for this submission. The worker discovers tools, proposes concise trigger messages and sample args, captures mobile-sized PNGs via the mcp-use screenshot CLI using a remote Notte CDP browser, uploads the images to S3, and stores URLs on the AppSubmission row. Returns 409 if a screenshot job is already running.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"branch","schema":{"type":"string","maxLength":255}}]}},"/api/v1/servers/{id}/app-submissions/{submissionId}/screenshots.tar.gz":{"get":{"operationId":"getApiV1ServersByIdAppSubmissionsBySubmissionIdScreenshotsTarGz","responses":{"200":{"description":"application/gzip"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"Failed to fetch an image or build the archive"}},"tags":["AppSubmission"],"description":"Download a single tar.gz archive of all PNG screenshots stored on this submission (server-side fetch from stored URLs).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/servers/{id}/app-submissions/{submissionId}/cancel-generation":{"post":{"operationId":"postApiV1ServersByIdAppSubmissionsBySubmissionIdCancelGeneration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"serverId":{"type":"string"},"version":{"type":"string"},"openaiVerificationToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiSubmissionJson":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"openaiScreenshotUrls":{"type":"array","items":{"type":"string"}},"openaiSubmissionJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiDemoVideoJobMeta":{"anyOf":[{},{"type":"null"}]},"openaiScreenshotJobMeta":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","serverId","version","openaiVerificationToken","openaiSubmissionJson","openaiDemoVideoUrl","openaiScreenshotUrls","openaiSubmissionJobMeta","openaiDemoVideoJobMeta","openaiScreenshotJobMeta","createdAt","updatedAt"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AppSubmission"],"description":"Cancel an in-flight generation job (openai_submission_json, openai_demo_video, or openai_screenshots). Removes the BullMQ job and marks the submission's job meta as cancelled. The worker process may continue briefly in the background, but its result is discarded.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"submissionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["openai_submission_json","openai_demo_video","openai_screenshots"]}},"required":["kind"]}}}}}},"/api/v1/admin/tunnels":{"get":{"operationId":"getApiV1AdminTunnels","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tunnels":{"type":"array","items":{"type":"object","properties":{"subdomain":{"type":"string"},"port":{"type":"number"},"url":{"type":"string"},"https_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["subdomain","port","url","https_url"]}},"count":{"type":"number"}},"required":["tunnels","count"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminTunnels"],"description":"List active tunnels."}},"/api/v1/admin/tunnels/stats":{"get":{"operationId":"getApiV1AdminTunnelsStats","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"active_tunnels":{"type":"number"},"active_tokens":{"type":"number"},"ip_tunnel_counts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"tunnel_metadata":{"type":"array","items":{"type":"object","properties":{"subdomain":{"type":"string"},"created_at":{"type":"string"},"last_activity":{"type":"string"},"connection_count":{"type":"number"},"ip":{"type":"string"}},"required":["subdomain","created_at","last_activity","connection_count"]}},"timestamp":{"type":"string"}},"required":["active_tunnels","active_tokens","ip_tunnel_counts","tunnel_metadata","timestamp"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminTunnels"],"description":"Tunnel aggregate stats."}},"/api/v1/admin/tunnels/{subdomain}":{"delete":{"operationId":"deleteApiV1AdminTunnelsBySubdomain","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"subdomain":{"type":"string"},"port":{"type":"number"}},"required":["message","subdomain","port"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminTunnels"],"description":"Remove a tunnel.","parameters":[{"schema":{"type":"string"},"in":"path","name":"subdomain","required":true}]}},"/api/v1/admin/audit-logs":{"get":{"operationId":"getApiV1AdminAuditLogs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"traceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","actorId","actorEmail","actorRole","action","resourceType","resourceId","organizationId","metadata","ipAddress","userAgent","traceId","createdAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminAuditLogs"],"description":"List system audit logs. Supports offset list params: limit (default 50, max 100), skip, sort=field:asc|desc (fields: createdAt, action). Optional filters: actorId, action, resourceType, resourceId, organizationId, since, until.","parameters":[{"in":"query","name":"actorId","schema":{"type":"string"}},{"in":"query","name":"action","schema":{"type":"string"}},{"in":"query","name":"resourceType","schema":{"type":"string"}},{"in":"query","name":"resourceId","schema":{"type":"string"}},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"since","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"in":"query","name":"until","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]}},"/api/v1/admin/billing/plans":{"get":{"operationId":"getApiV1AdminBillingPlans","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminBilling"],"description":"List plan catalog."}},"/api/v1/admin/billing/orgs":{"get":{"operationId":"getApiV1AdminBillingOrgs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","slug","createdAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminBilling"],"description":"List organizations.","parameters":[{"in":"query","name":"q","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]}},"/api/v1/admin/billing/orgs/{orgId}/plan":{"get":{"operationId":"getApiV1AdminBillingOrgsByOrgIdPlan","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminBilling"],"description":"Get org plan.","parameters":[{"in":"path","name":"orgId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/admin/billing/orgs/{orgId}/preview-assign-plan":{"get":{"operationId":"getApiV1AdminBillingOrgsByOrgIdPreviewAssignPlan","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["update-in-place","create-new"]},"currentSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeSubscriptionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"subtotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amountDue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proration":{"type":"boolean"},"period":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["start","end"]},{"type":"null"}]}},"required":["description","amount","proration","period"]}},"noCustomerYet":{"type":"boolean"},"trialPeriodDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trialEnd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trialIgnored":{"type":"boolean"},"willCreateCustomer":{"type":"boolean"},"paymentBehaviorWouldBe":{"anyOf":[{"type":"string","enum":["default_incomplete","allow_incomplete"]},{"type":"null"}]}},"required":["mode","currentSubscriptionId","activeSubscriptionCount","currency","subtotal","tax","total","amountDue","lines"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminBilling"],"description":"Preview plan assignment.","parameters":[{"in":"path","name":"orgId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"priceLookupKey","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"query","name":"trialPeriodDays","schema":{"type":"integer","minimum":0,"maximum":365}},{"in":"query","name":"forceNewSubscription","schema":{"type":"boolean"}}]},"post":{"operationId":"postApiV1AdminBillingOrgsByOrgIdPreviewAssignPlan","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["update-in-place","create-new"]},"currentSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeSubscriptionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"subtotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amountDue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proration":{"type":"boolean"},"period":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["start","end"]},{"type":"null"}]}},"required":["description","amount","proration","period"]}},"noCustomerYet":{"type":"boolean"},"trialPeriodDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trialEnd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trialIgnored":{"type":"boolean"},"willCreateCustomer":{"type":"boolean"},"paymentBehaviorWouldBe":{"anyOf":[{"type":"string","enum":["default_incomplete","allow_incomplete"]},{"type":"null"}]}},"required":["mode","currentSubscriptionId","activeSubscriptionCount","currency","subtotal","tax","total","amountDue","lines"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminBilling"],"description":"Preview plan assignment.","parameters":[{"in":"path","name":"orgId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priceLookupKey":{"type":"string","minLength":1,"maxLength":255},"trialPeriodDays":{"type":"integer","minimum":0,"maximum":365},"forceNewSubscription":{"type":"boolean"}},"required":["priceLookupKey"]}}}}}},"/api/v1/admin/billing/orgs/{orgId}/assign-plan":{"post":{"operationId":"postApiV1AdminBillingOrgsByOrgIdAssignPlan","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["AdminBilling"],"description":"Assign org plan.","parameters":[{"in":"path","name":"orgId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priceLookupKey":{"type":"string","minLength":1,"maxLength":255},"forceNewSubscription":{"type":"boolean"},"paymentBehavior":{"type":"string","enum":["default_incomplete","allow_incomplete"]},"markPaidOutOfBand":{"type":"boolean"},"trialPeriodDays":{"type":"integer","minimum":0,"maximum":365}},"required":["priceLookupKey"]}}}}}},"/api/v1/vibe/projects":{"get":{"operationId":"getApiV1VibeProjects","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"devServerUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quickQuestions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"userId":{"type":"string"},"organizationId":{"type":"string"},"serverId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","sandboxId","devServerUrl","quickQuestions","createdAt","updatedAt","userId","organizationId","serverId"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"List Vibe projects visible to the current user (org members). Optionally filter by organizationId.","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1VibeProjects","responses":{"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Create a new Vibe project scoped to an organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"devServerUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["organizationId"]}}}}}},"/api/v1/vibe/projects/{id}":{"get":{"operationId":"getApiV1VibeProjectsById","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Get a single Vibe project with its sessions","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1VibeProjectsById","responses":{"200":{"description":"Updated"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Update a Vibe project","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"devServerUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quickQuestions":{},"serverId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteApiV1VibeProjectsById","responses":{"200":{"description":"Deleted"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Delete a Vibe project (cascades to sessions)","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/vibe/sessions":{"get":{"operationId":"getApiV1VibeSessions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"devServerUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","organizationId","projectId","status","sandboxId","devServerUrl","model","title","messageCount","lastMessage","createdAt","updatedAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"skip":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","total","limit","skip"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"List Vibe sessions visible to the current user (filter by organizationId and/or projectId).","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"take","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"skip","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"sort","schema":{"type":"string"}}]},"post":{"operationId":"postApiV1VibeSessions","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Upsert (create or update) a Vibe session","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"devServerUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"content":{"type":"string"}},"required":["type","content"]}},"canvasResults":{},"title":{"type":"string"},"messageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastMessage":{"type":"string"}},"required":["id","model"]}}}}}},"/api/v1/vibe/sessions/init":{"post":{"operationId":"postApiV1VibeSessionsInit","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Initialize a new Vibe session with a server-generated UUID. Auto-creates a project if no projectId is provided.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"model":{"type":"string"}}}}}}}},"/api/v1/vibe/sessions/{id}":{"get":{"operationId":"getApiV1VibeSessionsById","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Get a single Vibe session by ID","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"delete":{"operationId":"deleteApiV1VibeSessionsById","responses":{"200":{"description":"Deleted"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Delete a Vibe session by ID","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/vibe/projects/{id}/generate-title":{"post":{"operationId":"postApiV1VibeProjectsByIdGenerateTitle","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal error"}},"tags":["Vibe"],"description":"Generate a short project title (2–5 words) from the user's first message and persist it on the project.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1}},"required":["message"]}}}}}},"/api/v1/vibe/projects/{id}/generate-quick-questions":{"post":{"operationId":"postApiV1VibeProjectsByIdGenerateQuickQuestions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"quickQuestions":{"type":"array","items":{"type":"string"}},"toolCount":{"type":"number"},"skipped":{"type":"boolean"},"reason":{"type":"string"},"commandId":{"type":"string"}},"required":["ok","quickQuestions"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal error"}},"tags":["Vibe"],"description":"Generate 3–6 quick-start prompts for the inspector landing state from the sandbox server's tool list. Persists on the project and pushes a `set_quick_questions` bridge command.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/vibe/sandbox/status/{projectId}":{"get":{"operationId":"getApiV1VibeSandboxStatusByProjectId","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Sandbox status for a project (alive, sandboxId, devServerUrl).","parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}]}},"/api/v1/vibe/sandbox/reconnect":{"post":{"operationId":"postApiV1VibeSandboxReconnect","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Re-acquire a sandbox for a project. Uses in-memory cache first, then reconnects to the sandboxId stored on MangoProject, then falls back to the idle pool or creating fresh.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sandboxId":{"type":"string","minLength":1},"devServerUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["projectId","sandboxId"]}}}}}},"/api/v1/vibe/sandbox/keep-alive/{projectId}":{"post":{"operationId":"postApiV1VibeSandboxKeepAliveByProjectId","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Reset the E2B auto-pause timer and refresh the sandbox's API key expiry.","parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}]}},"/api/v1/vibe/sandbox/keep-alive":{"post":{"operationId":"postApiV1VibeSandboxKeepAlive","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"alive":{"type":"boolean"}}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Body-based keep-alive (accepts `{projectId}`). Same semantics as `POST /keep-alive/:projectId`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["projectId"]}}}}}},"/api/v1/vibe/sandbox/kill/{projectId}":{"post":{"operationId":"postApiV1VibeSandboxKillByProjectId","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Terminate the sandbox for a project, revoke its API key, and clear sandboxId on MangoProject.","parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}]}},"/api/v1/vibe/sandbox/files":{"get":{"operationId":"getApiV1VibeSandboxFiles","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"available":{"type":"boolean"},"files":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Recursive project file tree (rooted at /home/user/mcp_project).","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"post":{"operationId":"postApiV1VibeSandboxFiles","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filePath":{"type":"string","minLength":1}},"required":["projectId","filePath"]}}}}},"put":{"operationId":"putApiV1VibeSandboxFiles","responses":{"200":{"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filePath":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["projectId","filePath","content"]}}}}}},"/api/v1/vibe/sandbox/files/read":{"post":{"operationId":"postApiV1VibeSandboxFilesRead","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Read a single file from the sandbox (UTF-8 text only).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string","minLength":1}},"required":["projectId","path"]}}}}}},"/api/v1/vibe/sandbox/files/write":{"post":{"operationId":"postApiV1VibeSandboxFilesWrite","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Write a file into the sandbox (overwrites).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["projectId","path","content"]}}}}}},"/api/v1/vibe/sandbox/poll":{"post":{"operationId":"postApiV1VibeSandboxPoll","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ready":{"type":"boolean"},"reason":{"type":"string"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"array","items":{}}},"required":["ready"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Poll the sandbox MCP server by sending an `initialize` request. Returns readiness + tools info.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["projectId"]}}}}}},"/api/v1/vibe/sandbox/terminal/stream":{"get":{"operationId":"getApiV1VibeSandboxTerminalStream","responses":{"200":{"description":"text/event-stream"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"SSE stream of PTY output (creates a PTY on first connect)."}},"/api/v1/vibe/sandbox/terminal/input":{"post":{"operationId":"postApiV1VibeSandboxTerminalInput","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"string"}},"required":["projectId","data"]}}}}}},"/api/v1/vibe/sandbox/terminal/resize":{"post":{"operationId":"postApiV1VibeSandboxTerminalResize","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cols":{"type":"integer","minimum":1,"maximum":500},"rows":{"type":"integer","minimum":1,"maximum":500}},"required":["projectId","cols","rows"]}}}}}},"/api/v1/vibe/sandbox/check":{"get":{"operationId":"getApiV1VibeSandboxCheck","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"]}},"/api/v1/vibe/sandbox/logs/{projectId}":{"get":{"operationId":"getApiV1VibeSandboxLogsByProjectId","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Tail of the dev server log file (last 500 lines).","parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}]}},"/api/v1/vibe/sandbox/env":{"get":{"operationId":"getApiV1VibeSandboxEnv","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"envVars":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"exampleKeys":{"type":"array","items":{"type":"string"}}},"required":["envVars","exampleKeys"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Read the project's current `.env` vars (and any `.env.example` keys) from the sandbox.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"post":{"operationId":"postApiV1VibeSandboxEnv","responses":{"200":{"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Bulk-replace the project's `.env` file with the supplied list. Any key omitted from the payload is removed. Triggers HMR on the sandbox dev server and feeds the publish pipeline when the user deploys.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"envVars":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"value":{"type":"string","maxLength":100000}},"required":["key","value"]}}},"required":["projectId","envVars"]}}}}}},"/api/v1/vibe/sandbox/files/zip":{"get":{"operationId":"getApiV1VibeSandboxFilesZip","responses":{"200":{"description":"application/zip"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Download project files as a ZIP archive.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/vibe/sandbox/inspector/{projectId}":{"get":{"operationId":"getApiV1VibeSandboxInspectorByProjectId","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Build the embedded Inspector iframe URL for a project's sandbox.","parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true}]}},"/api/v1/vibe/chat/stream":{"post":{"operationId":"postApiV1VibeChatStream","responses":{"200":{"description":"text/event-stream"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Run the Vibe agent against the user's sandbox and stream token/tool/status events as SSE. Use JSON (application/json) or multipart/form-data with field `body` (JSON string, VibeChatStreamBody) and optional file field `attachments`."}},"/api/v1/vibe/chat/cancel":{"post":{"operationId":"postApiV1VibeChatCancel","responses":{"200":{"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"Cancel the active Vibe chat stream for a project. Aborts the in-flight agent run if any, which triggers SIGKILL on the sandbox process and the post-abort pkill cleanup. Idempotent: returns ok with cancelled=false if no run is active.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["projectId"]}}}}}},"/api/v1/vibe/chat/mcp/stream":{"post":{"operationId":"postApiV1VibeChatMcpStream","responses":{"200":{"description":"text/event-stream"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Too many requests"},"500":{"description":"Internal error"}},"tags":["Vibe"],"description":"Right-pane MCP chat: connects to the sandbox MCP server, drives a tool-using Anthropic agent loop server-side, and streams inspector-compatible events. Public (no session) because it's called from the inspector iframe served on an ephemeral E2B origin; per-IP rate-limited."}},"/api/v1/vibe/chat/bridge/command":{"post":{"operationId":"postApiV1VibeChatBridgeCommand","responses":{"200":{"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"command":{"type":"string","minLength":1},"payload":{}},"required":["projectId","command"]}}}}}},"/api/v1/vibe/chat/bridge/state":{"post":{"operationId":"postApiV1VibeChatBridgeState","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"chatList":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["state"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"chatId":{"type":"string"}},"required":["projectId"]}}}}}},"/api/v1/vibe/chat/bridge/event":{"post":{"operationId":"postApiV1VibeChatBridgeEvent","responses":{"200":{"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["projectId","event"]}}}}}},"/api/v1/vibe/chat/bridge/commands":{"post":{"operationId":"postApiV1VibeChatBridgeCommands","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"]}},"/api/v1/vibe/chat/bridge/clear-widget-errors":{"post":{"operationId":"postApiV1VibeChatBridgeClearWidgetErrors","responses":{"200":{"description":"OK"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["projectId"]}}}}}},"/api/v1/vibe/chat/bridge/stream":{"get":{"operationId":"getApiV1VibeChatBridgeStream","responses":{"200":{"description":"text/event-stream"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"VALIDATION_ERROR"},"details":{}},"required":["error","code","details"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"description":"SSE stream of bridge commands + state events for a project."}},"/api/v1/vibe/publish":{"post":{"operationId":"allApiV1Vibe","responses":{"200":{"description":"Deployment queued","content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string"},"repoUrl":{"type":"string"},"serverId":{"type":"string"},"status":{"type":"string"}},"required":["deploymentId","repoUrl","serverId","status"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Repo mismatch with linked server"}},"tags":["Vibe"],"description":"Publish a Vibe project: tar the sandbox, push to GitHub, deploy via server pipeline. First publish creates a Server; subsequent publishes trigger a redeploy on the linked server.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"repoName":{"type":"string","minLength":1},"isPrivate":{"type":"boolean"},"org":{"type":"string"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"installationId":{"type":"string"}},"required":["projectId","repoName"]}}}}}},"/api/v1/vibe/publish/status":{"get":{"operationId":"allApiV1Vibe","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"serverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"deploymentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"serverSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["serverId","status","deploymentId","mcpUrl"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"parameters":[{"in":"query","name":"deploymentId","schema":{"type":"string","minLength":1}},{"in":"query","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"/api/v1/vibe/publish/mcp-ready":{"post":{"operationId":"allApiV1Vibe","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ready":{"type":"boolean"}},"required":["ready"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"tags":["Vibe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mcpUrl":{"type":"string"}},"required":["mcpUrl"]}}}}}},"/api/v1/inspector/chat/stream":{"post":{"operationId":"postApiV1InspectorChatStream","tags":["Inspector"],"description":"Chat endpoint for the hosted inspector (inspector.manufact.com). Authenticated users (session cookie shared via .manufact.com domain) get unlimited access. Unauthenticated users are subject to a two-tier rate limit: 5 messages/min and 3 new chats/day per IP. Returns 429 with loginRequired=true when limits are exceeded.","responses":{"200":{"description":"Vercel AI data-stream format"},"400":{"description":"Bad request"},"401":{"description":"Upstream MCP server rejected token — mcpServerUrl in body"},"429":{"description":"Rate limited — loginRequired in body"},"500":{"description":"Internal error"}}}},"/api/v1/public/book-call":{"post":{"operationId":"postApiV1PublicBookCall","tags":["Public"],"description":"Sync a /book-call form submission to the CRM. Public — IP rate-limited. Upserts the Person + Company in Attio and writes the form data to the book_a_call_submissions list (idempotent on resubmit).","responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":100},"companyWebsite":{"type":"string","minLength":1,"maxLength":500},"companySize":{"type":"string","enum":["1-10","11-50","51-200","201-500","500+"]},"myNeeds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"useCase":{"type":"string","minLength":1,"maxLength":100},"message":{"type":"string","maxLength":2000}},"required":["email","name","country","companyWebsite","companySize","myNeeds","useCase"]}}}}}},"/api/auth/sign-in/social":{"post":{"tags":["Auth"],"description":"Sign in with a social provider","operationId":"socialSignIn","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":["string","null"],"description":"Callback URL to redirect to after the user has signed in"},"newUserCallbackURL":{"type":["string","null"]},"errorCallbackURL":{"type":["string","null"],"description":"Callback URL to redirect to if an error happens"},"provider":{"type":"string"},"disableRedirect":{"type":["boolean","null"],"description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"idToken":{"type":["object","null"],"properties":{"token":{"type":"string","description":"ID token from the provider"},"nonce":{"type":["string","null"],"description":"Nonce used to generate the token"},"accessToken":{"type":["string","null"],"description":"Access token from the provider"},"refreshToken":{"type":["string","null"],"description":"Refresh token from the provider"},"expiresAt":{"type":["number","null"],"description":"Expiry date of the token"},"user":{"type":["object","null"],"properties":{"name":{"type":["object","null"],"properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]}}},"email":{"type":["string","null"]}},"description":"The user object from the provider. Only available for some providers like Apple."}},"required":["token"]},"scopes":{"type":["array","null"],"description":"Array of scopes to request from the provider. This will override the default scopes passed."},"requestSignUp":{"type":["boolean","null"],"description":"Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider"},"loginHint":{"type":["string","null"],"description":"The login hint to use for the authorization code request"},"additionalData":{"type":["string","null"]}},"required":["provider"]}}}},"responses":{"200":{"description":"Success - Returns either session details or redirect URL","content":{"application/json":{"schema":{"type":"object","description":"Session response when idToken is provided","properties":{"token":{"type":"string"},"user":{"type":"object","$ref":"#/components/schemas/User"},"url":{"type":"string"},"redirect":{"type":"boolean","enum":[false]}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/callback/{id}":{"get":{"tags":["Auth"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Auth"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/get-session":{"get":{"tags":["Auth"],"description":"Get the current session","operationId":"getSession","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Auth"],"description":"Get the current session","operationId":"getSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/sign-out":{"post":{"tags":["Auth"],"description":"Sign out the current user","operationId":"signOut","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/sign-up/email":{"post":{"tags":["Auth"],"description":"Sign up a user using email and password","operationId":"signUpWithEmailAndPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"image":{"type":"string","description":"The profile image URL of the user"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["name","email","password"]}}}},"responses":{"200":{"description":"Successfully created user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"Authentication token for the session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"422":{"description":"Unprocessable Entity. User already exists or failed to create user.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/sign-in/email":{"post":{"tags":["Auth"],"description":"Sign in with email and password","operationId":"signInEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user"},"password":{"type":"string","description":"Password of the user"},"callbackURL":{"type":["string","null"],"description":"Callback URL to use as a redirect for email verification"},"rememberMe":{"type":["boolean","null"],"description":"If this is false, the session will not be remembered. Default is `true`.","default":true}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success - Returns either session details or redirect URL","content":{"application/json":{"schema":{"type":"object","description":"Session response when idToken is provided","properties":{"redirect":{"type":"boolean","enum":[false]},"token":{"type":"string","description":"Session token"},"url":{"type":"string","nullable":true},"user":{"type":"object","$ref":"#/components/schemas/User"}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/reset-password":{"post":{"tags":["Auth"],"description":"Reset the password for a user","operationId":"resetPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"token":{"type":["string","null"],"description":"The token to reset the password"}},"required":["newPassword"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/verify-password":{"post":{"tags":["Auth"],"description":"Verify the current user's password","operationId":"verifyPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The password to verify"}},"required":["password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/verify-email":{"get":{"tags":["Auth"],"description":"Verify the email of the user","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","description":"The token to verify the email","required":true,"schema":{"type":"string"}},{"name":"callbackURL","in":"query","description":"The URL to redirect to after email verification","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the email was verified successfully"}},"required":["user","status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/send-verification-email":{"post":{"tags":["Auth"],"description":"Send a verification email to the user","operationId":"sendVerificationEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email to send the verification email to","example":"user@example.com"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback","example":"https://example.com/callback","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the email was sent successfully","example":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Verification email isn't enabled"}}}}}},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/change-email":{"post":{"tags":["Auth"],"operationId":"changeEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"The new email address to set must be a valid email address"},"callbackURL":{"type":["string","null"],"description":"The URL to redirect to after email verification"}},"required":["newEmail"]}}}},"responses":{"200":{"description":"Email change request processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the request was successful"},"message":{"type":"string","enum":["Email updated","Verification email sent"],"description":"Status message of the email change process","nullable":true}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/change-password":{"post":{"tags":["Auth"],"description":"Change the password of the user","operationId":"changePassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"currentPassword":{"type":"string","description":"The current password is required"},"revokeOtherSessions":{"type":["boolean","null"],"description":"Must be a boolean value"}},"required":["newPassword","currentPassword"]}}}},"responses":{"200":{"description":"Password successfully changed","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"New session token if other sessions were revoked"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/update-session":{"post":{"tags":["Auth"],"description":"Update the current session","operationId":"updateSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","$ref":"#/components/schemas/Session"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/update-user":{"post":{"tags":["Auth"],"description":"Update the current user","operationId":"updateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","description":"The image of the user","nullable":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/delete-user":{"post":{"tags":["Auth"],"description":"Delete the user","operationId":"deleteUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The callback URL to redirect to after the user is deleted"},"password":{"type":"string","description":"The user's password. Required if session is not fresh"},"token":{"type":"string","description":"The deletion verification token"}}}}}},"responses":{"200":{"description":"User deletion processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"message":{"type":"string","enum":["User deleted","Verification email sent"],"description":"Status message of the deletion process"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/request-password-reset":{"post":{"tags":["Auth"],"description":"Send a password reset email to the user","operationId":"requestPasswordReset","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to send a password reset email to"},"redirectTo":{"type":["string","null"],"description":"The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/reset-password/{token}":{"get":{"tags":["Auth"],"description":"Redirects the user to the callback URL with the token","operationId":"resetPasswordCallback","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"The token to reset the password","schema":{"type":"string"}},{"name":"callbackURL","in":"query","required":true,"description":"The URL to redirect the user to reset their password","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/list-sessions":{"get":{"tags":["Auth"],"description":"List all active sessions for the user","operationId":"listUserSessions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/revoke-session":{"post":{"tags":["Auth"],"description":"Revoke a single session","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token to revoke"}},"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the session was revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/revoke-sessions":{"post":{"tags":["Auth"],"description":"Revoke all sessions for the user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/revoke-other-sessions":{"post":{"tags":["Auth"],"description":"Revoke all other sessions for the user except the current one","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all other sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/link-social":{"post":{"tags":["Auth"],"description":"Link a social account to the user","operationId":"linkSocialAccount","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":["string","null"],"description":"The URL to redirect to after the user has signed in"},"provider":{"type":"string"},"idToken":{"type":["object","null"],"properties":{"token":{"type":"string"},"nonce":{"type":["string","null"]},"accessToken":{"type":["string","null"]},"refreshToken":{"type":["string","null"]},"scopes":{"type":["array","null"]}},"required":["token"]},"requestSignUp":{"type":["boolean","null"]},"scopes":{"type":["array","null"],"description":"Additional scopes to request from the provider"},"errorCallbackURL":{"type":["string","null"],"description":"The URL to redirect to if there is an error during the link process"},"disableRedirect":{"type":["boolean","null"],"description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"additionalData":{"type":["string","null"]}},"required":["provider"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The authorization URL to redirect the user to"},"redirect":{"type":"boolean","description":"Indicates if the user should be redirected to the authorization URL"},"status":{"type":"boolean"}},"required":["redirect"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/list-accounts":{"get":{"tags":["Auth"],"description":"List all accounts linked to the user","operationId":"listUserAccounts","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accountId":{"type":"string"},"userId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","providerId","createdAt","updatedAt","accountId","userId","scopes"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/delete-user/callback":{"get":{"tags":["Auth"],"description":"Callback to complete user deletion with verification token","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","schema":{"type":"string","description":"The token to verify the deletion request"}},{"name":"callbackURL","in":"query","schema":{"type":["string","null"],"description":"The URL to redirect to after deletion"}}],"responses":{"200":{"description":"User successfully deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the deletion was successful"},"message":{"type":"string","enum":["User deleted"],"description":"Confirmation message"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/unlink-account":{"post":{"tags":["Auth"],"description":"Unlink an account","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string"},"accountId":{"type":["string","null"]}},"required":["providerId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/refresh-token":{"post":{"tags":["Auth"],"description":"Refresh the access token using a refresh token","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","description":"The provider ID for the OAuth provider"},"accountId":{"type":["string","null"],"description":"The account ID associated with the refresh token"},"userId":{"type":["string","null"],"description":"The user ID associated with the account"}},"required":["providerId"]}}}},"responses":{"200":{"description":"Access token refreshed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string"},"idToken":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid refresh token or provider configuration"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/get-access-token":{"post":{"tags":["Auth"],"description":"Get a valid access token, doing a refresh if needed","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","description":"The provider ID for the OAuth provider"},"accountId":{"type":["string","null"],"description":"The account ID associated with the refresh token"},"userId":{"type":["string","null"],"description":"The user ID associated with the account"}},"required":["providerId"]}}}},"responses":{"200":{"description":"A Valid access token","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string"},"idToken":{"type":"string"},"accessToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid refresh token or provider configuration"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/account-info":{"get":{"tags":["Auth"],"description":"Get the account info provided by the provider","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":"string"},"emailVerified":{"type":"boolean"}},"required":["id","emailVerified"]},"data":{"type":"object","properties":{},"additionalProperties":true}},"required":["user","data"],"additionalProperties":false}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/ok":{"get":{"tags":["Auth"],"description":"Check if the API is working","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API is working","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates if the API is working"}},"required":["ok"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/error":{"get":{"tags":["Auth"],"description":"Displays an error page","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","description":"The HTML content of the error page"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/create":{"post":{"tags":["Organizations"],"description":"Create an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":["string","null"],"description":"The metadata of the organization"},"keepCurrentActiveOrganization":{"type":["boolean","null"],"description":"Whether to keep the current active organization active after creating a new one. Eg: true"},"description":{"type":["string","null"]},"companyWebsite":{"type":["string","null"]}},"required":["name","slug"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization that was created","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/update":{"post":{"tags":["Organizations"],"description":"Update an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"description":{"type":["string","null"]},"companyWebsite":{"type":["string","null"]},"name":{"type":["string","null"],"description":"The name of the organization"},"slug":{"type":["string","null"],"description":"The slug of the organization"},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":["string","null"],"description":"The metadata of the organization"}}},"organizationId":{"type":["string","null"],"description":"The organization ID. Eg: \"org-id\""}},"required":["data"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The updated organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/delete":{"post":{"tags":["Organizations"],"description":"Delete an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization id to delete"}},"required":["organizationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","description":"The organization id that was deleted"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/set-active":{"post":{"tags":["Organizations"],"description":"Set the active organization","operationId":"setActiveOrganization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":["string","null"]},"organizationSlug":{"type":["string","null"],"description":"The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\""}},"required":[]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-full-organization":{"get":{"tags":["Organizations"],"description":"Get the full organization","operationId":"getOrganization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list":{"get":{"tags":["Organizations"],"description":"List all organizations","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/invite-member":{"post":{"tags":["Organizations"],"description":"Create an invitation to an organization","operationId":"createOrganizationInvitation","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to invite"},"role":{"type":"string","description":"The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""},"organizationId":{"type":["string","null"],"description":"The organization ID to invite the user to"},"resend":{"type":["boolean","null"],"description":"Resend the invitation email, if the user is already invited. Eg: true"},"teamId":{"type":"string"}},"required":["email","role","teamId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","createdAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/cancel-invitation":{"post":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to cancel"}},"required":["invitationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/accept-invitation":{"post":{"tags":["Organizations"],"description":"Accept an invitation to an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to accept"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-invitation":{"get":{"tags":["Organizations"],"description":"Get an invitation by ID","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","schema":{"type":"string","description":"The ID of the invitation to get"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"inviterEmail":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","organizationName","organizationSlug","inviterEmail"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/reject-invitation":{"post":{"tags":["Organizations"],"description":"Reject an invitation to an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to reject"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object","nullable":true}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-invitations":{"get":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-active-member":{"get":{"tags":["Organizations"],"description":"Get the member details of the active organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/check-slug":{"post":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"The organization slug to check. Eg: \"my-org\""}},"required":["slug"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/remove-member":{"post":{"tags":["Organizations"],"description":"Remove a member from an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memberIdOrEmail":{"type":"string","description":"The ID or email of the member to remove"},"organizationId":{"type":["string","null"],"description":"The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\""}},"required":["memberIdOrEmail"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/update-member-role":{"post":{"tags":["Organizations"],"description":"Update the role of a member in an organization","operationId":"updateOrganizationMemberRole","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","description":"The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]"},"memberId":{"type":"string","description":"The member id to apply the role update to. Eg: \"member-id\""},"organizationId":{"type":["string","null"],"description":"An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\""}},"required":["role","memberId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/leave":{"post":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization Id for the member to leave. Eg: \"organization-id\""}},"required":["organizationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-user-invitations":{"get":{"tags":["Organizations"],"description":"List all invitations a user has received","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"inviterId":{"type":"string","description":"The ID of the user who created the invitation"},"teamId":{"type":"string","description":"The ID of the team associated with the invitation","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","organizationName","inviterId","status","expiresAt","createdAt"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-members":{"get":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-active-member-role":{"get":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/create-role":{"post":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":["string","null"]},"role":{"type":"string","description":"The name of the role to create"},"permission":{"type":"string","description":"The permission to assign to the role"},"additionalFields":{"type":["object","null"],"properties":{}}},"required":["role","permission"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/delete-role":{"post":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-roles":{"get":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-role":{"get":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/update-role":{"post":{"tags":["Organizations"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/has-permission":{"post":{"tags":["Organizations"],"description":"Check if the user has permission","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"object","description":"The permission to check","deprecated":true},"permissions":{"type":"object","description":"The permission to check"}},"required":["permissions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/stripe/webhook":{"post":{"tags":["Billing"],"operationId":"handleStripeWebhook","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/subscription/upgrade":{"post":{"tags":["Billing"],"operationId":"upgradeSubscription","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"The name of the plan to upgrade to. Eg: \"pro\""},"annual":{"type":["boolean","null"],"description":"Whether to upgrade to an annual plan. Eg: true"},"referenceId":{"type":["string","null"],"description":"Reference ID for the subscription. Eg: \"org_123\""},"subscriptionId":{"type":["string","null"],"description":"The Stripe subscription ID to upgrade. Eg: \"sub_1ABC2DEF3GHI4JKL\""},"customerType":{"type":["string","null"],"description":"Customer type for the subscription. Eg: \"user\" or \"organization\""},"metadata":{"type":["string","null"]},"seats":{"type":["number","null"],"description":"Number of seats to upgrade to (if applicable). Eg: 1"},"locale":{"type":["string","null"],"description":"The locale to display Checkout in. Eg: 'en', 'ko'. If not provided or set to `auto`, the browser's locale is used."},"successUrl":{"type":"string","description":"Callback URL to redirect back after successful subscription. Eg: \"https://example.com/success\"","default":"/"},"cancelUrl":{"type":"string","description":"If set, checkout shows a back button and customers will be directed here if they cancel payment. Eg: \"https://example.com/pricing\"","default":"/"},"returnUrl":{"type":["string","null"],"description":"URL to take customers to when they click on the billing portal’s link to return to your website. Eg: \"https://example.com/dashboard\""},"scheduleAtPeriodEnd":{"type":"boolean","description":"Schedule the plan change at the end of the current billing period instead of applying immediately.","default":false},"disableRedirect":{"type":"boolean","description":"Disable redirect after successful subscription. Eg: true","default":false}},"required":["plan","successUrl","cancelUrl","scheduleAtPeriodEnd","disableRedirect"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/subscription/cancel":{"post":{"tags":["Billing"],"operationId":"cancelSubscription","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"referenceId":{"type":["string","null"],"description":"Reference id of the subscription to cancel. Eg: '123'"},"subscriptionId":{"type":["string","null"],"description":"The Stripe subscription ID to cancel. Eg: 'sub_1ABC2DEF3GHI4JKL'"},"customerType":{"type":["string","null"],"description":"Customer type for the subscription. Eg: \"user\" or \"organization\""},"returnUrl":{"type":"string","description":"URL to take customers to when they click on the billing portal's link to return to your website. Eg: \"/account\""},"disableRedirect":{"type":"boolean","description":"Disable redirect after successful subscription cancellation. Eg: true","default":false}},"required":["returnUrl","disableRedirect"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/subscription/restore":{"post":{"tags":["Billing"],"operationId":"restoreSubscription","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"referenceId":{"type":["string","null"],"description":"Reference id of the subscription to restore. Eg: '123'"},"subscriptionId":{"type":["string","null"],"description":"The Stripe subscription ID to restore. Eg: 'sub_1ABC2DEF3GHI4JKL'"},"customerType":{"type":["string","null"],"description":"Customer type for the subscription. Eg: \"user\" or \"organization\""}},"required":[]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/subscription/list":{"get":{"tags":["Billing"],"operationId":"listActiveSubscriptions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/subscription/success":{"get":{"tags":["Billing"],"operationId":"handleSubscriptionSuccess","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/subscription/billing-portal":{"post":{"tags":["Billing"],"operationId":"createBillingPortal","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":["string","null"],"description":"The IETF language tag of the locale Customer Portal is displayed in. Eg: 'en', 'ko'. If not provided or set to `auto`, the browser's locale is used."},"referenceId":{"type":["string","null"]},"customerType":{"type":["string","null"],"description":"Customer type for the subscription. Eg: \"user\" or \"organization\""},"returnUrl":{"type":"string","default":"/"},"disableRedirect":{"type":"boolean","description":"Disable redirect after creating billing portal session. Eg: true","default":false}},"required":["returnUrl","disableRedirect"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/api-key/create":{"post":{"tags":["API Keys"],"description":"Create a new API key for a user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":["string","null"],"description":"The configuration ID to use for the API key. If not provided, the default configuration will be used."},"name":{"type":["string","null"],"description":"Name of the Api Key"},"expiresIn":{"type":"string"},"prefix":{"type":["string","null"],"description":"Prefix of the Api Key"},"remaining":{"type":"string"},"metadata":{"type":["string","null"]},"organizationId":{"type":["string","null"],"description":"Organization Id of the organization that the Api Key belongs to. Eg: 'org-id'"}},"required":["expiresIn","remaining"]}}}},"responses":{"200":{"description":"API key created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the API key"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"name":{"type":"string","nullable":true,"description":"Name of the API key"},"prefix":{"type":"string","nullable":true,"description":"Prefix of the API key"},"start":{"type":"string","nullable":true,"description":"Starting characters of the key (if configured)"},"key":{"type":"string","description":"The full API key (only returned on creation)"},"enabled":{"type":"boolean","description":"Whether the key is enabled"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiration timestamp"},"referenceId":{"type":"string","description":"ID of the reference owning the key"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"Last refill timestamp"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"Last request timestamp"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Metadata associated with the key"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum requests in time window"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"Rate limit time window in milliseconds"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests"},"refillAmount":{"type":"number","nullable":true,"description":"Amount to refill"},"refillInterval":{"type":"number","nullable":true,"description":"Refill interval in milliseconds"},"rateLimitEnabled":{"type":"boolean","description":"Whether rate limiting is enabled"},"requestCount":{"type":"number","description":"Current request count in window"},"permissions":{"type":"object","nullable":true,"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Permissions associated with the key"}},"required":["id","createdAt","updatedAt","key","enabled","referenceId","rateLimitEnabled","requestCount"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/api-key/get":{"get":{"tags":["API Keys"],"description":"Retrieve an existing API key by ID","security":[{"bearerAuth":[]}],"parameters":[{"name":"configId","in":"query","schema":{"type":["string","null"],"description":"The configuration ID to use for the API key lookup. If not provided, the default configuration will be used."}},{"name":"id","in":"query","schema":{"type":"string","description":"The id of the Api Key"}}],"responses":{"200":{"description":"API key retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/api-key/update":{"post":{"tags":["API Keys"],"description":"Update an existing API key by ID","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":["string","null"],"description":"The configuration ID to use for the API key lookup. If not provided, the default configuration will be used."},"keyId":{"type":"string","description":"The id of the Api Key"},"name":{"type":["string","null"],"description":"The name of the key"},"enabled":{"type":["boolean","null"],"description":"Whether the Api Key is enabled or not"},"remaining":{"type":["number","null"],"description":"The number of remaining requests"},"refillAmount":{"type":["number","null"],"description":"The refill amount"},"refillInterval":{"type":["number","null"],"description":"The refill interval"},"metadata":{"type":["string","null"]},"expiresIn":{"type":"string"},"rateLimitEnabled":{"type":["boolean","null"],"description":"Whether the key has rate limiting enabled."},"permissions":{"type":"string"}},"required":["keyId","expiresIn","permissions"]}}}},"responses":{"200":{"description":"API key updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/api-key/delete":{"post":{"tags":["API Keys"],"description":"Delete an existing API key","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string","description":"The id of the API key to delete"}},"required":["keyId"]}}}},"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the API key was successfully deleted"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/api-key/list":{"get":{"tags":["API Keys"],"description":"List all API keys for the authenticated user or for a specific organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API keys retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}},"total":{"type":"number","description":"Total number of API keys"},"limit":{"type":"number","nullable":true,"description":"The limit used for pagination"},"offset":{"type":"number","nullable":true,"description":"The offset used for pagination"}},"required":["apiKeys","total"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean","default":false,"readOnly":true},"image":{"type":"string"},"createdAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"updatedAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"stripeCustomerId":{"type":"string"},"role":{"type":"string","readOnly":true},"banned":{"type":"boolean","default":false,"readOnly":true},"banReason":{"type":"string","readOnly":true},"banExpires":{"type":"string","format":"date-time","readOnly":true}},"required":["name","email","createdAt","updatedAt"]},"Session":{"type":"object","properties":{"id":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"updatedAt":{"type":"string","format":"date-time"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"activeOrganizationId":{"type":"string"},"impersonatedBy":{"type":"string"}},"required":["expiresAt","token","createdAt","updatedAt","userId"]},"Account":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"idToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"},"scope":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"updatedAt":{"type":"string","format":"date-time"}},"required":["accountId","providerId","userId","createdAt","updatedAt"]},"Verification":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"value":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"updatedAt":{"type":"string","format":"date-time","default":"Generated at runtime"}},"required":["identifier","value","expiresAt","createdAt","updatedAt"]},"Jwks":{"type":"object","properties":{"id":{"type":"string"},"publicKey":{"type":"string"},"privateKey":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["publicKey","privateKey","createdAt"]},"OauthClient":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"disabled":{"type":"boolean","default":false},"skipConsent":{"type":"boolean"},"enableEndSession":{"type":"boolean"},"subjectType":{"type":"string"},"scopes":{"type":"string[]"},"userId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"uri":{"type":"string"},"icon":{"type":"string"},"contacts":{"type":"string[]"},"tos":{"type":"string"},"policy":{"type":"string"},"softwareId":{"type":"string"},"softwareVersion":{"type":"string"},"softwareStatement":{"type":"string"},"redirectUris":{"type":"string[]"},"postLogoutRedirectUris":{"type":"string[]"},"tokenEndpointAuthMethod":{"type":"string"},"grantTypes":{"type":"string[]"},"responseTypes":{"type":"string[]"},"public":{"type":"boolean"},"type":{"type":"string"},"requirePKCE":{"type":"boolean"},"referenceId":{"type":"string"},"metadata":{"type":"json"}},"required":["clientId","redirectUris"]},"OauthRefreshToken":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"clientId":{"type":"string"},"sessionId":{"type":"string"},"userId":{"type":"string"},"referenceId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"revoked":{"type":"string","format":"date-time"},"authTime":{"type":"string","format":"date-time"},"scopes":{"type":"string[]"}},"required":["token","clientId","userId","scopes"]},"OauthAccessToken":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"clientId":{"type":"string"},"sessionId":{"type":"string"},"userId":{"type":"string"},"referenceId":{"type":"string"},"refreshId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"string[]"}},"required":["clientId","scopes"]},"OauthConsent":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"userId":{"type":"string"},"referenceId":{"type":"string"},"scopes":{"type":"string[]"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["clientId","scopes"]},"Organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"metadata":{"type":"string"},"description":{"type":"string"},"companyWebsite":{"type":"string"},"stripeCustomerId":{"type":"string"}},"required":["name","slug","createdAt"]},"OrganizationRole":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"},"permission":{"type":"string"},"createdAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"updatedAt":{"type":"string","format":"date-time"}},"required":["organizationId","role","permission","createdAt"]},"Member":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","default":"member"},"createdAt":{"type":"string","format":"date-time"}},"required":["organizationId","userId","role","createdAt"]},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","default":"pending"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time","default":"Generated at runtime"},"inviterId":{"type":"string"}},"required":["organizationId","email","status","expiresAt","createdAt","inviterId"]},"Subscription":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string"},"referenceId":{"type":"string"},"stripeCustomerId":{"type":"string"},"stripeSubscriptionId":{"type":"string"},"status":{"type":"string","default":"incomplete"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"trialStart":{"type":"string","format":"date-time"},"trialEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean","default":false},"cancelAt":{"type":"string","format":"date-time"},"canceledAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"seats":{"type":"number"},"billingInterval":{"type":"string"},"stripeScheduleId":{"type":"string"}},"required":["plan","referenceId"]},"Apikey":{"type":"object","properties":{"id":{"type":"string"},"configId":{"type":"string","default":"default","readOnly":true},"name":{"type":"string","readOnly":true},"start":{"type":"string","readOnly":true},"referenceId":{"type":"string","readOnly":true},"prefix":{"type":"string","readOnly":true},"key":{"type":"string","readOnly":true},"refillInterval":{"type":"number","readOnly":true},"refillAmount":{"type":"number","readOnly":true},"lastRefillAt":{"type":"string","format":"date-time","readOnly":true},"enabled":{"type":"boolean","default":true,"readOnly":true},"rateLimitEnabled":{"type":"boolean","default":true,"readOnly":true},"rateLimitTimeWindow":{"type":"number","default":60000,"readOnly":true},"rateLimitMax":{"type":"number","default":20000,"readOnly":true},"requestCount":{"type":"number","default":0,"readOnly":true},"remaining":{"type":"number","readOnly":true},"lastRequest":{"type":"string","format":"date-time","readOnly":true},"expiresAt":{"type":"string","format":"date-time","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"permissions":{"type":"string","readOnly":true},"metadata":{"type":"string"}},"required":[]},"DeviceCode":{"type":"object","properties":{"id":{"type":"string"},"deviceCode":{"type":"string"},"userCode":{"type":"string"},"userId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"lastPolledAt":{"type":"string","format":"date-time"},"pollingInterval":{"type":"number"},"clientId":{"type":"string"},"scope":{"type":"string"}},"required":["deviceCode","userCode","expiresAt","status"]}},"securitySchemes":{"apiKeyCookie":{"type":"apiKey","in":"cookie","name":"apiKeyCookie","description":"API Key authentication via cookie"},"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication"}}},"tags":[{"name":"AdminAuditLogs"},{"name":"AdminBilling"},{"name":"AdminTunnels"},{"name":"Agents"},{"name":"API Keys","description":"Create and manage API keys for users and organizations."},{"name":"AppSubmission"},{"name":"Auth","description":"Core authentication endpoints for managing user sessions, accounts, and security."},{"name":"Billing","description":"Subscriptions, plans, billing portal, and webhooks."},{"name":"Chats"},{"name":"Deployments"},{"name":"GitHub"},{"name":"Inspector"},{"name":"Models"},{"name":"Onboarding"},{"name":"Organizations","description":"Organizations, members, roles, and invitations."},{"name":"Permissions"},{"name":"Polls"},{"name":"Public"},{"name":"PublicChat"},{"name":"Server Pools"},{"name":"ServerAudits"},{"name":"ServerEvals"},{"name":"Servers"},{"name":"User Preferences"},{"name":"Vibe"}]}