{"openapi":"3.1.0","info":{"title":"Prisma Postgres Management API","description":"REST API for managing Prisma Postgres projects, databases, backups, and workspaces.","version":"v1"},"tags":[{"name":"Projects"},{"name":"Databases"},{"name":"Databases Connections"},{"name":"Database Backups"},{"name":"Database Usage"},{"name":"Connections"},{"name":"Integrations"},{"name":"Service Tokens"},{"name":"Workspaces"},{"name":"Regions"},{"name":"Misc"},{"name":"[Experimental]","description":"Experimental endpoints are in active development and may change at any time without notice."}],"security":[{"OAuth2":["workspace:admin","offline_access"]},{"Bearer":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","description":"OAuth2 authentication","flows":{"authorizationCode":{"authorizationUrl":"https://auth.prisma.io/authorize","tokenUrl":"https://auth.prisma.io/token","refreshUrl":"https://auth.prisma.io/token","scopes":{"workspace:admin":"Full access to workspace resources","offline_access":"Offline access"}}}},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth2 token for API authentication"}}},"paths":{"/v1/agent-approvals/{approvalId}":{"get":{"operationId":"getV1Agent-approvalsByApprovalId","tags":["Agents"],"summary":"Poll an approval","description":"Reports where an approval stands, so an agent holding an approval_required response can wait for the sponsor's decision and retry. Only the agent the approval belongs to can read it.","responses":{"200":{"description":"The approval's current state","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","approved","approved_window","denied","expired","consumed"]},"expiresAt":{"type":"string"},"windowExpiresAt":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"hint":{"type":"string"}},"required":["id","status","expiresAt","windowExpiresAt","decidedAt"]}}}},"404":{"description":"No such approval for this agent","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"approvalId","required":true}]}},"/v1/apps":{"get":{"operationId":"getV1Apps","summary":"List apps","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services` instead.\n\nReturns all apps the token has access to, ordered by creation time (oldest first). Optionally filter by project ID. Supports cursor-based pagination.","responses":{"200":{"description":"Returns the list of apps.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed projectId filter).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"logicalId","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postV1Apps","summary":"Create app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services` instead.\n\nCreates a new app under the specified project. The `projectId` is required in the request body. The app is placed in the given region, or the project's default region if omitted (falling back to us-east-1). Returns `409 Conflict` when an app already occupies the slot on the resolved branch, either by name or by `logicalId`; the body includes the existing app's id, name, branch, and logical id, and `conflict` says which attribute clashed. The name is checked first. `logicalId` cannot be combined with `branchGitName`; pass `branchId` instead.","responses":{"201":{"description":"App created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"An app already occupies the slot on the resolved branch, by `displayName` or by `logicalId`. The body includes the existing app's id, name, branch git name, and logical id; `conflict` says which attribute clashed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"app:already_exists"},"message":{"type":"string"},"existingAppId":{"type":"string"},"name":{"type":"string"},"branchGitName":{"type":"string"},"conflict":{"description":"Which attribute of the existing app clashed.","type":"string","enum":["name","logicalId"]},"logicalId":{"description":"The existing app's logical id.","type":["string","null"]}},"required":["code","message","existingAppId","name","branchGitName"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. missing projectId, empty display name, or invalid region).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"regionId":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"]},"branchId":{"anyOf":[{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"branchGitName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."}},"required":["displayName","projectId"]}}}}}},"/v1/apps/{appId}":{"get":{"operationId":"getV1AppsByAppId","summary":"Get app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services/{serviceId}` instead.\n\nReturns an app by ID, including its region and active promoted deployment reference.","responses":{"200":{"description":"App retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1AppsByAppId","summary":"Update app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `PATCH /v1/services/{serviceId}` instead.\n\nUpdates the display name, logical id, or branch of an app. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the app first, then set its `logicalId`.","responses":{"200":{"description":"App updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"An app with the same `logicalId` already exists on the branch, or the app is already bound to a different `logicalId`. Set `logicalId` to null first to change it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. empty display name).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource. Send null to clear the logical id.","anyOf":[{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"type":"null"}]},"branchId":{"anyOf":[{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"branchGitName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteV1AppsByAppId","summary":"Delete app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `DELETE /v1/services/{serviceId}` instead.\n\nDeletes an app. Deployments under the app are deleted before the app is deleted.","responses":{"204":{"description":"App deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A deployment could not be deleted, or a concurrent deployment was created while deleting the app.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/apps/{appId}/promote":{"post":{"operationId":"postV1AppsByAppIdPromote","summary":"Promote deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/promote` instead.\n\nPromotes a deployment to be the active deployment behind the app's stable endpoint. The deployment must be running. Returns the app endpoint domain.","responses":{"200":{"description":"Deployment promoted to app endpoint. The `reassignedDomains` field counts the app's custom hostnames that were synced during the request. A hostname whose certificate is still being issued moves to the new deployment once issuance finishes, and one whose sync failed is retried shortly after.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App or deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment is not running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed app ID or missing deployment ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or Compute resource limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}}}}}}},"/v1/apps/{appId}/rollback":{"post":{"operationId":"postV1AppsByAppIdRollback","summary":"Roll an app back to an existing deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/rollback` instead.\n\nMakes any eligible existing deployment live behind the app's stable endpoint (rollback or roll-forward). Unlike promote, a stopped target is started and waited until it is running before the endpoint is switched, so the currently-live deployment keeps serving with zero downtime. Returns the app endpoint domain.","responses":{"200":{"description":"Deployment made live behind the app endpoint. The `reassignedDomains` field counts the app's custom hostnames that were synced during the request. A hostname whose certificate is still being issued moves to the new deployment once issuance finishes, and one whose sync failed is retried shortly after.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App or deployment not found, or the deployment's Foundry artifact no longer exists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed app ID or missing deployment ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or Compute resource limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}}}}}}},"/v1/apps/{appId}/domains":{"get":{"operationId":"getV1AppsByAppIdDomains","summary":"List custom domains for an app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services/{serviceId}/domains` instead.\n\nReturns all custom domains attached to any deployment of the app. Domains are aggregated across all deployments since Foundry lists per deployment.","responses":{"200":{"description":"List of custom domains.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","const":false},"nextCursor":{"type":"null","const":null}},"required":["hasMore","nextCursor"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"post":{"operationId":"postV1AppsByAppIdDomains","summary":"Create a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/domains` instead.\n\nRegisters a custom hostname for the app. The hostname must CNAME to the regional switchboard target before DNS verification can succeed. Returns 429 if the app has reached its domain quota (default: 3).","responses":{"200":{"description":"Custom domain already registered on this app.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"201":{"description":"Custom domain created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"400":{"description":"Invalid hostname or DNS verification failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Hostname already registered.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"App has no promoted deployment, or the workspace has not proven it owns the hostname. In the second case `error.code` is `domain-ownership-required` and `error.verification` holds the TXT record to publish (`type`, `name`, `value`, `ttl`): the name is `_prisma-verification.<hostname>` and the value is the same for every hostname in the workspace. Ownership is checked before DNS routing, so a client can call this route on a hostname whose CNAME does not exist yet, read the record from the 422, publish it, and retry.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Domain quota exceeded or rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"DNS ownership verification is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z]{2,}$"}},"required":["hostname"]}}}}}},"/v1/apps/{appId}/deployments":{"get":{"operationId":"getV1AppsByAppIdDeployments","summary":"List deployments","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services/{serviceId}/deployments` instead.\n\nReturns all deployments belonging to an app, ordered by creation time (newest first). Supports cursor-based pagination.","responses":{"200":{"description":"Returns the list of deployments.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"serviceId":{"type":"string"},"foundryVersionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","serviceId","foundryVersionId","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"}]},"post":{"operationId":"postV1AppsByAppIdDeployments","summary":"Create deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/deployments` instead.\n\nCreates a new deployment under the specified app. Returns a pre-signed upload URL for the artifact unless `skipCodeUpload` is set (which forks the active promoted deployment's artifact). Environment variables are resolved automatically from the app's attached Branch (production-class templates for the production Branch; preview-class templates for preview Branches). Manage env vars via the `/v1/environment-variables` endpoints, not as part of the deploy payload.","responses":{"201":{"description":"Deployment created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"uploadUrl":{"type":["string","null"]}},"required":["id","type","url","foundryVersionId","uploadUrl"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found, or the app's attached Branch has been deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. `skipCodeUpload` without an active promoted deployment, or the app is not attached to a Branch — env-var resolution requires a Branch).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while resolving the deploy-time env vars (e.g., a master-key rotation or storage corruption prevents the project's wrapped DEK or a per-value envelope from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"deprecated":true,"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"portMapping":{"type":"object","properties":{"http":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]}}},"skipCodeUpload":{"type":"boolean"}},"additionalProperties":false}}}}}},"/v1/services":{"get":{"operationId":"getV1Services","summary":"List services","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all services the token has access to, ordered by creation time (oldest first). Optionally filter by project ID. Supports cursor-based pagination.","responses":{"200":{"description":"Returns the list of services.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed projectId filter).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"logicalId","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postV1Services","summary":"Create service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new service under the specified project. The `projectId` is required in the request body. The service is placed in the given region, or the project's default region if omitted (falling back to us-east-1). Returns `409 Conflict` when a service already occupies the slot on the resolved branch, either by name or by `logicalId`; the body includes the existing service's id, name, branch, and logical id, and `conflict` says which attribute clashed. The name is checked first. `logicalId` cannot be combined with `branchGitName`; pass `branchId` instead.","responses":{"201":{"description":"Service created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A service already occupies the slot on the resolved branch, by `displayName` or by `logicalId`. The body includes the existing service's id, name, branch git name, and logical id; `conflict` says which attribute clashed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"app:already_exists"},"message":{"type":"string"},"existingAppId":{"type":"string"},"name":{"type":"string"},"branchGitName":{"type":"string"},"conflict":{"description":"Which attribute of the existing app clashed.","type":"string","enum":["name","logicalId"]},"logicalId":{"description":"The existing app's logical id.","type":["string","null"]}},"required":["code","message","existingAppId","name","branchGitName"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. missing projectId, empty display name, or invalid region).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"regionId":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"]},"branchId":{"anyOf":[{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"branchGitName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."}},"required":["displayName","projectId"]}}}}}},"/v1/services/{serviceId}":{"get":{"operationId":"getV1ServicesByServiceId","summary":"Get service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a service by ID, including its region and active promoted deployment reference.","responses":{"200":{"description":"Service retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1ServicesByServiceId","summary":"Update service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUpdates the display name, logical id, or branch of a service. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the service first, then set its `logicalId`.","responses":{"200":{"description":"Service updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A service with the same `logicalId` already exists on the branch, or the service is already bound to a different `logicalId`. Set `logicalId` to null first to change it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. empty display name).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource. Send null to clear the logical id.","anyOf":[{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"type":"null"}]},"branchId":{"anyOf":[{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"branchGitName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteV1ServicesByServiceId","summary":"Delete service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes a service. Deployments under the service are deleted before the service is deleted.","responses":{"204":{"description":"Service deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A deployment could not be deleted, or a concurrent deployment was created while deleting the service.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/services/{serviceId}/promote":{"post":{"operationId":"postV1ServicesByServiceIdPromote","summary":"Promote deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPromotes a deployment to be the active deployment behind the service's stable endpoint. The deployment must be running. Returns the service endpoint domain.","responses":{"200":{"description":"Deployment promoted to service endpoint. The `reassignedDomains` field counts the service's custom hostnames that were synced during the request. A hostname whose certificate is still being issued moves to the new deployment once issuance finishes, and one whose sync failed is retried shortly after.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service or deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment is not running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed service ID or missing deployment ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or Compute resource limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}}}}}}},"/v1/services/{serviceId}/rollback":{"post":{"operationId":"postV1ServicesByServiceIdRollback","summary":"Roll a service back to an existing deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nMakes any eligible existing deployment live behind the service's stable endpoint (rollback or roll-forward). Unlike promote, a stopped target is started and waited until it is running before the endpoint is switched, so the currently-live deployment keeps serving with zero downtime. Returns the service endpoint domain.","responses":{"200":{"description":"Deployment made live behind the service endpoint. The `reassignedDomains` field counts the service's custom hostnames that were synced during the request. A hostname whose certificate is still being issued moves to the new deployment once issuance finishes, and one whose sync failed is retried shortly after.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service or deployment not found, or the deployment's Foundry artifact no longer exists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed service ID or missing deployment ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or Compute resource limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}}}}}}},"/v1/services/{serviceId}/domains":{"get":{"operationId":"getV1ServicesByServiceIdDomains","summary":"List custom domains for a service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all custom domains attached to any deployment of the service. Domains are aggregated across all deployments since Foundry lists per deployment.","responses":{"200":{"description":"List of custom domains.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","const":false},"nextCursor":{"type":"null","const":null}},"required":["hasMore","nextCursor"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"post":{"operationId":"postV1ServicesByServiceIdDomains","summary":"Create a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRegisters a custom hostname for the service. The hostname must CNAME to the regional switchboard target before DNS verification can succeed. Returns 429 if the service has reached its domain quota (default: 3).","responses":{"200":{"description":"Custom domain already registered on this service.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"201":{"description":"Custom domain created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"400":{"description":"Invalid hostname or DNS verification failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Hostname already registered.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Service has no promoted deployment, or the workspace has not proven it owns the hostname. In the second case `error.code` is `domain-ownership-required` and `error.verification` holds the TXT record to publish (`type`, `name`, `value`, `ttl`): the name is `_prisma-verification.<hostname>` and the value is the same for every hostname in the workspace. Ownership is checked before DNS routing, so a client can call this route on a hostname whose CNAME does not exist yet, read the record from the 422, publish it, and retry.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Domain quota exceeded or rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"DNS ownership verification is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z]{2,}$"}},"required":["hostname"]}}}}}},"/v1/services/{serviceId}/deployments":{"get":{"operationId":"getV1ServicesByServiceIdDeployments","summary":"List deployments","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all deployments belonging to a service, ordered by creation time (newest first). Supports cursor-based pagination.","responses":{"200":{"description":"Returns the list of deployments.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"serviceId":{"type":"string"},"foundryVersionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","serviceId","foundryVersionId","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"}]},"post":{"operationId":"postV1ServicesByServiceIdDeployments","summary":"Create deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new deployment under the specified service. Returns a pre-signed upload URL for the artifact unless `skipCodeUpload` is set (which forks the active promoted deployment's artifact). Environment variables are resolved automatically from the service's attached Branch (production-class templates for the production Branch; preview-class templates for preview Branches). Manage env vars via the `/v1/environment-variables` endpoints, not as part of the deploy payload.","responses":{"201":{"description":"Deployment created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"uploadUrl":{"type":["string","null"]}},"required":["id","type","url","foundryVersionId","uploadUrl"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found, or the service's attached Branch has been deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. `skipCodeUpload` without an active promoted deployment, or the service is not attached to a Branch — env-var resolution requires a Branch).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while resolving the deploy-time env vars (e.g., a master-key rotation or storage corruption prevents the project's wrapped DEK or a per-value envelope from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"portMapping":{"type":"object","properties":{"http":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]}}},"skipCodeUpload":{"type":"boolean"}},"additionalProperties":false}}}}}},"/v1/services/{serviceId}/urls":{"post":{"operationId":"postV1ServicesByServiceIdUrls","summary":"Create a RoutingUrl","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nSaves a hostname for the service, before its DNS exists, and answers with what is still missing. The RoutingUrl is `pending` until every condition is met, then `active`, and goes live on its own once the DNS records are published and a covering domain ownership is verified. No domain ownership is created unless `createDomainOwnership` is `true`: then a domain ownership for the exact hostname is created when no verified one covers it. While no domain ownership covers the hostname, the RoutingUrl's `state` is `no_domain_ownership`. A custom domain is registered with Foundry only once ownership is verified, and each registration counts against the workspace's hourly limit of new certificates. When the limit is reached, the RoutingUrl waits, `customDomainSyncError` says when the limit resets, and it registers then on its own.","responses":{"201":{"description":"The RoutingUrl.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(url_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"routingUrl"},"branchId":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Null once the service is deleted."},"hostname":{"type":"string"},"logicalId":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active"],"description":"`pending` until every condition is met, then `active`. An active RoutingUrl stays active when its service's live deployment changes. It goes back to `pending` when its hostname changes, its service is deleted, or no covering domain ownership keeps its ownership met. It records that the hostname went live; `state` says what it does now."},"state":{"type":"string","enum":["no_domain_ownership","not_verified","no_service","no_live_deployment","update_failed","in_use_elsewhere","waiting_for_dns","provisioning_certificate","certificate_failed","updating","active"],"description":"What the hostname is doing now, in one value, worked out on read from what is stored. No part of the platform acts on it: it is for choosing what to show and what to wait for. It can differ from `status`, which records that the hostname once went live. To wait for the hostname to serve, wait for `active`. The first that applies is the state:\n- `no_domain_ownership`: no domain ownership in the workspace covers the hostname, so nothing looks up a TXT record for it. Create one with `PATCH /v1/urls/{id}` and `createDomainOwnership: true`, or with `POST /v1/workspaces/{workspaceId}/domain-ownerships`. `POST /v1/urls/{id}/check` creates none.\n- `not_verified`: the hostname's ownership is not met. Publish the TXT record in `records`, then call `POST /v1/urls/{id}/check`.\n- `no_service`: the hostname's service is deleted.\n- `no_live_deployment`: the service has no live deployment. Deploy the service, or promote one of its deployments.\n- `update_failed`: the last attempt to bring the hostname up to date failed. `customDomainSyncError` says why, and it is retried.\n- `in_use_elsewhere`: another RoutingUrl, which can be on the same service, holds this hostname. `heldBy` names its service when you can access its workspace, and says \"held by another workspace\" otherwise. This RoutingUrl takes the hostname over with no action once the other one gives it up.\n- `waiting_for_dns`: the hostname's DNS does not point where it should. Publish the CNAME record in `records`, then call `POST /v1/urls/{id}/check`.\n- `provisioning_certificate`: the hostname's certificate is being issued.\n- `certificate_failed`: the certificate could not be issued. `customDomain.failureReason` says why; `POST /v1/urls/{id}/check` retries it.\n- `updating`: the hostname is being brought up to date, for example onto the service's new live deployment.\n- `active`: the hostname serves the service's live deployment with an active certificate."},"conditions":{"type":"object","properties":{"ownershipVerified":{"type":"string","enum":["met","unmet","unknown"]},"servicePresent":{"type":"string","enum":["met","unmet","unknown"]},"liveDeployment":{"type":"string","enum":["met","unmet","unknown"]},"dnsPointsAtSwitchboard":{"type":"string","enum":["met","unmet","unknown"]},"customDomainBound":{"type":"string","enum":["met","unmet","unknown"]},"certificateActive":{"type":"string","enum":["met","unmet","unknown"]}},"required":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"],"description":"What the hostname needs to serve, in the order a user meets them. `unknown` means DNS or Foundry has not answered yet."},"firstUnmetCondition":{"type":["string","null"],"enum":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"]},"ownershipExpiry":{"type":["object","null"],"properties":{"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt"],"description":"Set while only an `expiring` domain ownership keeps this active RoutingUrl serving. The hostname stops serving after `expiresAt` unless the TXT record in `records` is published."},"records":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","enum":["ownershipVerified","dnsPointsAtSwitchboard"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"}},"required":["condition","type","name","value","ttl"]},"description":"The DNS records still to publish. The TXT record is listed while ownership is not met, and while only an `expiring` domain ownership keeps it met. While ownership is not met it is the record of the domain ownership for the exact hostname, otherwise that of a wildcard domain ownership that covers it, otherwise the exact hostname's. In `no_domain_ownership` it is the record a domain ownership for the exact hostname would use; publishing it has no effect until that domain ownership exists."},"heldBy":{"type":["object","null"],"properties":{"workspaceId":{"type":["string","null"],"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"message":{"type":["string","null"]}},"required":["workspaceId","projectId","serviceId","message"],"description":"Set when another RoutingUrl holds the hostname. Its ids are shown only to a caller with access to its workspace; otherwise `message` is \"held by another workspace\"."},"customDomain":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":["string","null"],"enum":["pending","provisioning","active","failed"],"description":"Foundry's status of the custom domain. Null when Foundry's last answer is unknown."},"failureReason":{"type":["string","null"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"certificateRetryRequestedAt":{"type":["string","null"],"format":"date-time"},"certificateIssuanceStuck":{"type":"boolean","description":"True when the certificate is still provisioning after the custom domain was registered again."}},"required":["id","status","failureReason","certExpiresAt","lastSeenAt","certificateRetryRequestedAt","certificateIssuanceStuck"],"description":"The Foundry custom domain the RoutingUrl holds, if any."},"customDomainSyncError":{"description":"The error from the last sync with Foundry, also when it left the RoutingUrl without a custom domain. Null when that sync succeeded.","type":["string","null"]},"switchboardDns":{"type":["object","null"],"properties":{"accepted":{"type":"boolean"},"detail":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["accepted","detail","lastSeenAt"],"description":"Foundry's last answer about the hostname's DNS. Null before Foundry has answered."},"setupUrl":{"type":["string","null"],"format":"uri","description":"The Console page that shows what to do next, while the RoutingUrl is pending and has a service."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","branchId","serviceId","hostname","logicalId","status","state","conditions","firstUnmetCondition","ownershipExpiry","records","heldBy","customDomain","customDomainSyncError","switchboardDns","setupUrl","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The service has reached its hostname quota (`quota-exceeded`), or another live RoutingUrl on the Branch has this `logicalId` (`logical-id-taken`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["quota-exceeded","logical-id-taken"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request body is invalid (`validation-error`), the hostname is invalid (`invalid-hostname`), or the service is not on a Branch (`service-not-on-a-branch`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation-error","invalid-hostname","service-not-on-a-branch"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253,"description":"The hostname to serve, such as `shop.com`. Case and a trailing dot are ignored. Wildcards and IP addresses are refused."},"logicalId":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},"createDomainOwnership":{"default":false,"description":"Whether to create a domain ownership for the exact hostname when no verified one covers it. Defaults to `false`: only the RoutingUrl is created or changed, and the workspace's domain ownerships stay as they are. With `true`, a create, or an update that changes the hostname, the service or `logicalId`, also creates that domain ownership if it does not exist, and looks up its TXT record. An update that sends only `true` does the same: it creates that domain ownership when no verified one covers the hostname and none exists for the exact hostname, and otherwise changes nothing.","type":"boolean"}},"required":["hostname"]}}}}},"get":{"operationId":"getV1ServicesByServiceIdUrls","summary":"List RoutingUrls","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the service's hostnames with their conditions and the DNS records still to publish. Reads stored state only; it does not call DNS or Foundry.","responses":{"200":{"description":"The service's RoutingUrls.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(url_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"routingUrl"},"branchId":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Null once the service is deleted."},"hostname":{"type":"string"},"logicalId":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active"],"description":"`pending` until every condition is met, then `active`. An active RoutingUrl stays active when its service's live deployment changes. It goes back to `pending` when its hostname changes, its service is deleted, or no covering domain ownership keeps its ownership met. It records that the hostname went live; `state` says what it does now."},"state":{"type":"string","enum":["no_domain_ownership","not_verified","no_service","no_live_deployment","update_failed","in_use_elsewhere","waiting_for_dns","provisioning_certificate","certificate_failed","updating","active"],"description":"What the hostname is doing now, in one value, worked out on read from what is stored. No part of the platform acts on it: it is for choosing what to show and what to wait for. It can differ from `status`, which records that the hostname once went live. To wait for the hostname to serve, wait for `active`. The first that applies is the state:\n- `no_domain_ownership`: no domain ownership in the workspace covers the hostname, so nothing looks up a TXT record for it. Create one with `PATCH /v1/urls/{id}` and `createDomainOwnership: true`, or with `POST /v1/workspaces/{workspaceId}/domain-ownerships`. `POST /v1/urls/{id}/check` creates none.\n- `not_verified`: the hostname's ownership is not met. Publish the TXT record in `records`, then call `POST /v1/urls/{id}/check`.\n- `no_service`: the hostname's service is deleted.\n- `no_live_deployment`: the service has no live deployment. Deploy the service, or promote one of its deployments.\n- `update_failed`: the last attempt to bring the hostname up to date failed. `customDomainSyncError` says why, and it is retried.\n- `in_use_elsewhere`: another RoutingUrl, which can be on the same service, holds this hostname. `heldBy` names its service when you can access its workspace, and says \"held by another workspace\" otherwise. This RoutingUrl takes the hostname over with no action once the other one gives it up.\n- `waiting_for_dns`: the hostname's DNS does not point where it should. Publish the CNAME record in `records`, then call `POST /v1/urls/{id}/check`.\n- `provisioning_certificate`: the hostname's certificate is being issued.\n- `certificate_failed`: the certificate could not be issued. `customDomain.failureReason` says why; `POST /v1/urls/{id}/check` retries it.\n- `updating`: the hostname is being brought up to date, for example onto the service's new live deployment.\n- `active`: the hostname serves the service's live deployment with an active certificate."},"conditions":{"type":"object","properties":{"ownershipVerified":{"type":"string","enum":["met","unmet","unknown"]},"servicePresent":{"type":"string","enum":["met","unmet","unknown"]},"liveDeployment":{"type":"string","enum":["met","unmet","unknown"]},"dnsPointsAtSwitchboard":{"type":"string","enum":["met","unmet","unknown"]},"customDomainBound":{"type":"string","enum":["met","unmet","unknown"]},"certificateActive":{"type":"string","enum":["met","unmet","unknown"]}},"required":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"],"description":"What the hostname needs to serve, in the order a user meets them. `unknown` means DNS or Foundry has not answered yet."},"firstUnmetCondition":{"type":["string","null"],"enum":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"]},"ownershipExpiry":{"type":["object","null"],"properties":{"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt"],"description":"Set while only an `expiring` domain ownership keeps this active RoutingUrl serving. The hostname stops serving after `expiresAt` unless the TXT record in `records` is published."},"records":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","enum":["ownershipVerified","dnsPointsAtSwitchboard"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"}},"required":["condition","type","name","value","ttl"]},"description":"The DNS records still to publish. The TXT record is listed while ownership is not met, and while only an `expiring` domain ownership keeps it met. While ownership is not met it is the record of the domain ownership for the exact hostname, otherwise that of a wildcard domain ownership that covers it, otherwise the exact hostname's. In `no_domain_ownership` it is the record a domain ownership for the exact hostname would use; publishing it has no effect until that domain ownership exists."},"heldBy":{"type":["object","null"],"properties":{"workspaceId":{"type":["string","null"],"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"message":{"type":["string","null"]}},"required":["workspaceId","projectId","serviceId","message"],"description":"Set when another RoutingUrl holds the hostname. Its ids are shown only to a caller with access to its workspace; otherwise `message` is \"held by another workspace\"."},"customDomain":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":["string","null"],"enum":["pending","provisioning","active","failed"],"description":"Foundry's status of the custom domain. Null when Foundry's last answer is unknown."},"failureReason":{"type":["string","null"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"certificateRetryRequestedAt":{"type":["string","null"],"format":"date-time"},"certificateIssuanceStuck":{"type":"boolean","description":"True when the certificate is still provisioning after the custom domain was registered again."}},"required":["id","status","failureReason","certExpiresAt","lastSeenAt","certificateRetryRequestedAt","certificateIssuanceStuck"],"description":"The Foundry custom domain the RoutingUrl holds, if any."},"customDomainSyncError":{"description":"The error from the last sync with Foundry, also when it left the RoutingUrl without a custom domain. Null when that sync succeeded.","type":["string","null"]},"switchboardDns":{"type":["object","null"],"properties":{"accepted":{"type":"boolean"},"detail":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["accepted","detail","lastSeenAt"],"description":"Foundry's last answer about the hostname's DNS. Null before Foundry has answered."},"setupUrl":{"type":["string","null"],"format":"uri","description":"The Console page that shows what to do next, while the RoutingUrl is pending and has a service."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","branchId","serviceId","hostname","logicalId","status","state","conditions","firstUnmetCondition","ownershipExpiry","records","heldBy","customDomain","customDomainSyncError","switchboardDns","setupUrl","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","const":false},"nextCursor":{"type":"null","const":null}},"required":["hasMore","nextCursor"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"serviceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/projects/{projectId}/branches":{"post":{"operationId":"postV1ProjectsByProjectIdBranches","summary":"Create a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates an empty Branch under the specified Project. Buckets, databases, and apps are created separately. The first Branch in a Project is always created with isDefault=true and role=production regardless of the body value. Later Branches are created with role=preview. Setting isDefault=true while another Branch already holds the default atomically swaps the default flag only.","responses":{"201":{"description":"Created the Branch.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A live Branch with the same gitName already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid gitName.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gitName":{"type":"string","minLength":1},"isDefault":{"type":"boolean"}},"required":["gitName"],"additionalProperties":false}}}}},"get":{"operationId":"getV1ProjectsByProjectIdBranches","summary":"List branches in a project","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the live Branches of a Project. Supports two mutually exclusive filters: ?gitName= (exact match — at most one row), ?gitNameContains= (case-sensitive substring). Soft-deleted Branches are not returned. Ordered by createdAt ascending.","responses":{"200":{"description":"Returned the list of Branches.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Mutually exclusive filters specified together.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"gitName","schema":{"type":"string","minLength":1}},{"in":"query","name":"gitNameContains","schema":{"type":"string","minLength":1}}]}},"/v1/branches/{branchId}":{"get":{"operationId":"getV1BranchesByBranchId","summary":"Get a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a single Branch by ID. Member resources are not inlined — list them via /v1/databases?branchId= and /v1/apps?branchId=.","responses":{"200":{"description":"Returned the Branch.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1BranchesByBranchId","summary":"Update a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPromotes a Branch to be the Project's default. Only isDefault is mutable — gitName rename and role changes are rejected.","responses":{"200":{"description":"Branch updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"gitName rename, role change, demote-default, or unknown field rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isDefault":{"type":["boolean","null"]}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteV1BranchesByBranchId","summary":"Soft-delete a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nSoft-deletes a Branch (sets deletedAt). Refuses if the Branch is the Project's current default, the Project's production Branch, or has live members.","responses":{"204":{"description":"Branch soft-deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Branch still has live member resources.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Branch is the Project's current default or production Branch.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/buckets":{"get":{"operationId":"getV1Buckets","summary":"List buckets","description":"Returns all object-store buckets the token has access to. Optionally filter by project ID.","tags":["Buckets"],"responses":{"200":{"description":"Returns the list of buckets.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"bucket"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"providerName":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string","pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","providerName","status","createdAt","project","branchId","logicalId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1-100"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"description":"Filter buckets by project ID"},{"in":"query","name":"logicalId","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postV1Buckets","summary":"Create bucket","description":"Creates a new object-store bucket in the specified project.","tags":["Buckets"],"responses":{"201":{"description":"Created a new bucket.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"bucket"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"providerName":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string","pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","providerName","status","createdAt","project","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A bucket with the same `logicalId` already exists on the branch.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"description":"ID of the project to create the bucket in","type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"name":{"description":"Display name for the bucket. Generated if omitted.","type":"string","minLength":1,"maxLength":100},"branchId":{"description":"ID of the branch to associate the bucket with. Mutually exclusive with branchGitName.","type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"description":"Git name of the branch to associate the bucket with. Mutually exclusive with branchId.","type":"string","minLength":1},"logicalId":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."}},"required":["projectId"]}}}}}},"/v1/buckets/{bucketId}":{"get":{"operationId":"getV1BucketsByBucketId","summary":"Get bucket","description":"Returns the bucket with the given ID.","tags":["Buckets"],"responses":{"200":{"description":"Returned the bucket with the given ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"bucket"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"providerName":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string","pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","providerName","status","createdAt","project","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Bucket with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"bucketId","schema":{"type":"string","pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1BucketsByBucketId","summary":"Update bucket","description":"Updates the display name, logical id, or branch of the bucket with the given ID. The display name is a label only: the provider bucket name, the objects, and the access keys do not change. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the bucket first, then set its `logicalId`.","tags":["Buckets"],"responses":{"200":{"description":"Updated the bucket.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"bucket"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"providerName":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string","pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","providerName","status","createdAt","project","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Bucket or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A bucket with the same `logicalId` already exists on the branch, the bucket is already bound to a different `logicalId` (set it to null first to change it), the bucket's `logicalId` is already taken on the target branch of a move, or the target branch changed during the move.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. no field given, an empty display name, or `logicalId` combined with a branch move).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"bucketId","schema":{"type":"string","pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"description":"New display name for the bucket. A label only: the provider bucket name does not change.","type":"string","minLength":1,"maxLength":100},"branchId":{"description":"ID of the branch to move the bucket to. Mutually exclusive with branchGitName.","type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"description":"Git name of the branch to move the bucket to; the branch is created when it does not exist. Mutually exclusive with branchId.","type":"string","minLength":1},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource. Send null to clear the logical id.","anyOf":[{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteV1BucketsByBucketId","summary":"Delete bucket","description":"Permanently deletes the bucket with the given ID, all objects stored in it, and all its access keys. This action cannot be undone.","tags":["Buckets"],"responses":{"204":{"description":"Deleted the bucket successfully."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Bucket with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"bucketId","schema":{"type":"string","pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/buckets/{bucketId}/keys":{"get":{"operationId":"getV1BucketsByBucketIdKeys","summary":"List bucket keys","description":"Returns all access keys for the given bucket.","tags":["Buckets"],"responses":{"200":{"description":"Returns the list of bucket keys.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bkey_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"bucketKey"},"name":{"type":"string"},"valueHint":{"type":"string"},"role":{"type":"string","enum":["read","read_write"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","name","valueHint","role","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Bucket with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"bucketId","schema":{"type":"string","pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1-100"}]},"post":{"operationId":"postV1BucketsByBucketIdKeys","summary":"Create bucket key","description":"Creates a new access key for the given bucket. The `secretAccessKey` field is returned exactly once in this response and is never stored — copy it immediately.","tags":["Buckets"],"responses":{"201":{"description":"Created a new bucket key. The secret is returned once in the response body.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bkey_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"bucketKey"},"name":{"type":"string"},"valueHint":{"type":"string"},"role":{"type":"string","enum":["read","read_write"]},"createdAt":{"type":"string","format":"date-time"},"secretAccessKey":{"type":"string"},"accessKeyId":{"type":"string"},"endpoint":{"type":"string"},"bucketName":{"type":"string"}},"required":["id","type","name","valueHint","role","createdAt","secretAccessKey","accessKeyId","endpoint","bucketName"]}},"required":["data"]}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Bucket with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"bucketId","schema":{"type":"string","pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Display name for the key. Generated if omitted.","type":"string","minLength":1},"role":{"type":"string","enum":["read","read_write"],"description":"Access role for the key: \"read\" or \"read_write\"."}},"required":["role"]}}}}}},"/v1/buckets/{bucketId}/keys/{keyId}":{"delete":{"operationId":"deleteV1BucketsByBucketIdKeysByKeyId","summary":"Delete bucket key","description":"Revokes and deletes the bucket key with the given ID.","tags":["Buckets"],"responses":{"204":{"description":"Deleted the bucket key successfully."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Bucket key not found or does not belong to the given bucket.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"bucketId","schema":{"type":"string","pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"keyId","schema":{"type":"string","pattern":"^(bkey_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/builds":{"post":{"operationId":"postV1Builds","summary":"Report a build","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords a build any deploy tool is running — a CI workflow, a deploy script, or Composer from a laptop. The workspace comes from the token, never from the body, which is what lets a build be reported before the project it will create exists. Supplying `runIdentity` makes the call idempotent: a repeat for the same run returns the build already recorded rather than a second one. The response is the same either way; a caller cannot tell whether it created the build or joined one.\n\nA build reported with no `runIdentity` has no dedup key, so a client that retries a lost response creates a second build. Supply a `runIdentity` whenever the run has one.","responses":{"201":{"description":"The build. Returned whether this call created it or an earlier report of the same run did.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"source":{"type":"string","enum":["webhook","setup","manual","ci","cli"]},"state":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]},"phase":{"type":["string","null"],"enum":["queued","build","deploy"],"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive."},"commitSha":{"type":"string"},"branchName":{"type":"string"},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["string","null"]},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"externalLogUrl":{"type":["string","null"]},"deployedUrl":{"type":["string","null"]},"applicationTopologyContentHash":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"failingStep":{"type":["string","null"]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"finishedAt":{"type":["string","null"]}},"required":["id","source","state","phase","commitSha","branchName","gitRepoId","projectId","branchId","externalLogUrl","deployedUrl","applicationTopologyContentHash","errorMessage","failingStep","createdAt","startedAt","finishedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Build not found, or the caller's workspace does not own it (indistinguishable).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["ci","cli"],"description":"`ci` for a build reported from a CI run, `cli` for a deploy run directly by a human or agent."},"commitSha":{"type":"string","minLength":1,"maxLength":200,"description":"Commit the build ran on."},"branchName":{"type":"string","minLength":1,"maxLength":500,"description":"Git branch name."},"runIdentity":{"description":"Identifies the CI run. Supplying it makes creation idempotent — a repeat call for the same run returns the build that already exists. Omit it for builds with no run to name, such as a deploy from a laptop, where every call creates a new build.","type":"object","properties":{"provider":{"type":"string","const":"github","description":"CI provider the run identity belongs to."},"repositoryId":{"type":"string","maxLength":20,"pattern":"^[0-9]+$","description":"Provider's repository id (for GitHub, the numeric repo id)."},"runId":{"type":"string","maxLength":20,"pattern":"^[0-9]+$","description":"Provider's workflow-run id."},"runAttempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the run; a re-run is a separate build."}},"required":["provider","repositoryId","runId","runAttempt"]},"externalLogUrl":{"description":"Link to the run's logs in the reporter's own system.","type":"string","maxLength":2000,"format":"uri"},"projectId":{"description":"Project the build targets, when it exists. A build may be reported before its project does.","type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"applicationTopologyContentHash":{"description":"Content hash of the application topology this run deploys, as submitted to the application-topology endpoint. A value match, never a reference: equal hashes identify the same graph.","type":"string","minLength":1,"maxLength":200}},"required":["source","commitSha","branchName"]}}}}},"get":{"operationId":"getV1Builds","summary":"List builds","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the builds of the caller's workspace, newest first, filtered by project, branch, or state. `cursor` is opaque: pass back the `nextCursor` the previous page returned.","responses":{"200":{"description":"Builds, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"source":{"type":"string","enum":["webhook","setup","manual","ci","cli"]},"state":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]},"phase":{"type":["string","null"],"enum":["queued","build","deploy"],"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive."},"commitSha":{"type":"string"},"branchName":{"type":"string"},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["string","null"]},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"externalLogUrl":{"type":["string","null"]},"deployedUrl":{"type":["string","null"]},"applicationTopologyContentHash":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"failingStep":{"type":["string","null"]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"finishedAt":{"type":["string","null"]}},"required":["id","source","state","phase","commitSha","branchName","gitRepoId","projectId","branchId","externalLogUrl","deployedUrl","applicationTopologyContentHash","errorMessage","failingStep","createdAt","startedAt","finishedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Build not found, or the caller's workspace does not own it (indistinguishable).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"state","schema":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]}}]}},"/v1/builds/{buildId}":{"patch":{"operationId":"patchV1BuildsByBuildId","summary":"Update a build","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords progress on a build. Any holder of the workspace token may patch any field — the webhook, the CI run and Composer each report the part of a deploy they can see, and the token is the boundary. Reaching `running` stamps `startedAt` and reaching a terminal state stamps `finishedAt`, both only if unset, so re-reporting the same state does not move the clock. Once a build has finished, its state no longer changes: a later report updates the other fields and leaves the state as the finishing report set it.\n\n`projectId`, `branchId`, `deployedUrl` and `applicationTopologyContentHash` can each be set once and never changed: a reporter that resolves them partway through a deploy sets them here, but a value already recorded cannot be changed and the attempt is a conflict. Sending the value already recorded is accepted and changes nothing. `projectId` and `branchId` must belong to the caller's workspace, and a branch must belong to the build's project, so a branch from another project is refused.","responses":{"200":{"description":"The updated build.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"source":{"type":"string","enum":["webhook","setup","manual","ci","cli"]},"state":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]},"phase":{"type":["string","null"],"enum":["queued","build","deploy"],"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive."},"commitSha":{"type":"string"},"branchName":{"type":"string"},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["string","null"]},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"externalLogUrl":{"type":["string","null"]},"deployedUrl":{"type":["string","null"]},"applicationTopologyContentHash":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"failingStep":{"type":["string","null"]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"finishedAt":{"type":["string","null"]}},"required":["id","source","state","phase","commitSha","branchName","gitRepoId","projectId","branchId","externalLogUrl","deployedUrl","applicationTopologyContentHash","errorMessage","failingStep","createdAt","startedAt","finishedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Build not found, or the caller's workspace does not own it (indistinguishable).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A field that can only be set once already holds a different value.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"buildId","schema":{"type":"string","pattern":"^(bld_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phase":{"description":"How far the run has got.","type":"string","enum":["queued","build","deploy"]},"state":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]},"failingStep":{"description":"Name of the step that failed, free text — step names come from build tooling the platform cannot validate.","type":"string","minLength":1,"maxLength":500},"errorMessage":{"type":"string","minLength":1,"maxLength":5000},"externalLogUrl":{"type":"string","maxLength":2000,"format":"uri"},"projectId":{"description":"Project the build targets. Can be set once and never changed: a reporter that learns the project partway through a deploy may set it, but a value already recorded cannot be changed.","type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"description":"Branch the build targets. Can be set once and never changed, like `projectId`.","type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"deployedUrl":{"description":"Where the deployed app can be reached. Can be set once and never changed, like `projectId`.","type":"string","maxLength":2000,"format":"uri"},"applicationTopologyContentHash":{"description":"Content hash of the application topology this run deploys, as submitted to the application-topology endpoint. A value match, never a reference: equal hashes identify the same graph. Can be set once and never changed, like `projectId`.","type":"string","minLength":1,"maxLength":200}}}}}}},"get":{"operationId":"getV1BuildsByBuildId","summary":"Get a build","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns one build with the resources it reported acting on.","responses":{"200":{"description":"The build, with its reported resources.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"source":{"type":"string","enum":["webhook","setup","manual","ci","cli"]},"state":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]},"phase":{"type":["string","null"],"enum":["queued","build","deploy"],"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive."},"commitSha":{"type":"string"},"branchName":{"type":"string"},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["string","null"]},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":["string","null"],"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"externalLogUrl":{"type":["string","null"]},"deployedUrl":{"type":["string","null"]},"applicationTopologyContentHash":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"failingStep":{"type":["string","null"]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"finishedAt":{"type":["string","null"]},"resources":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["project","branch","database","app","deployment","bucket","service_key","config_variable"]},"resourceId":{"type":"string","description":"Prefixed id of the reported resource."},"action":{"type":"string","enum":["created","acted_on","deleted"]},"createdAt":{"type":"string"}},"required":["resourceType","resourceId","action","createdAt"]}}},"required":["id","source","state","phase","commitSha","branchName","gitRepoId","projectId","branchId","externalLogUrl","deployedUrl","applicationTopologyContentHash","errorMessage","failingStep","createdAt","startedAt","finishedAt","resources"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Build not found, or the caller's workspace does not own it (indistinguishable).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"buildId","schema":{"type":"string","pattern":"^(bld_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/builds/{buildId}/resources/{resourceType}/{resourceId}":{"put":{"operationId":"putV1BuildsByBuildIdResourcesByResourceTypeByResourceId","summary":"Report a resource a build acted on","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords that the build created, acted on, or deleted a platform resource — the provenance a deploy run leaves behind. Idempotent: re-reporting the same resource updates the row rather than adding one, and never weakens the recorded action. The resource must belong to the caller's workspace, and must still be findable: a soft-deleted resource can be reported, but `project`, `database`, `service_key` and `config_variable` leave no row behind, so a build that deletes one must report it before deleting it. Reporting a deployment as `created` also attaches the deployment to the build and records the app it deployed into, both in the same transaction, because a deployment relates its build to that app whether or not the reporter says so.","responses":{"204":{"description":"Recorded."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Build or resource not found, or the caller's workspace does not own it (indistinguishable).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"buildId","schema":{"type":"string","pattern":"^(bld_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"resourceType","schema":{"type":"string","enum":["project","branch","database","app","deployment","bucket","service_key","config_variable"]},"required":true},{"in":"path","name":"resourceId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["created","acted_on","deleted"],"description":"The strongest effect the build had on the resource. Re-reporting is safe: a weaker action never overwrites a stronger one, so `created` survives a later `acted_on`."}},"required":["action"]}}}}}},"/v1/domains/{domainId}":{"get":{"operationId":"getV1DomainsByDomainId","summary":"Get a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns details for a custom domain by id. Authorization is derived from the parent compute service's workspace.","responses":{"200":{"description":"Custom domain details.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Custom domain not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainId","schema":{"type":"string","pattern":"^(dom_)?[A-Za-z0-9]+$"},"required":true}]},"delete":{"operationId":"deleteV1DomainsByDomainId","summary":"Delete a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRemoves a custom domain binding. Authorization is derived from the parent compute service's workspace.","responses":{"204":{"description":"Custom domain deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Custom domain not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainId","schema":{"type":"string","pattern":"^(dom_)?[A-Za-z0-9]+$"},"required":true}]}},"/v1/domains/{domainId}/retry":{"post":{"operationId":"postV1DomainsByDomainIdRetry","summary":"Retry custom domain provisioning","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRetries DNS verification and certificate issuance for a failed or pending domain. Returns 409 if the domain is not yet eligible for retry (e.g. still provisioning).","responses":{"200":{"description":"Retry initiated, domain state returned.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Custom domain not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Domain is not yet eligible for retry (e.g. still provisioning).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainId","schema":{"type":"string","pattern":"^(dom_)?[A-Za-z0-9]+$"},"required":true}]}},"/v1/domain-ownerships/{domainOwnershipId}":{"get":{"operationId":"getV1Domain-ownershipsByDomainOwnershipId","summary":"Get a domain ownership","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a domain ownership, in any status.","responses":{"200":{"description":"The domain ownership.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(do_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"domainOwnership"},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"The workspace the domain ownership belongs to."},"domain":{"type":"string"},"verification":{"type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]},"status":{"type":"string","enum":["unverified","verified","expiring"],"description":"`verified` when the last answer from DNS carried the workspace's value. `expiring` when a verified domain ownership's record was no longer found: hostnames already serving under it keep serving, and it does not let a new or changed hostname serve. Publishing the record makes it `verified` again. The first lookup at or after `expiresAt` that still finds no value makes it `unverified`. `unverified` otherwise, including when a lookup found another workspace's value and not this workspace's. A lookup that gets no answer changes no status."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The deadline to publish the record, if the status is `expiring`. The status becomes `unverified` at the first lookup at or after this time that still finds no value, so it can stay `expiring` for a while after it. Null otherwise."},"verificationRecordLastSeenAt":{"type":["string","null"],"format":"date-time","description":"When DNS last answered the lookup of the verification record. Null before the first answer, and after a lookup that got no answer while the domain ownership was not verified. A verified domain ownership keeps this answer when a lookup gets no answer."},"verificationRecordPresent":{"description":"Whether that answer carried the workspace's value. Null when there is no answer.","type":["boolean","null"]},"verificationRecordSyncError":{"description":"The error from the last sync of the verification record, such as `DNS unavailable`. Null when that sync succeeded. For display only.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","workspaceId","domain","verification","status","expiresAt","verificationRecordLastSeenAt","verificationRecordPresent","verificationRecordSyncError","createdAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Domain ownership not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainOwnershipId","schema":{"type":"string","pattern":"^(do_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"delete":{"operationId":"deleteV1Domain-ownershipsByDomainOwnershipId","summary":"Delete a domain ownership","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRemoves the domain ownership, in any status. The verification record in DNS is not changed.","responses":{"204":{"description":"Domain ownership deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Domain ownership not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainOwnershipId","schema":{"type":"string","pattern":"^(do_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/domain-ownerships/{domainOwnershipId}/verify":{"post":{"operationId":"postV1Domain-ownershipsByDomainOwnershipIdVerify","summary":"Verify a domain ownership","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLooks up the domain's verification record now and returns the domain ownership with the answer. The same answer updates every domain ownership whose verification record has the same name, in every workspace. When DNS gives no answer, no `status` changes, a verified domain ownership keeps its last answer, the others have it emptied, `verificationRecordSyncError` says why, and the platform checks again later.","responses":{"200":{"description":"The domain ownership with the answer DNS gave. When DNS gave none, it is returned with its `status` unchanged, and with its last answer emptied unless it is verified.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(do_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"domainOwnership"},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"The workspace the domain ownership belongs to."},"domain":{"type":"string"},"verification":{"type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]},"status":{"type":"string","enum":["unverified","verified","expiring"],"description":"`verified` when the last answer from DNS carried the workspace's value. `expiring` when a verified domain ownership's record was no longer found: hostnames already serving under it keep serving, and it does not let a new or changed hostname serve. Publishing the record makes it `verified` again. The first lookup at or after `expiresAt` that still finds no value makes it `unverified`. `unverified` otherwise, including when a lookup found another workspace's value and not this workspace's. A lookup that gets no answer changes no status."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The deadline to publish the record, if the status is `expiring`. The status becomes `unverified` at the first lookup at or after this time that still finds no value, so it can stay `expiring` for a while after it. Null otherwise."},"verificationRecordLastSeenAt":{"type":["string","null"],"format":"date-time","description":"When DNS last answered the lookup of the verification record. Null before the first answer, and after a lookup that got no answer while the domain ownership was not verified. A verified domain ownership keeps this answer when a lookup gets no answer."},"verificationRecordPresent":{"description":"Whether that answer carried the workspace's value. Null when there is no answer.","type":["boolean","null"]},"verificationRecordSyncError":{"description":"The error from the last sync of the verification record, such as `DNS unavailable`. Null when that sync succeeded. For display only.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","workspaceId","domain","verification","status","expiresAt","verificationRecordLastSeenAt","verificationRecordPresent","verificationRecordSyncError","createdAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Domain ownership not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"The domain ownership's new status was saved, but the platform could not queue the work that updates the custom domains it covers. Retry the request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainOwnershipId","schema":{"type":"string","pattern":"^(do_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/connections":{"get":{"operationId":"getV1Connections","summary":"List connections","description":"Returns all connections the actor has access to, with optional database filter.","tags":["Connections"],"responses":{"200":{"description":"Returned list of connections.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}]},"post":{"operationId":"postV1Connections","summary":"Create connection","description":"Creates a new connection for the specified database.","tags":["Connections"],"responses":{"201":{"description":"Created a new connection.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"host":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","type":["string","null"]},"pass":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["string","null"]},"user":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["string","null"]}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString","database","host","pass","user"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"name":{"type":"string","minLength":3,"maxLength":65}},"required":["databaseId","name"]}}}}}},"/v1/connections/{id}":{"get":{"operationId":"getV1ConnectionsById","summary":"Get connection","description":"Returns the connection with the given ID.","tags":["Connections"],"responses":{"200":{"description":"Returned the connection.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Connection with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"delete":{"operationId":"deleteV1ConnectionsById","summary":"Delete connection","description":"Deletes the connection with the given ID.","tags":["Connections"],"responses":{"204":{"description":"Deleted the connection."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Connection with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/connections/{id}/rotate":{"post":{"operationId":"postV1ConnectionsByIdRotate","summary":"Rotate connection credentials","description":"Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.","tags":["Connections"],"responses":{"200":{"description":"Rotated connection credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"host":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","type":["string","null"]},"pass":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["string","null"]},"user":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["string","null"]}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString","database","host","pass","user"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Connection with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/databases":{"get":{"operationId":"getV1Databases","summary":"List databases","description":"Returns all databases the token has access to. Optionally filter by project ID.","tags":["Databases"],"responses":{"200":{"description":"Returns the list of databases.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the requested databases.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"description":"Filter databases by project ID"},{"in":"query","name":"logicalId","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postV1Databases","summary":"Create database","description":"Creates a new database in the specified project. `logicalId` cannot be combined with `branchGitName`; pass `branchId` instead.","tags":["Databases"],"responses":{"201":{"description":"Created a new database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The workspace has reached its plan's database limit (`quota-exceeded`), or a database with the same `logicalId` already exists on the branch (`client-error`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["quota-exceeded","client-error"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"description":"ID of the project to create the database in","type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"region":{"description":"Use \"inherit\" to use the project's default region (falls back to the default database's region for projects without one).","default":"us-east-1","type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1","inherit"]},"name":{"description":"Display name for the database","type":"string","minLength":1},"isDefault":{"default":false,"description":"Whether this is the default database","type":"boolean"},"source":{"description":"Source to create the database from. Omit to create an empty database.","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"description":"ID of the database the backup belongs to","type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"description":"ID of the database to clone from","type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["type","databaseId"]}]},"branchId":{"description":"ID of the Branch to attach the database to. Omit to attach the database to the project's default Branch. Every database belongs to a Branch, so null is rejected.","anyOf":[{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"branchGitName":{"description":"Git name of the Branch to attach the database to; the Branch is created when it does not exist. Mutually exclusive with branchId. Omit to attach to the project's default Branch. Every database belongs to a Branch, so null is rejected.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logicalId":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."}},"required":["projectId"]}}}}}},"/v1/databases/{databaseId}":{"get":{"operationId":"getV1DatabasesByDatabaseId","summary":"Get database","description":"Returns the database with the given ID.","tags":["Databases"],"responses":{"200":{"description":"Returned the database with the given ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the database.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1DatabasesByDatabaseId","summary":"Update database","description":"Updates the database with the given ID. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the database first, then set its `logicalId`.","tags":["Databases"],"responses":{"200":{"description":"Updated the database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the database.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A database with the same `logicalId` already exists on the branch, or the database is already bound to a different `logicalId`. Set `logicalId` to null first to change it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New display name for the database","type":"string","minLength":1},"branchId":{"description":"ID of the Branch to move the database to. Every database belongs to a Branch, so null (detach) is rejected.","anyOf":[{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"branchGitName":{"description":"Git name of the Branch to move the database to; the Branch is created when it does not exist. Mutually exclusive with branchId. Every database belongs to a Branch, so null (detach) is rejected.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource. Send null to clear the logical id.","anyOf":[{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteV1DatabasesByDatabaseId","summary":"Delete database","description":"Deletes the database with the given ID.","tags":["Databases"],"responses":{"204":{"description":"Deleted the database successfully."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Cannot delete the default environment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/databases/{databaseId}/connections":{"get":{"operationId":"getV1DatabasesByDatabaseIdConnections","summary":"Get list of database connections","description":"Returns all connections for the given database.","tags":["Databases Connections"],"responses":{"200":{"description":"Returned all connections for the given database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"}]},"post":{"operationId":"postV1DatabasesByDatabaseIdConnections","summary":"Create database connection string","description":"Creates a new connection string for the given database.","tags":["Databases Connections"],"responses":{"200":{"description":"Created a new connection string for the database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"host":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","type":["string","null"]},"pass":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["string","null"]},"user":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["string","null"]}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString","database","host","pass","user"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":65}},"required":["name"]}}}}}},"/v1/databases/{databaseId}/backups":{"get":{"operationId":"getV1DatabasesByDatabaseIdBackups","summary":"Get list of backups","description":"Returns backups for the specified database.","tags":["Database Backups"],"responses":{"200":{"description":"Returned backups for the given database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"backupType":{"type":"string","enum":["full","incremental","differential"]},"createdAt":{"type":"string"},"size":{"type":"number"},"status":{"type":"string","enum":["running","completed","failed","unknown"]},"type":{"type":"string","const":"backup"}},"required":["id","backupType","createdAt","status"]}},"meta":{"type":"object","properties":{"backupRetentionDays":{"type":"number"}},"required":["backupRetentionDays"]},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":["integer","null"],"minimum":1,"maximum":100}},"required":["hasMore","limit"]}},"required":["data","meta","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Remote database backups are not supported","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/databases/{targetDatabaseId}/restore":{"post":{"operationId":"postV1DatabasesByTargetDatabaseIdRestore","summary":"Restore database (destructive)","description":"⚠️ **Destructive operation** — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding.\n\nReplaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.","tags":["Databases"],"responses":{"200":{"description":"Database restore initiated. The database status will be \"recovering\" until the restore completes.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string"}},"required":["type","databaseId","backupId"]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Target database, source database, or backup not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Target database is currently provisioning or recovering and cannot be restored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid source type or backup not usable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"targetDatabaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"description":"ID of the database the backup belongs to","type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]}},"required":["source"]}}}}}},"/v1/databases/{databaseId}/usage":{"get":{"operationId":"getV1DatabasesByDatabaseIdUsage","summary":"Get database usage metrics","description":"Returns usage metrics for the specified database.","tags":["Database Usage"],"responses":{"200":{"description":"Returned usage metrics for the given database.","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]},"metrics":{"type":"object","properties":{"operations":{"type":"object","properties":{"used":{"type":"number"},"unit":{"type":"string","const":"ops"}},"required":["used","unit"]},"storage":{"type":"object","properties":{"used":{"type":"number"},"unit":{"type":"string","const":"GiB"}},"required":["used","unit"]}},"required":["operations","storage"]},"generatedAt":{"type":"string","format":"date-time"}},"required":["period","metrics","generatedAt"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Error occurred while fetching metrics","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Usage metrics are temporarily unavailable","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"startDate","schema":{"type":"string","format":"date-time"},"description":"Start date for metrics query. Defaults to start of current month if not provided."},{"in":"query","name":"endDate","schema":{"type":"string","format":"date-time"},"description":"End date for metrics query. Will be set to end of day if a future date is provided. Defaults to current date if not provided."}]}},"/v1/deployments/{deploymentId}":{"get":{"operationId":"getV1DeploymentsByDeploymentId","summary":"Get deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a deployment by ID, including its current status derived from the underlying VM state.","responses":{"200":{"description":"Deployment retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"serviceId":{"type":"string"},"foundryVersionId":{"type":"string"},"status":{"type":"string"},"previewDomain":{"type":["string","null"]},"envVars":{"type":"object","additionalProperties":{"type":"string","description":"Always \"[redacted]\". Compute version inspection endpoints expose env var names only; values are never returned.","example":"[redacted]"},"description":"Environment variable names present on this compute version. Values are always redacted as \"[redacted]\" and must not be treated as deployed secret values."},"portMapping":{"type":"object","properties":{"http":{"type":"number"}}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","serviceId","foundryVersionId","status","previewDomain","createdAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"delete":{"operationId":"deleteV1DeploymentsByDeploymentId","summary":"Delete deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPermanently deletes the deployment, its metadata, and any associated VM. The deployment must be stopped or in the `new` state before it can be deleted.","responses":{"204":{"description":"Deployment deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment must be stopped before it can be deleted, or a hostname may still point to it and could not be moved to the live deployment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/deployments/{deploymentId}/start":{"post":{"operationId":"postV1DeploymentsByDeploymentIdStart","summary":"Start deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM creation and startup for the deployment. The artifact must be uploaded before calling this endpoint. Returns a preview domain that becomes reachable once the VM is running. Poll the status endpoint until `running` is reached.","responses":{"200":{"description":"Start request accepted. The preview domain is returned immediately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previewDomain":{"type":"string"}},"required":["previewDomain"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment is in a state that does not allow starting (e.g. artifact not uploaded, or already running).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or Compute resource limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/deployments/{deploymentId}/stop":{"post":{"operationId":"postV1DeploymentsByDeploymentIdStop","summary":"Stop deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM shutdown for the deployment. The deployment record and metadata are retained. Poll the status endpoint until `stopped` is reached.","responses":{"204":{"description":"Stop request accepted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment must be running or provisioning to be stopped, or a hostname may still point to it and could not be moved to the live deployment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/deployments/{deploymentId}/logs":{"get":{"operationId":"getV1DeploymentsByDeploymentIdLogs","summary":"Get deployment logs","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns log output for the specified deployment. Each record is a JSON object with `type: \"log\"` (log text + byte metadata) or `type: \"terminal\"` (end-of-page signal with a resume cursor). A plain GET responds with newline-delimited JSON (`application/x-ndjson`): it drains the requested window (`tail`, `from_start`, or `cursor`), ends with a terminal record carrying the cursor for the next page, and closes. Send an `Upgrade: websocket` header to follow the log live instead; a live segment ends after 10 minutes with the same terminal/cursor mechanism.","responses":{"101":{"description":"WebSocket connection established (requests with an `Upgrade: websocket` header). Each message is a JSON object discriminated by `type`."},"200":{"description":"One page of deployment logs (newline-delimited JSON; one record per line, ending with a terminal record).","content":{"application/x-ndjson":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"log"},"text":{"type":"string"},"byteStart":{"type":"integer"},"byteEnd":{"type":"integer"}},"required":["type","text","byteStart","byteEnd"]},{"type":"object","properties":{"type":{"type":"string","const":"terminal"},"kind":{"type":"string","enum":["end","error"]},"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"cursor":{"type":["string","null"]},"details":{"type":"object","additionalProperties":{}}},"required":["type","kind","code","message","retryable","cursor"]}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"tail","schema":{"type":"integer","minimum":1,"maximum":10000}},{"in":"query","name":"from_start","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$"}}]}},"/v1/projects":{"get":{"operationId":"getV1Projects","summary":"Get list of projects","description":"Returns the list of projects the token has access to.","tags":["Projects"],"responses":{"200":{"description":"Returns the list of projects.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"logicalId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","logicalId","createdAt","defaultRegion","workspace"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"logicalId","schema":{"type":"string"}}]},"post":{"operationId":"postV1Projects","summary":"Create project with a postgres database","description":"Creates a new project with a postgres database.","tags":["Projects"],"responses":{"201":{"description":"New project created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"logicalId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"database":{"type":["object","null"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["provisioning","ready"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]},"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString"]},"deprecated":true,"description":"Deprecated: use `connections[]` instead."},"connectionString":{"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct.connectionString` or `connections[].endpoints.pooled.connectionString`.","type":["string","null"]},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct` instead."}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","region","source","branchId","logicalId","apiKeys","connectionString","directConnection"]}},"required":["id","type","url","name","logicalId","createdAt","defaultRegion","workspace","database"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The workspace has reached its plan's database limit (`quota-exceeded`), or a project with the same `logicalId` already exists in the workspace (`client-error`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["quota-exceeded","client-error"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"createDatabase":{"default":true,"type":"boolean"},"name":{"type":"string","minLength":1},"region":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"]},"logicalId":{"type":"string","pattern":"^[a-z0-9][-_a-z0-9]*$"},"workspaceId":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}}}}}}},"/v1/projects/{id}":{"delete":{"operationId":"deleteV1ProjectsById","summary":"Delete project","description":"Deletes the project with the given ID.","tags":["Projects"],"responses":{"204":{"description":"Project deleted."},"400":{"description":"Project cannot be deleted due to existing dependencies.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the specified ID was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"get":{"operationId":"getV1ProjectsById","summary":"Get project","description":"Returns the project with the given ID.","tags":["Projects"],"responses":{"200":{"description":"Project retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"logicalId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","logicalId","createdAt","defaultRegion","workspace"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1ProjectsById","summary":"Update project","description":"Updates the project with the given ID.","tags":["Projects"],"responses":{"200":{"description":"Project updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"logicalId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","logicalId","createdAt","defaultRegion","workspace"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"settings":{"type":"object","additionalProperties":{}}}}}}}}},"/v1/projects/{id}/transfer":{"post":{"operationId":"postV1ProjectsByIdTransfer","summary":"Transfer project","description":"Transfer the project with the given ID to the new owner's workspace","tags":["Projects"],"responses":{"204":{"description":"Project transferred"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The project cannot be transferred in its current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recipientAccessToken":{"type":"string"}},"required":["recipientAccessToken"]}}}}}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/lease":{"post":{"operationId":"postV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateLease","summary":"Acquire Alchemy deploy lease","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nAcquires the deploy lease for a (branch, stack, stage). An expired lease is replaced atomically; a live lease fails fast with 409 naming the current holder — there is no queueing. Every Alchemy state operation requires a live deploy lease.","responses":{"201":{"description":"Acquired the deploy lease.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"leaseId":{"type":"string","description":"Capability token for the deploy lease. Send it in the Alchemy-State-Lease-Id header with every state operation; do not log it."},"expiresAt":{"type":"string","description":"Lease expiry as an ISO-8601 timestamp."}},"required":["leaseId","expiresAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deploy lease is held by another deploy.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stack":{"type":"string","minLength":1,"maxLength":200,"description":"Alchemy stack name (opaque wire value)."},"stage":{"type":"string","minLength":1,"maxLength":200,"description":"Alchemy stage name (opaque wire value)."},"ttlSeconds":{"description":"Requested lease TTL in seconds. Default 60, clamped to [30, 300].","type":"integer","exclusiveMinimum":0},"holderDescription":{"description":"Free-form description of the acquiring deploy, echoed in the contention error so a blocked deploy can name who holds the lease.","type":"string","minLength":1,"maxLength":500}},"required":["stack","stage"]}}}}},"patch":{"operationId":"patchV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateLease","summary":"Heartbeat Alchemy deploy lease","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nExtends the unexpired deploy lease addressed by the Alchemy-State-Lease-Id header from now. A missing, replaced, or expired lease returns 404 — the lost-lease signal; an expired lease can never be revived.","responses":{"200":{"description":"Extended the deploy lease.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"leaseId":{"type":"string","description":"Capability token for the deploy lease. Send it in the Alchemy-State-Lease-Id header with every state operation; do not log it."},"expiresAt":{"type":"string","description":"Lease expiry as an ISO-8601 timestamp."}},"required":["leaseId","expiresAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project, branch, or unexpired lease not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ttlSeconds":{"description":"Requested lease TTL in seconds. Default 60, clamped to [30, 300].","type":"integer","exclusiveMinimum":0}}}}}}},"delete":{"operationId":"deleteV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateLease","summary":"Release Alchemy deploy lease","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReleases the deploy lease addressed by the Alchemy-State-Lease-Id header on clean deploy exit. A missing, replaced, or expired lease returns 404 — a lost lease at release time is surfaced, not idempotently swallowed.","responses":{"204":{"description":"Released the deploy lease."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project, branch, or unexpired lease not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/version":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateVersion","summary":"Alchemy state store version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUnauthenticated contract-version probe served verbatim from the pinned alchemy HttpStateApi contract. Returns the constant only and never inspects the addressed project or branch.","responses":{"200":{"description":"The state-store contract version.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number"}},"required":["version"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string"},"in":"path","name":"branchId","required":true}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacks","summary":"List Alchemy stacks","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the distinct stack names with state or output rows on the branch. Requires no deploy lease: the stock client's auth probe (checkHttpStateStoreAuth) calls this endpoint bare, and it exposes stack names only.","responses":{"200":{"description":"Stack names, sorted.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStages","summary":"List Alchemy stages","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the distinct stage names with state or output rows for the stack. Accepts a live deploy lease on any stage of the stack.","responses":{"200":{"description":"Stage names, sorted.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/resources":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResources","summary":"List Alchemy resources","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the resource FQNs stored for the stage, ordered by FQN.","responses":{"200":{"description":"Resource FQNs, ordered.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/resources/{fqn}":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResourcesByFqn","summary":"Get Alchemy resource state","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the stored resource state, or a JSON null body when absent (the stock client maps null to undefined).","responses":{"200":{"description":"The stored value, or null when absent.","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"fqn","schema":{"type":"string","minLength":1},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]},"put":{"operationId":"putV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResourcesByFqn","summary":"Set Alchemy resource state","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nStores the resource state encrypted at rest and echoes the stored value.","responses":{"200":{"description":"Echo of the stored value.","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"fqn","schema":{"type":"string","minLength":1},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}],"requestBody":{"content":{"application/json":{"schema":{}}}}},"delete":{"operationId":"deleteV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResourcesByFqn","summary":"Delete Alchemy resource state","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes the resource state row. Idempotent: deleting an absent row also returns 204.","responses":{"204":{"description":"Deleted (or already absent)."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"fqn","schema":{"type":"string","minLength":1},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/replaced-resources":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageReplaced-resources","summary":"List replaced Alchemy resources","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the decrypted resource states of the stage whose status is \"replaced\".","responses":{"200":{"description":"Replaced resource states.","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/output":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageOutput","summary":"Get Alchemy stack output","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the stored stack output for the stage, or a JSON null body when absent (the stock client maps null to undefined).","responses":{"200":{"description":"The stored output, or null when absent.","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]},"put":{"operationId":"putV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageOutput","summary":"Set Alchemy stack output","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nOverwrites the stack output for the stage, encrypted at rest, and echoes the stored value.","responses":{"200":{"description":"Echo of the stored value.","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"path","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}],"requestBody":{"content":{"application/json":{"schema":{}}}}}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}":{"delete":{"operationId":"deleteV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStack","summary":"Delete Alchemy stack state","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes every resource-state and output row of the stack, or only the given stage's rows when the stage query parameter is set. Requires a live deploy lease on the affected stage; without a stage it additionally requires that no other stage of the stack holds a live lease, so one stage's deploy can never delete state another stage's deploy is using. Idempotent.","responses":{"204":{"description":"Deleted (or already absent)."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"No live deploy lease held for this stack and stage.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"stack","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"stage","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"header","name":"alchemy-state-lease-id","schema":{"type":"string","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true,"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation."}]}},"/v1/projects/{projectId}/branches/{branchId}/application-topology":{"put":{"operationId":"putV1ProjectsByProjectIdBranchesByBranchIdApplication-topology","summary":"Replace branch topology","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nAtomically replaces the entire topology for a branch. Composer calls this after Load, before the apply. On error, Composer warns and continues — the previous topology is preserved.","responses":{"200":{"description":"ApplicationTopology replaced.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"parentLogicalId":{"type":["string","null"],"minLength":1},"kind":{"type":"string","enum":["module","service","resource"]},"type":{"type":"string"}},"required":["logicalId","parentLogicalId","kind"]}},"ports":{"type":"array","items":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1},"contractKind":{"type":"string"},"contractHash":{"type":"string"}},"required":["logicalId","direction","name"]}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1}},"required":["logicalId","direction","name"]},"to":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1}},"required":["logicalId","direction","name"]},"family":{"type":"string","enum":["communication","data"]},"style":{"type":"string"}},"required":["from","to","family"]}},"contentHash":{"type":"string"},"writtenAt":{"type":"string","format":"date-time"}},"required":["nodes","ports","edges"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid topology shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentHash":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"parentLogicalId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"kind":{"type":"string","enum":["module","service","resource"]},"type":{"type":"string"}},"required":["logicalId","parentLogicalId","kind"]}},"ports":{"type":"array","items":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1},"contractKind":{"type":"string"},"contractHash":{"type":"string"}},"required":["logicalId","direction","name"]}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1}},"required":["logicalId","direction","name"]},"to":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1}},"required":["logicalId","direction","name"]},"family":{"type":"string","enum":["communication","data"]},"style":{"type":"string"}},"required":["from","to","family"]}}},"required":["nodes","ports","edges"]}}}}},"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdApplication-topology","summary":"Get branch topology","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the stored topology graph for the branch — the same shape Composer submitted. Nodes, ports, and edges are returned in deterministic order.","responses":{"200":{"description":"The branch topology.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"parentLogicalId":{"type":["string","null"],"minLength":1},"kind":{"type":"string","enum":["module","service","resource"]},"type":{"type":"string"}},"required":["logicalId","parentLogicalId","kind"]}},"ports":{"type":"array","items":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1},"contractKind":{"type":"string"},"contractHash":{"type":"string"}},"required":["logicalId","direction","name"]}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1}},"required":["logicalId","direction","name"]},"to":{"type":"object","properties":{"logicalId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["in","out"]},"name":{"type":"string","minLength":1}},"required":["logicalId","direction","name"]},"family":{"type":"string","enum":["communication","data"]},"style":{"type":"string"}},"required":["from","to","family"]}},"contentHash":{"type":"string"},"writtenAt":{"type":"string","format":"date-time"}},"required":["nodes","ports","edges"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/projects/{projectId}/branches/{branchId}/urls":{"get":{"operationId":"getV1ProjectsByProjectIdBranchesByBranchIdUrls","summary":"List a Branch's RoutingUrls","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the hostnames of every service on the Branch, with their conditions and the DNS records still to publish. Filter by `logicalId` to find the RoutingUrl a deploy tool declared. Reads stored state only; it does not call DNS or Foundry.","responses":{"200":{"description":"The Branch's RoutingUrls.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(url_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"routingUrl"},"branchId":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Null once the service is deleted."},"hostname":{"type":"string"},"logicalId":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active"],"description":"`pending` until every condition is met, then `active`. An active RoutingUrl stays active when its service's live deployment changes. It goes back to `pending` when its hostname changes, its service is deleted, or no covering domain ownership keeps its ownership met. It records that the hostname went live; `state` says what it does now."},"state":{"type":"string","enum":["no_domain_ownership","not_verified","no_service","no_live_deployment","update_failed","in_use_elsewhere","waiting_for_dns","provisioning_certificate","certificate_failed","updating","active"],"description":"What the hostname is doing now, in one value, worked out on read from what is stored. No part of the platform acts on it: it is for choosing what to show and what to wait for. It can differ from `status`, which records that the hostname once went live. To wait for the hostname to serve, wait for `active`. The first that applies is the state:\n- `no_domain_ownership`: no domain ownership in the workspace covers the hostname, so nothing looks up a TXT record for it. Create one with `PATCH /v1/urls/{id}` and `createDomainOwnership: true`, or with `POST /v1/workspaces/{workspaceId}/domain-ownerships`. `POST /v1/urls/{id}/check` creates none.\n- `not_verified`: the hostname's ownership is not met. Publish the TXT record in `records`, then call `POST /v1/urls/{id}/check`.\n- `no_service`: the hostname's service is deleted.\n- `no_live_deployment`: the service has no live deployment. Deploy the service, or promote one of its deployments.\n- `update_failed`: the last attempt to bring the hostname up to date failed. `customDomainSyncError` says why, and it is retried.\n- `in_use_elsewhere`: another RoutingUrl, which can be on the same service, holds this hostname. `heldBy` names its service when you can access its workspace, and says \"held by another workspace\" otherwise. This RoutingUrl takes the hostname over with no action once the other one gives it up.\n- `waiting_for_dns`: the hostname's DNS does not point where it should. Publish the CNAME record in `records`, then call `POST /v1/urls/{id}/check`.\n- `provisioning_certificate`: the hostname's certificate is being issued.\n- `certificate_failed`: the certificate could not be issued. `customDomain.failureReason` says why; `POST /v1/urls/{id}/check` retries it.\n- `updating`: the hostname is being brought up to date, for example onto the service's new live deployment.\n- `active`: the hostname serves the service's live deployment with an active certificate."},"conditions":{"type":"object","properties":{"ownershipVerified":{"type":"string","enum":["met","unmet","unknown"]},"servicePresent":{"type":"string","enum":["met","unmet","unknown"]},"liveDeployment":{"type":"string","enum":["met","unmet","unknown"]},"dnsPointsAtSwitchboard":{"type":"string","enum":["met","unmet","unknown"]},"customDomainBound":{"type":"string","enum":["met","unmet","unknown"]},"certificateActive":{"type":"string","enum":["met","unmet","unknown"]}},"required":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"],"description":"What the hostname needs to serve, in the order a user meets them. `unknown` means DNS or Foundry has not answered yet."},"firstUnmetCondition":{"type":["string","null"],"enum":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"]},"ownershipExpiry":{"type":["object","null"],"properties":{"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt"],"description":"Set while only an `expiring` domain ownership keeps this active RoutingUrl serving. The hostname stops serving after `expiresAt` unless the TXT record in `records` is published."},"records":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","enum":["ownershipVerified","dnsPointsAtSwitchboard"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"}},"required":["condition","type","name","value","ttl"]},"description":"The DNS records still to publish. The TXT record is listed while ownership is not met, and while only an `expiring` domain ownership keeps it met. While ownership is not met it is the record of the domain ownership for the exact hostname, otherwise that of a wildcard domain ownership that covers it, otherwise the exact hostname's. In `no_domain_ownership` it is the record a domain ownership for the exact hostname would use; publishing it has no effect until that domain ownership exists."},"heldBy":{"type":["object","null"],"properties":{"workspaceId":{"type":["string","null"],"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"message":{"type":["string","null"]}},"required":["workspaceId","projectId","serviceId","message"],"description":"Set when another RoutingUrl holds the hostname. Its ids are shown only to a caller with access to its workspace; otherwise `message` is \"held by another workspace\"."},"customDomain":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":["string","null"],"enum":["pending","provisioning","active","failed"],"description":"Foundry's status of the custom domain. Null when Foundry's last answer is unknown."},"failureReason":{"type":["string","null"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"certificateRetryRequestedAt":{"type":["string","null"],"format":"date-time"},"certificateIssuanceStuck":{"type":"boolean","description":"True when the certificate is still provisioning after the custom domain was registered again."}},"required":["id","status","failureReason","certExpiresAt","lastSeenAt","certificateRetryRequestedAt","certificateIssuanceStuck"],"description":"The Foundry custom domain the RoutingUrl holds, if any."},"customDomainSyncError":{"description":"The error from the last sync with Foundry, also when it left the RoutingUrl without a custom domain. Null when that sync succeeded.","type":["string","null"]},"switchboardDns":{"type":["object","null"],"properties":{"accepted":{"type":"boolean"},"detail":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["accepted","detail","lastSeenAt"],"description":"Foundry's last answer about the hostname's DNS. Null before Foundry has answered."},"setupUrl":{"type":["string","null"],"format":"uri","description":"The Console page that shows what to do next, while the RoutingUrl is pending and has a service."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","branchId","serviceId","hostname","logicalId","status","state","conditions","firstUnmetCondition","ownershipExpiry","records","heldBy","customDomain","customDomainSyncError","switchboardDns","setupUrl","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","const":false},"nextCursor":{"type":"null","const":null}},"required":["hasMore","nextCursor"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"logicalId","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."}]}},"/v1/projects/{projectId}/databases":{"get":{"operationId":"getV1ProjectsByProjectIdDatabases","summary":"Get list of databases","description":"Returns databases for the given project.","tags":["Databases"],"responses":{"200":{"description":"Returned the databases for the given project ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"}]},"post":{"operationId":"postV1ProjectsByProjectIdDatabases","summary":"Create database","description":"Creates a new database for the given project.","tags":["Databases"],"responses":{"201":{"description":"Created a new database for the project.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["provisioning","ready"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"logicalId":{"type":["string","null"]},"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString"]},"deprecated":true,"description":"Deprecated: use `connections[]` instead."},"connectionString":{"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct.connectionString` or `connections[].endpoints.pooled.connectionString`.","type":["string","null"]},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct` instead."}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","logicalId","apiKeys","connectionString","directConnection"]}},"required":["data"]}}}},"400":{"description":"The request is invalid due to missing or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The actor or agent permission policy does not allow database creation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The workspace has reached its plan's database limit (`quota-exceeded`), or the database conflicts with another resource (`client-error`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["quota-exceeded","client-error"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"region":{"description":"Use \"inherit\" to use the project's default region (falls back to the default database's region for projects without one).","default":"us-east-1","type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1","inherit"]},"name":{"type":"string","minLength":1},"isDefault":{"default":false,"type":"boolean"},"fromDatabase":{"deprecated":true,"description":"Deprecated: use `source` instead.","type":"object","properties":{"id":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"backupId":{"type":"string"}},"required":["id"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"description":"ID of the database the backup belongs to","type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"description":"ID of the database to clone from","type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["type","databaseId"]}]}}}}}}}},"/v1/environment-variables":{"post":{"operationId":"postV1Environment-variables","summary":"Create an environment variable","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new environment variable in a project's `production` or `preview` environment, or a preview branch override when `branchId` is supplied. Returns 409 if a variable with the same key already exists in that scope — use PATCH to replace its value. Values are stored encrypted and are not returned by subsequent reads.","responses":{"201":{"description":"Variable created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A variable with this key already exists in this environment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while processing the encrypted variable (e.g., a master-key rotation or deploy issue prevents the project's wrapped DEK from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Z_][A-Z0-9_]*$"},"value":{"type":"string","minLength":1}},"required":["projectId","class","key","value"],"additionalProperties":false}}}}},"get":{"operationId":"getV1Environment-variables","summary":"List environment variables","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a paginated list of environment variables. All filters are optional; combine `projectId`, `class`, and `key` to look up a specific variable by name.","responses":{"200":{"description":"Returned the page of environment variables.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"class","schema":{"type":"string","enum":["production","preview"]}},{"in":"query","name":"key","schema":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Z_][A-Z0-9_]*$"}},{"in":"query","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}]}},"/v1/environment-variables/{envVarId}":{"patch":{"operationId":"patchV1Environment-variablesByEnvVarId","summary":"Update an environment variable's value","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReplaces the value of an existing environment variable. Only the value is mutable — the project, environment, key, and branch are fixed at create-time.","responses":{"200":{"description":"Variable updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Variable not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while processing the encrypted variable (e.g., a master-key rotation or deploy issue prevents the project's wrapped DEK from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"envVarId","schema":{"type":"string","pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"],"additionalProperties":false}}}}},"get":{"operationId":"getV1Environment-variablesByEnvVarId","summary":"Get an environment variable","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a single environment variable's metadata. The value is not returned.","responses":{"200":{"description":"Returned the environment variable.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Variable not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"envVarId","schema":{"type":"string","pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"delete":{"operationId":"deleteV1Environment-variablesByEnvVarId","summary":"Delete an environment variable","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRemoves an environment variable. A second delete of the same variable returns 404.","responses":{"204":{"description":"Variable deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Variable not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"envVarId","schema":{"type":"string","pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/integrations":{"get":{"operationId":"getV1Integrations","summary":"Get list of integrations","description":"Returns integrations filtered by workspace ID.","tags":["Integrations"],"responses":{"200":{"description":"Returned the integrations for the given workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"array","items":{"type":"string"}},"client":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt"]},"createdByUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"]}},"required":["id","url","createdAt","scopes","client","createdByUser"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/integrations/{id}":{"get":{"operationId":"getV1IntegrationsById","summary":"Get integration by ID","description":"Returns a single integration by its ID.","tags":["Integrations"],"responses":{"200":{"description":"Returned the integration.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"array","items":{"type":"string"}},"client":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt"]},"createdByUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"]}},"required":["id","url","createdAt","scopes","client","createdByUser"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Integration with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"delete":{"operationId":"deleteV1IntegrationsById","summary":"Delete integration","description":"Revokes the integration tokens by integration ID.","tags":["Integrations"],"responses":{"204":{"description":"Revoked the integration tokens."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Integration with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/me":{"get":{"operationId":"getV1Me","summary":"Get current authenticated principal","description":"Returns the user, workspace, and credential represented by the current token.","tags":["Misc"],"responses":{"200":{"description":"Current authenticated principal retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^(usr_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":["string","null"]}},"required":["id","email","name"]},"workspace":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"name":{"type":"string"}},"required":["id","name"]},"credential":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","service_token","management_token","agent_token"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"]}},"required":["user","workspace","credential"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/workspaces/{workspaceId}/domain-ownerships/verification":{"get":{"operationId":"getV1WorkspacesByWorkspaceIdDomain-ownershipsVerification","summary":"Get the verification record for a domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the TXT record the workspace must publish to prove it owns the domain. Looks nothing up and stores nothing. The record's value is the same for every domain in the workspace.","responses":{"200":{"description":"The verification record to publish.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace not found, or the caller is not a member of it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The domain is not a hostname or a wildcard of the form `*.example.com`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"domain","schema":{"type":"string"},"required":true,"description":"An exact hostname such as `shop.example.com`, or a wildcard such as `*.example.com`."}]}},"/v1/workspaces/{workspaceId}/domain-ownerships":{"post":{"operationId":"postV1WorkspacesByWorkspaceIdDomain-ownerships","summary":"Create a domain ownership","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords that the workspace intends to own the domain, looks up its verification record, and returns the domain ownership, verified when the record carries the workspace's value and unverified otherwise. Publish the record in `verification`, then verify the domain ownership to complete it. When DNS gives no answer, the domain ownership is unverified, its DNS fields are empty, and the platform checks again later. The lookup also updates the other domain ownerships whose verification record has the same name, in every workspace. A domain the workspace already holds is checked again and returned.","responses":{"200":{"description":"The workspace already holds a domain ownership for the domain.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(do_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"domainOwnership"},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"The workspace the domain ownership belongs to."},"domain":{"type":"string"},"verification":{"type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]},"status":{"type":"string","enum":["unverified","verified","expiring"],"description":"`verified` when the last answer from DNS carried the workspace's value. `expiring` when a verified domain ownership's record was no longer found: hostnames already serving under it keep serving, and it does not let a new or changed hostname serve. Publishing the record makes it `verified` again. The first lookup at or after `expiresAt` that still finds no value makes it `unverified`. `unverified` otherwise, including when a lookup found another workspace's value and not this workspace's. A lookup that gets no answer changes no status."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The deadline to publish the record, if the status is `expiring`. The status becomes `unverified` at the first lookup at or after this time that still finds no value, so it can stay `expiring` for a while after it. Null otherwise."},"verificationRecordLastSeenAt":{"type":["string","null"],"format":"date-time","description":"When DNS last answered the lookup of the verification record. Null before the first answer, and after a lookup that got no answer while the domain ownership was not verified. A verified domain ownership keeps this answer when a lookup gets no answer."},"verificationRecordPresent":{"description":"Whether that answer carried the workspace's value. Null when there is no answer.","type":["boolean","null"]},"verificationRecordSyncError":{"description":"The error from the last sync of the verification record, such as `DNS unavailable`. Null when that sync succeeded. For display only.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","workspaceId","domain","verification","status","expiresAt","verificationRecordLastSeenAt","verificationRecordPresent","verificationRecordSyncError","createdAt"]}},"required":["data"]}}}},"201":{"description":"The domain ownership was created, verified or unverified.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(do_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"domainOwnership"},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"The workspace the domain ownership belongs to."},"domain":{"type":"string"},"verification":{"type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]},"status":{"type":"string","enum":["unverified","verified","expiring"],"description":"`verified` when the last answer from DNS carried the workspace's value. `expiring` when a verified domain ownership's record was no longer found: hostnames already serving under it keep serving, and it does not let a new or changed hostname serve. Publishing the record makes it `verified` again. The first lookup at or after `expiresAt` that still finds no value makes it `unverified`. `unverified` otherwise, including when a lookup found another workspace's value and not this workspace's. A lookup that gets no answer changes no status."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The deadline to publish the record, if the status is `expiring`. The status becomes `unverified` at the first lookup at or after this time that still finds no value, so it can stay `expiring` for a while after it. Null otherwise."},"verificationRecordLastSeenAt":{"type":["string","null"],"format":"date-time","description":"When DNS last answered the lookup of the verification record. Null before the first answer, and after a lookup that got no answer while the domain ownership was not verified. A verified domain ownership keeps this answer when a lookup gets no answer."},"verificationRecordPresent":{"description":"Whether that answer carried the workspace's value. Null when there is no answer.","type":["boolean","null"]},"verificationRecordSyncError":{"description":"The error from the last sync of the verification record, such as `DNS unavailable`. Null when that sync succeeded. For display only.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","workspaceId","domain","verification","status","expiresAt","verificationRecordLastSeenAt","verificationRecordPresent","verificationRecordSyncError","createdAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace not found, or the caller is not a member of it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The domain is not a hostname or a wildcard of the form `*.example.com`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"The domain ownership was saved with its status, but the platform could not queue the work that updates the custom domains it covers. Retry the request; it returns the domain ownership with 200.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"An exact hostname such as `shop.example.com`, or a wildcard such as `*.example.com`."}},"required":["domain"]}}}}},"get":{"operationId":"getV1WorkspacesByWorkspaceIdDomain-ownerships","summary":"List domain ownerships","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the workspace's domain ownerships in every status, ordered by id.","responses":{"200":{"description":"The workspace's domain ownerships.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(do_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"domainOwnership"},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"The workspace the domain ownership belongs to."},"domain":{"type":"string"},"verification":{"type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]},"status":{"type":"string","enum":["unverified","verified","expiring"],"description":"`verified` when the last answer from DNS carried the workspace's value. `expiring` when a verified domain ownership's record was no longer found: hostnames already serving under it keep serving, and it does not let a new or changed hostname serve. Publishing the record makes it `verified` again. The first lookup at or after `expiresAt` that still finds no value makes it `unverified`. `unverified` otherwise, including when a lookup found another workspace's value and not this workspace's. A lookup that gets no answer changes no status."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"The deadline to publish the record, if the status is `expiring`. The status becomes `unverified` at the first lookup at or after this time that still finds no value, so it can stay `expiring` for a while after it. Null otherwise."},"verificationRecordLastSeenAt":{"type":["string","null"],"format":"date-time","description":"When DNS last answered the lookup of the verification record. Null before the first answer, and after a lookup that got no answer while the domain ownership was not verified. A verified domain ownership keeps this answer when a lookup gets no answer."},"verificationRecordPresent":{"description":"Whether that answer carried the workspace's value. Null when there is no answer.","type":["boolean","null"]},"verificationRecordSyncError":{"description":"The error from the last sync of the verification record, such as `DNS unavailable`. Null when that sync succeeded. For display only.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","workspaceId","domain","verification","status","expiresAt","verificationRecordLastSeenAt","verificationRecordPresent","verificationRecordSyncError","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace not found, or the caller is not a member of it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1-100"},{"in":"query","name":"domain","schema":{"type":"string"},"description":"Return only the domain ownership of this domain."}]}},"/v1/workspaces/{workspaceId}/integrations":{"get":{"operationId":"getV1WorkspacesByWorkspaceIdIntegrations","summary":"Get list of integrations","description":"Returns integrations for the given workspace.","tags":["Integrations"],"responses":{"200":{"description":"Returned the integrations for the given workspace ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"array","items":{"type":"string"}},"client":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt"]},"createdByUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"]}},"required":["id","url","createdAt","scopes","client","createdByUser"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"}]}},"/v1/workspaces/{workspaceId}/integrations/{clientId}":{"delete":{"operationId":"deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId","summary":"Revoke integration tokens","description":"Revokes the integration tokens with the given client ID.","tags":["Integrations"],"responses":{"204":{"description":"Revoked the integration tokens."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Integration with the given client ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"clientId","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/workspaces/{workspaceId}/service-tokens":{"get":{"operationId":"getV1WorkspacesByWorkspaceIdService-tokens","summary":"List service tokens","description":"Returns the service tokens for the given workspace, newest first.","tags":["Service Tokens"],"responses":{"200":{"description":"Returns the list of service tokens. Empty when the workspace does not exist or the caller is not a member of it.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(itgr_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"serviceToken"},"name":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"valueHint":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"}},"required":["id","type","name","scope","projectId","valueHint","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1-100"}]},"post":{"operationId":"postV1WorkspacesByWorkspaceIdService-tokens","summary":"Create service token","description":"Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately.","tags":["Service Tokens"],"responses":{"201":{"description":"Created a new service token. The token value is returned once in the response body.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(itgr_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"serviceToken"},"name":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"valueHint":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"value":{"type":"string"}},"required":["id","type","name","scope","projectId","valueHint","createdAt","value"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"description":"Access only this project. Omit or pass null for Full Workspace access.","anyOf":[{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},{"type":"null"}]},"expiresAt":{"description":"Expiry in the future. Defaults to 90 days; null opts out of expiry.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Display name for the service token."}},"required":["name"]}}}}}},"/v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId}":{"delete":{"operationId":"deleteV1WorkspacesByWorkspaceIdService-tokensByServiceTokenId","summary":"Delete service token","description":"Revokes the service token with the given ID by deleting it.","tags":["Service Tokens"],"responses":{"204":{"description":"Deleted the service token successfully."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace not found, or the service token does not exist in it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"serviceTokenId","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/auth/github-actions/token":{"post":{"operationId":"postV1AuthGithub-actionsToken","summary":"Exchange a GitHub Actions OIDC token for a project-scoped service token","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nVerifies the GitHub Actions OIDC token and mints a short-lived project-scoped service token. The caller must request the token with audience `prisma-cloud`. Any verification failure returns a generic 401 — the response never reveals whether a repository is connected.","security":[],"responses":{"201":{"description":"Minted a short-lived project-scoped service token.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Prefixed integration token ID (`itgr_` prefix)."},"type":{"type":"string","const":"serviceToken"},"value":{"type":"string","description":"The minted integration token. Returned once — copy it immediately."},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 instant after which the token is invalid."},"workspaceId":{"type":"string","description":"Prefixed workspace ID the token is scoped to."}},"required":["id","type","value","expiresAt","workspaceId"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing, expired, or invalid OIDC token, or no active repository link.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"},"errorDescription":{"type":"string"}},"required":["error","errorDescription"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"description":"The GitHub Actions OIDC token with audience `prisma-cloud`."},"expiresInSeconds":{"default":1800,"description":"Requested token lifetime in seconds. Defaults to 1800 (30 min); capped at 3600 (60 min).","type":"integer","minimum":60,"maximum":3600}},"required":["token"]}}}}}},"/v1/regions":{"get":{"operationId":"getV1Regions","summary":"Get all regions","description":"Returns all available regions across products. Optionally filter by product.","tags":["Regions"],"responses":{"200":{"description":"Returns all available regions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"region"},"name":{"type":"string"},"product":{"type":"string","enum":["postgres","accelerate"]},"status":{"type":"string","enum":["available","unavailable"]}},"required":["id","type","name","product"]}}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"product","schema":{"type":"string","enum":["postgres","accelerate"]}}]}},"/v1/regions/postgres":{"get":{"operationId":"getV1RegionsPostgres","summary":"Get Prisma Postgres regions","description":"Returns all available regions for Prisma Postgres.","tags":["Misc"],"responses":{"200":{"description":"Returns all available regions for Prisma Postgres.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"region"},"name":{"type":"string"},"status":{"type":"string","enum":["available","unavailable"]}},"required":["id","type","name","status"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/regions/accelerate":{"get":{"operationId":"getV1RegionsAccelerate","summary":"Get Prisma Accelerate regions","description":"Returns all available regions for Prisma Accelerate.","tags":["Misc"],"responses":{"200":{"description":"Returns all available regions for Prisma Accelerate.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"region"},"name":{"type":"string"}},"required":["id","type","name"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/scm-installations":{"get":{"operationId":"getV1Scm-installations","summary":"List SCM installations for a workspace","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists active SCM installations connected to the given workspace.","responses":{"200":{"description":"SCM installations the caller can access in the workspace. May be empty.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(scminstall_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"scm-installation"},"url":{"type":"string","format":"uri"},"provider":{"type":"string","enum":["github"]},"installationId":{"type":"integer","description":"Numeric installation ID assigned by the SCM provider"},"accountId":{"type":"integer","description":"Numeric account ID assigned by the SCM provider"},"accountLogin":{"type":"string"},"accountType":{"type":"string","enum":["user","organization"]},"suspended":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","provider","installationId","accountId","accountLogin","accountType","suspended","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]},"hint":{"type":"string"}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"repository","schema":{"type":"string","pattern":"^[\\w.-]+\\/[\\w.-]+$"}}]}},"/v1/scm-installations/install-intents":{"post":{"operationId":"postV1Scm-installationsInstall-intents","summary":"Create an SCM App installation intent","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates an installation intent for the given workspace. If an existing installation can be proven to belong to the caller it is linked immediately (`alreadyLinked`); otherwise the response carries a URL the user opens to install the SCM app. Pass `repository` (owner/name) so an installation that already covers it but cannot be linked automatically is detected and explained in `hint`. Currently only `github` is supported.","responses":{"201":{"description":"Installation intent created. The `installUrl` is single-use and time-limited.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"install-intent"},"provider":{"type":"string","enum":["github"]},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"installUrl":{"type":"string","format":"uri"},"alreadyLinked":{"type":"boolean"},"accountLogin":{"type":"string"},"hint":{"type":"string"}},"required":["type","provider","workspaceId","installUrl"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Workspace integration tokens cannot create install intents; a user-authenticated request is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace not found or not accessible.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed workspaceId or unsupported provider).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["github"]},"workspaceId":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"repository":{"type":"string","pattern":"^[\\w.-]+\\/[\\w.-]+$"}},"required":["provider","workspaceId"]}}}}}},"/v1/scm-installations/{installationId}/repositories":{"get":{"operationId":"getV1Scm-installationsByInstallationIdRepositories","summary":"List repositories accessible to an SCM installation","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists repositories accessible to the given SCM installation.","responses":{"200":{"description":"Repositories accessible to the installation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Numeric repository ID assigned by the SCM provider"},"type":{"type":"string","const":"scm-repository"},"fullName":{"type":"string","description":"Full repository name, e.g. \"octocat/hello\""},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"}},"required":["id","type","fullName","defaultBranch","isPrivate"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Installation not found or not accessible.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The SCM provider rejected the repository listing request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"installationId","schema":{"type":"string","pattern":"^(scminstall_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination (opaque, returned from previous response)"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"description":"Maximum repositories to return (default and max 100)."}]}},"/v1/source-repositories":{"post":{"operationId":"postV1Source-repositories","summary":"Link a source repository to a project","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLinks a GitHub repository to a Prisma project via an existing SCM installation.","responses":{"201":{"description":"Source repository linked.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"source-repository"},"url":{"type":"string","format":"uri"},"repoId":{"type":"integer"},"provider":{"type":"string","enum":["github"]},"repoFullName":{"type":"string"},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"projectId":{"type":"string"},"installationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","repoId","provider","repoFullName","defaultBranch","isPrivate","status","projectId","installationId","createdAt","updatedAt"]},"hint":{"type":"string"}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"SCM installation is suspended, uninstalled, or actor lacks access.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or SCM installation not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Repository or project already linked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Repository not accessible to the installation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"provider":{"type":"string","const":"github"},"providerRepositoryId":{"type":"integer","exclusiveMinimum":0},"installationId":{"description":"Optional SCM installation ID to use for linking. When omitted, the API auto-picks the workspace's installation.","type":"string","pattern":"^(scminstall_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["projectId","provider","providerRepositoryId"]}}}}},"get":{"operationId":"getV1Source-repositories","summary":"List source repositories","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns source repositories linked to a project. Requires projectId query parameter.","responses":{"200":{"description":"Returned the list of source repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"source-repository"},"url":{"type":"string","format":"uri"},"repoId":{"type":"integer"},"provider":{"type":"string","enum":["github"]},"repoFullName":{"type":"string"},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"projectId":{"type":"string"},"installationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","repoId","provider","repoFullName","defaultBranch","isPrivate","status","projectId","installationId","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/source-repositories/{id}":{"delete":{"operationId":"deleteV1Source-repositoriesById","summary":"Disconnect a source repository","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDisconnects the source repository link. Existing branches and their attached resources are preserved.","responses":{"204":{"description":"Source repository disconnected."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Source repository not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(srcrepo_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"get":{"operationId":"getV1Source-repositoriesById","summary":"Get a source repository","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a single source repository link by ID.","responses":{"200":{"description":"Returned the source repository.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"source-repository"},"url":{"type":"string","format":"uri"},"repoId":{"type":"integer"},"provider":{"type":"string","enum":["github"]},"repoFullName":{"type":"string"},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"projectId":{"type":"string"},"installationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","repoId","provider","repoFullName","defaultBranch","isPrivate","status","projectId","installationId","createdAt","updatedAt"]},"hint":{"type":"string"}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Source repository not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(srcrepo_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/urls/{id}":{"get":{"operationId":"getV1UrlsById","summary":"Get a RoutingUrl","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a hostname of a service with its conditions and the DNS records still to publish. Reads stored state only; it does not call DNS or Foundry.","responses":{"200":{"description":"The RoutingUrl.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(url_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"routingUrl"},"branchId":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Null once the service is deleted."},"hostname":{"type":"string"},"logicalId":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active"],"description":"`pending` until every condition is met, then `active`. An active RoutingUrl stays active when its service's live deployment changes. It goes back to `pending` when its hostname changes, its service is deleted, or no covering domain ownership keeps its ownership met. It records that the hostname went live; `state` says what it does now."},"state":{"type":"string","enum":["no_domain_ownership","not_verified","no_service","no_live_deployment","update_failed","in_use_elsewhere","waiting_for_dns","provisioning_certificate","certificate_failed","updating","active"],"description":"What the hostname is doing now, in one value, worked out on read from what is stored. No part of the platform acts on it: it is for choosing what to show and what to wait for. It can differ from `status`, which records that the hostname once went live. To wait for the hostname to serve, wait for `active`. The first that applies is the state:\n- `no_domain_ownership`: no domain ownership in the workspace covers the hostname, so nothing looks up a TXT record for it. Create one with `PATCH /v1/urls/{id}` and `createDomainOwnership: true`, or with `POST /v1/workspaces/{workspaceId}/domain-ownerships`. `POST /v1/urls/{id}/check` creates none.\n- `not_verified`: the hostname's ownership is not met. Publish the TXT record in `records`, then call `POST /v1/urls/{id}/check`.\n- `no_service`: the hostname's service is deleted.\n- `no_live_deployment`: the service has no live deployment. Deploy the service, or promote one of its deployments.\n- `update_failed`: the last attempt to bring the hostname up to date failed. `customDomainSyncError` says why, and it is retried.\n- `in_use_elsewhere`: another RoutingUrl, which can be on the same service, holds this hostname. `heldBy` names its service when you can access its workspace, and says \"held by another workspace\" otherwise. This RoutingUrl takes the hostname over with no action once the other one gives it up.\n- `waiting_for_dns`: the hostname's DNS does not point where it should. Publish the CNAME record in `records`, then call `POST /v1/urls/{id}/check`.\n- `provisioning_certificate`: the hostname's certificate is being issued.\n- `certificate_failed`: the certificate could not be issued. `customDomain.failureReason` says why; `POST /v1/urls/{id}/check` retries it.\n- `updating`: the hostname is being brought up to date, for example onto the service's new live deployment.\n- `active`: the hostname serves the service's live deployment with an active certificate."},"conditions":{"type":"object","properties":{"ownershipVerified":{"type":"string","enum":["met","unmet","unknown"]},"servicePresent":{"type":"string","enum":["met","unmet","unknown"]},"liveDeployment":{"type":"string","enum":["met","unmet","unknown"]},"dnsPointsAtSwitchboard":{"type":"string","enum":["met","unmet","unknown"]},"customDomainBound":{"type":"string","enum":["met","unmet","unknown"]},"certificateActive":{"type":"string","enum":["met","unmet","unknown"]}},"required":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"],"description":"What the hostname needs to serve, in the order a user meets them. `unknown` means DNS or Foundry has not answered yet."},"firstUnmetCondition":{"type":["string","null"],"enum":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"]},"ownershipExpiry":{"type":["object","null"],"properties":{"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt"],"description":"Set while only an `expiring` domain ownership keeps this active RoutingUrl serving. The hostname stops serving after `expiresAt` unless the TXT record in `records` is published."},"records":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","enum":["ownershipVerified","dnsPointsAtSwitchboard"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"}},"required":["condition","type","name","value","ttl"]},"description":"The DNS records still to publish. The TXT record is listed while ownership is not met, and while only an `expiring` domain ownership keeps it met. While ownership is not met it is the record of the domain ownership for the exact hostname, otherwise that of a wildcard domain ownership that covers it, otherwise the exact hostname's. In `no_domain_ownership` it is the record a domain ownership for the exact hostname would use; publishing it has no effect until that domain ownership exists."},"heldBy":{"type":["object","null"],"properties":{"workspaceId":{"type":["string","null"],"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"message":{"type":["string","null"]}},"required":["workspaceId","projectId","serviceId","message"],"description":"Set when another RoutingUrl holds the hostname. Its ids are shown only to a caller with access to its workspace; otherwise `message` is \"held by another workspace\"."},"customDomain":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":["string","null"],"enum":["pending","provisioning","active","failed"],"description":"Foundry's status of the custom domain. Null when Foundry's last answer is unknown."},"failureReason":{"type":["string","null"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"certificateRetryRequestedAt":{"type":["string","null"],"format":"date-time"},"certificateIssuanceStuck":{"type":"boolean","description":"True when the certificate is still provisioning after the custom domain was registered again."}},"required":["id","status","failureReason","certExpiresAt","lastSeenAt","certificateRetryRequestedAt","certificateIssuanceStuck"],"description":"The Foundry custom domain the RoutingUrl holds, if any."},"customDomainSyncError":{"description":"The error from the last sync with Foundry, also when it left the RoutingUrl without a custom domain. Null when that sync succeeded.","type":["string","null"]},"switchboardDns":{"type":["object","null"],"properties":{"accepted":{"type":"boolean"},"detail":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["accepted","detail","lastSeenAt"],"description":"Foundry's last answer about the hostname's DNS. Null before Foundry has answered."},"setupUrl":{"type":["string","null"],"format":"uri","description":"The Console page that shows what to do next, while the RoutingUrl is pending and has a service."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","branchId","serviceId","hostname","logicalId","status","state","conditions","firstUnmetCondition","ownershipExpiry","records","heldBy","customDomain","customDomainSyncError","switchboardDns","setupUrl","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"RoutingUrl not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(url_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]},"patch":{"operationId":"patchV1UrlsById","summary":"Update a RoutingUrl","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nChanges the hostname, the service or the `logicalId`. Nothing is refused for want of a verified domain ownership. A request that changes none of them changes nothing, unless it sends `createDomainOwnership: true`, no verified domain ownership covers the hostname, and none exists for the exact hostname: then it creates the domain ownership for the exact hostname, as a create does. A hostname change removes the old hostname's custom domain and makes the RoutingUrl `pending`. A service change keeps its status, and the hostname moves to the new service. A new hostname, or a service in another region, is registered with Foundry as for a create, and that registration counts against the workspace's hourly limit of new certificates.","responses":{"200":{"description":"The RoutingUrl.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(url_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"routingUrl"},"branchId":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Null once the service is deleted."},"hostname":{"type":"string"},"logicalId":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active"],"description":"`pending` until every condition is met, then `active`. An active RoutingUrl stays active when its service's live deployment changes. It goes back to `pending` when its hostname changes, its service is deleted, or no covering domain ownership keeps its ownership met. It records that the hostname went live; `state` says what it does now."},"state":{"type":"string","enum":["no_domain_ownership","not_verified","no_service","no_live_deployment","update_failed","in_use_elsewhere","waiting_for_dns","provisioning_certificate","certificate_failed","updating","active"],"description":"What the hostname is doing now, in one value, worked out on read from what is stored. No part of the platform acts on it: it is for choosing what to show and what to wait for. It can differ from `status`, which records that the hostname once went live. To wait for the hostname to serve, wait for `active`. The first that applies is the state:\n- `no_domain_ownership`: no domain ownership in the workspace covers the hostname, so nothing looks up a TXT record for it. Create one with `PATCH /v1/urls/{id}` and `createDomainOwnership: true`, or with `POST /v1/workspaces/{workspaceId}/domain-ownerships`. `POST /v1/urls/{id}/check` creates none.\n- `not_verified`: the hostname's ownership is not met. Publish the TXT record in `records`, then call `POST /v1/urls/{id}/check`.\n- `no_service`: the hostname's service is deleted.\n- `no_live_deployment`: the service has no live deployment. Deploy the service, or promote one of its deployments.\n- `update_failed`: the last attempt to bring the hostname up to date failed. `customDomainSyncError` says why, and it is retried.\n- `in_use_elsewhere`: another RoutingUrl, which can be on the same service, holds this hostname. `heldBy` names its service when you can access its workspace, and says \"held by another workspace\" otherwise. This RoutingUrl takes the hostname over with no action once the other one gives it up.\n- `waiting_for_dns`: the hostname's DNS does not point where it should. Publish the CNAME record in `records`, then call `POST /v1/urls/{id}/check`.\n- `provisioning_certificate`: the hostname's certificate is being issued.\n- `certificate_failed`: the certificate could not be issued. `customDomain.failureReason` says why; `POST /v1/urls/{id}/check` retries it.\n- `updating`: the hostname is being brought up to date, for example onto the service's new live deployment.\n- `active`: the hostname serves the service's live deployment with an active certificate."},"conditions":{"type":"object","properties":{"ownershipVerified":{"type":"string","enum":["met","unmet","unknown"]},"servicePresent":{"type":"string","enum":["met","unmet","unknown"]},"liveDeployment":{"type":"string","enum":["met","unmet","unknown"]},"dnsPointsAtSwitchboard":{"type":"string","enum":["met","unmet","unknown"]},"customDomainBound":{"type":"string","enum":["met","unmet","unknown"]},"certificateActive":{"type":"string","enum":["met","unmet","unknown"]}},"required":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"],"description":"What the hostname needs to serve, in the order a user meets them. `unknown` means DNS or Foundry has not answered yet."},"firstUnmetCondition":{"type":["string","null"],"enum":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"]},"ownershipExpiry":{"type":["object","null"],"properties":{"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt"],"description":"Set while only an `expiring` domain ownership keeps this active RoutingUrl serving. The hostname stops serving after `expiresAt` unless the TXT record in `records` is published."},"records":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","enum":["ownershipVerified","dnsPointsAtSwitchboard"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"}},"required":["condition","type","name","value","ttl"]},"description":"The DNS records still to publish. The TXT record is listed while ownership is not met, and while only an `expiring` domain ownership keeps it met. While ownership is not met it is the record of the domain ownership for the exact hostname, otherwise that of a wildcard domain ownership that covers it, otherwise the exact hostname's. In `no_domain_ownership` it is the record a domain ownership for the exact hostname would use; publishing it has no effect until that domain ownership exists."},"heldBy":{"type":["object","null"],"properties":{"workspaceId":{"type":["string","null"],"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"message":{"type":["string","null"]}},"required":["workspaceId","projectId","serviceId","message"],"description":"Set when another RoutingUrl holds the hostname. Its ids are shown only to a caller with access to its workspace; otherwise `message` is \"held by another workspace\"."},"customDomain":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":["string","null"],"enum":["pending","provisioning","active","failed"],"description":"Foundry's status of the custom domain. Null when Foundry's last answer is unknown."},"failureReason":{"type":["string","null"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"certificateRetryRequestedAt":{"type":["string","null"],"format":"date-time"},"certificateIssuanceStuck":{"type":"boolean","description":"True when the certificate is still provisioning after the custom domain was registered again."}},"required":["id","status","failureReason","certExpiresAt","lastSeenAt","certificateRetryRequestedAt","certificateIssuanceStuck"],"description":"The Foundry custom domain the RoutingUrl holds, if any."},"customDomainSyncError":{"description":"The error from the last sync with Foundry, also when it left the RoutingUrl without a custom domain. Null when that sync succeeded.","type":["string","null"]},"switchboardDns":{"type":["object","null"],"properties":{"accepted":{"type":"boolean"},"detail":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["accepted","detail","lastSeenAt"],"description":"Foundry's last answer about the hostname's DNS. Null before Foundry has answered."},"setupUrl":{"type":["string","null"],"format":"uri","description":"The Console page that shows what to do next, while the RoutingUrl is pending and has a service."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","branchId","serviceId","hostname","logicalId","status","state","conditions","firstUnmetCondition","ownershipExpiry","records","heldBy","customDomain","customDomainSyncError","switchboardDns","setupUrl","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"RoutingUrl not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The new service has reached its hostname quota (`quota-exceeded`), or another live RoutingUrl on the Branch has this `logicalId` (`logical-id-taken`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["quota-exceeded","logical-id-taken"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The request body is invalid (`validation-error`), the hostname is invalid (`invalid-hostname`), or the service is on another Branch (`service-on-another-branch`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation-error","invalid-hostname","service-on-another-branch"]},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(url_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253,"description":"The hostname to serve, such as `shop.com`. Case and a trailing dot are ignored. Wildcards and IP addresses are refused."},"serviceId":{"description":"Another service on the RoutingUrl's Branch.","type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"logicalId":{"description":"`null` clears it.","anyOf":[{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource."},{"type":"null"}]},"createDomainOwnership":{"default":false,"description":"Whether to create a domain ownership for the exact hostname when no verified one covers it. Defaults to `false`: only the RoutingUrl is created or changed, and the workspace's domain ownerships stay as they are. With `true`, a create, or an update that changes the hostname, the service or `logicalId`, also creates that domain ownership if it does not exist, and looks up its TXT record. An update that sends only `true` does the same: it creates that domain ownership when no verified one covers the hostname and none exists for the exact hostname, and otherwise changes nothing.","type":"boolean"}}}}}}},"delete":{"operationId":"deleteV1UrlsById","summary":"Delete a RoutingUrl","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRemoves the hostname from its service. Its custom domain is removed from Foundry now or, if that fails, by a retry.","responses":{"204":{"description":"RoutingUrl deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"RoutingUrl not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(url_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/urls/{id}/check":{"post":{"operationId":"postV1UrlsByIdCheck","summary":"Check a RoutingUrl","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRefreshes the RoutingUrl now and returns it. Looks up the TXT records of the domain ownerships that cover the hostname when none is verified, asks Foundry to retry a failed certificate, and syncs the custom domain with Foundry. Creates nothing. Run it after publishing a DNS record. A certificate retry counts against the workspace's hourly limit of new certificates.","responses":{"200":{"description":"The RoutingUrl as the check left it. When Foundry refused or gave no answer, `customDomainSyncError` says why, and a failed sync is tried again later.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(url_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"routingUrl"},"branchId":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Null once the service is deleted."},"hostname":{"type":"string"},"logicalId":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active"],"description":"`pending` until every condition is met, then `active`. An active RoutingUrl stays active when its service's live deployment changes. It goes back to `pending` when its hostname changes, its service is deleted, or no covering domain ownership keeps its ownership met. It records that the hostname went live; `state` says what it does now."},"state":{"type":"string","enum":["no_domain_ownership","not_verified","no_service","no_live_deployment","update_failed","in_use_elsewhere","waiting_for_dns","provisioning_certificate","certificate_failed","updating","active"],"description":"What the hostname is doing now, in one value, worked out on read from what is stored. No part of the platform acts on it: it is for choosing what to show and what to wait for. It can differ from `status`, which records that the hostname once went live. To wait for the hostname to serve, wait for `active`. The first that applies is the state:\n- `no_domain_ownership`: no domain ownership in the workspace covers the hostname, so nothing looks up a TXT record for it. Create one with `PATCH /v1/urls/{id}` and `createDomainOwnership: true`, or with `POST /v1/workspaces/{workspaceId}/domain-ownerships`. `POST /v1/urls/{id}/check` creates none.\n- `not_verified`: the hostname's ownership is not met. Publish the TXT record in `records`, then call `POST /v1/urls/{id}/check`.\n- `no_service`: the hostname's service is deleted.\n- `no_live_deployment`: the service has no live deployment. Deploy the service, or promote one of its deployments.\n- `update_failed`: the last attempt to bring the hostname up to date failed. `customDomainSyncError` says why, and it is retried.\n- `in_use_elsewhere`: another RoutingUrl, which can be on the same service, holds this hostname. `heldBy` names its service when you can access its workspace, and says \"held by another workspace\" otherwise. This RoutingUrl takes the hostname over with no action once the other one gives it up.\n- `waiting_for_dns`: the hostname's DNS does not point where it should. Publish the CNAME record in `records`, then call `POST /v1/urls/{id}/check`.\n- `provisioning_certificate`: the hostname's certificate is being issued.\n- `certificate_failed`: the certificate could not be issued. `customDomain.failureReason` says why; `POST /v1/urls/{id}/check` retries it.\n- `updating`: the hostname is being brought up to date, for example onto the service's new live deployment.\n- `active`: the hostname serves the service's live deployment with an active certificate."},"conditions":{"type":"object","properties":{"ownershipVerified":{"type":"string","enum":["met","unmet","unknown"]},"servicePresent":{"type":"string","enum":["met","unmet","unknown"]},"liveDeployment":{"type":"string","enum":["met","unmet","unknown"]},"dnsPointsAtSwitchboard":{"type":"string","enum":["met","unmet","unknown"]},"customDomainBound":{"type":"string","enum":["met","unmet","unknown"]},"certificateActive":{"type":"string","enum":["met","unmet","unknown"]}},"required":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"],"description":"What the hostname needs to serve, in the order a user meets them. `unknown` means DNS or Foundry has not answered yet."},"firstUnmetCondition":{"type":["string","null"],"enum":["ownershipVerified","servicePresent","liveDeployment","dnsPointsAtSwitchboard","customDomainBound","certificateActive"]},"ownershipExpiry":{"type":["object","null"],"properties":{"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt"],"description":"Set while only an `expiring` domain ownership keeps this active RoutingUrl serving. The hostname stops serving after `expiresAt` unless the TXT record in `records` is published."},"records":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","enum":["ownershipVerified","dnsPointsAtSwitchboard"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"}},"required":["condition","type","name","value","ttl"]},"description":"The DNS records still to publish. The TXT record is listed while ownership is not met, and while only an `expiring` domain ownership keeps it met. While ownership is not met it is the record of the domain ownership for the exact hostname, otherwise that of a wildcard domain ownership that covers it, otherwise the exact hostname's. In `no_domain_ownership` it is the record a domain ownership for the exact hostname would use; publishing it has no effect until that domain ownership exists."},"heldBy":{"type":["object","null"],"properties":{"workspaceId":{"type":["string","null"],"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"projectId":{"type":["string","null"],"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"serviceId":{"type":["string","null"],"pattern":"^(cps_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"message":{"type":["string","null"]}},"required":["workspaceId","projectId","serviceId","message"],"description":"Set when another RoutingUrl holds the hostname. Its ids are shown only to a caller with access to its workspace; otherwise `message` is \"held by another workspace\"."},"customDomain":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":["string","null"],"enum":["pending","provisioning","active","failed"],"description":"Foundry's status of the custom domain. Null when Foundry's last answer is unknown."},"failureReason":{"type":["string","null"]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"certificateRetryRequestedAt":{"type":["string","null"],"format":"date-time"},"certificateIssuanceStuck":{"type":"boolean","description":"True when the certificate is still provisioning after the custom domain was registered again."}},"required":["id","status","failureReason","certExpiresAt","lastSeenAt","certificateRetryRequestedAt","certificateIssuanceStuck"],"description":"The Foundry custom domain the RoutingUrl holds, if any."},"customDomainSyncError":{"description":"The error from the last sync with Foundry, also when it left the RoutingUrl without a custom domain. Null when that sync succeeded.","type":["string","null"]},"switchboardDns":{"type":["object","null"],"properties":{"accepted":{"type":"boolean"},"detail":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["accepted","detail","lastSeenAt"],"description":"Foundry's last answer about the hostname's DNS. Null before Foundry has answered."},"setupUrl":{"type":["string","null"],"format":"uri","description":"The Console page that shows what to do next, while the RoutingUrl is pending and has a service."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","branchId","serviceId","hostname","logicalId","status","state","conditions","firstUnmetCondition","ownershipExpiry","records","heldBy","customDomain","customDomainSyncError","switchboardDns","setupUrl","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"RoutingUrl not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded, or the certificate is failed and the workspace has used its hourly limit of new certificates. `Retry-After` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(url_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/workspaces":{"get":{"operationId":"getV1Workspaces","summary":"Get list of workspaces","description":"Returns the list of workspaces the current token can access.","tags":["Workspaces"],"responses":{"200":{"description":"Returns the list of workspaces the current token can access.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"workspace"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Next cursor to continue pagination","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"]},"description":"Cursor for pagination"},{"in":"query","name":"limit","schema":{"default":100,"type":"number"},"description":"Limit for pagination"}]},"post":{"operationId":"postV1Workspaces","summary":"Create a workspace","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new free-plan workspace owned by the authenticated user. For agent tokens the workspace is created for the agent's sponsor, and the agent's permission policy treats this as an admin action — under the default policy the sponsor approves it first.","tags":["[Experimental]"],"responses":{"201":{"description":"The created workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"workspace"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","createdAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Workspace integration tokens cannot create workspaces; a user-attributable actor is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The user has reached the daily limit of new workspaces.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Request body exceeds this endpoint's size cap.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":100}}}}}}}},"/v1/workspaces/{id}":{"get":{"operationId":"getV1WorkspacesById","summary":"Get workspace","description":"Returns the workspace with the given ID.","tags":["Workspaces"],"responses":{"200":{"description":"Workspace retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"workspace"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","createdAt"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}},"/v1/workspaces/{id}/subscription":{"get":{"operationId":"getV1WorkspacesByIdSubscription","summary":"Get workspace subscription","description":"Returns subscription information for the workspace with the given ID.","tags":["Workspaces"],"responses":{"200":{"description":"Workspace subscription retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"planName":{"type":"string"},"usageBlocked":{"type":"boolean"},"upgradeUrl":{"type":"string","format":"uri"}},"required":["planName","usageBlocked","upgradeUrl"]}},"required":["data"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"verification":{"description":"DNS record the caller must publish before retrying. Present on `domain-ownership-required` errors.","type":"object","properties":{"type":{"type":"string","const":"TXT"},"name":{"type":"string","description":"DNS record name to publish."},"value":{"type":"string","description":"DNS record value to publish."},"ttl":{"type":"integer","description":"Suggested TTL in seconds."}},"required":["type","name","value","ttl"]}},"required":["code","message"]}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}]}}}}