{"openapi":"3.1.0","info":{"title":"CubiBase Control API","version":"v1","description":"Control plane for CubiBase. Authenticate with a session JWT (login/refresh) or a personal access token (Authorization: Bearer cb_pat_...). PAT scopes are cumulative read < write < admin: GET needs read, POST/PATCH need write, DELETE needs admin; token management and billing actions require an interactive session. The Data API is host-routed: https://{slug}.api.cubibase.com/rest/v1/{table} locally as http://{slug}.localhost:4000/rest/v1/{table}. A publishable API key identifies the project and does not authorize row access. End-user requests also send Authorization: Bearer. Filters use column=op.value. Operators: eq, neq, gt, gte, lt, lte, like, ilike, is. Order is column.asc or column.desc. limit max 1000. Functions granted EXECUTE to the api role are callable at POST /rest/v1/rpc/{name} with a JSON object of named arguments. The server does not trust X-Forwarded-Host."},"servers":[{"url":"https://api.cubibase.com","description":"Control plane (production)"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message","requestId"]}}}}},"paths":{"/health/live":{"get":{"summary":"Liveness","responses":{"200":{"description":"Process is up"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listLive"}},"/health/ready":{"get":{"summary":"Readiness, including metadata database when configured","responses":{"200":{"description":"Ready"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Degraded"}},"operationId":"listReady"}},"/v1/auth/register":{"post":{"summary":"Register a developer. Does not create a project database.","operationId":"registerAuth","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/login":{"post":{"summary":"Login. Returns mfaRequired + challengeToken when TOTP is enabled; send totpCode inline or complete /v1/auth/login/mfa.","operationId":"loginAuth","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/login/mfa":{"post":{"summary":"Complete a developer sign-in MFA challenge with a TOTP or recovery code","operationId":"createAuthLoginMfa","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/mfa":{"get":{"summary":"Developer MFA status","security":[{"bearerAuth":[]}],"operationId":"listAuthMfa","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/mfa/setup":{"post":{"summary":"Start TOTP enrollment. Returns secret and otpauth URI.","security":[{"bearerAuth":[]}],"operationId":"setupAuthMfa","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/mfa/confirm":{"post":{"summary":"Confirm TOTP enrollment. Returns single-use recovery codes once.","security":[{"bearerAuth":[]}],"operationId":"confirmAuthMfa","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/mfa/disable":{"post":{"summary":"Disable TOTP with password + code","security":[{"bearerAuth":[]}],"operationId":"disableAuthMfa","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/mfa/recovery-codes":{"post":{"summary":"Regenerate recovery codes with a TOTP code","security":[{"bearerAuth":[]}],"operationId":"createAuthMfaRecoveryCodes","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/logout":{"post":{"summary":"Revoke a refresh token","operationId":"logoutAuth","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/refresh":{"post":{"summary":"Rotate a refresh token","operationId":"refreshAuth","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/forgot-password":{"post":{"summary":"Send a password reset message","operationId":"createAuthForgotPassword","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/reset-password":{"post":{"summary":"Reset a password with a single-use token","operationId":"createAuthResetPassword","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/verify-email":{"post":{"summary":"Verify an email with a single-use token","operationId":"createAuthVerifyEmail","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/me":{"get":{"summary":"Current developer","security":[{"bearerAuth":[]}],"operationId":"listAuthMe","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/change-password":{"post":{"summary":"Change password and revoke sessions","security":[{"bearerAuth":[]}],"operationId":"createAuthChangePassword","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/tokens":{"get":{"summary":"List personal access tokens (metadata only, never the raw token). Interactive session required.","security":[{"bearerAuth":[]}],"operationId":"listAuthTokens","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a personal access token (cb_pat_). Body { name, scope? read|write|admin (default write), projectId?, expiresInDays? }. The raw token is returned once as accessToken. Interactive session required.","security":[{"bearerAuth":[]}],"operationId":"createAuthTokens","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/tokens/{tokenId}":{"delete":{"summary":"Revoke a personal access token. Interactive session required.","security":[{"bearerAuth":[]}],"operationId":"deleteAuthTokensTokenId","parameters":[{"name":"tokenId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects":{"get":{"summary":"List projects for the current developer","security":[{"bearerAuth":[]}],"operationId":"listProjects","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a project in provisioning status and enqueue a job","security":[{"bearerAuth":[]}],"operationId":"createProjects","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/slug-availability":{"get":{"summary":"Check whether a project slug is valid and free. Query: slug.","security":[{"bearerAuth":[]}],"operationId":"listProjectsSlugAvailability","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}":{"get":{"summary":"Get a project","security":[{"bearerAuth":[]}],"operationId":"getProjectsProjectId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update name or region","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a project. Body confirm must be \"delete {slug}\".","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/function-templates":{"get":{"summary":"CubiBase Functions template catalog (id, version, trigger, defaults, required secrets/env, setup steps)","security":[{"bearerAuth":[]}],"operationId":"listFunctionTemplates","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions":{"get":{"summary":"List CubiBase Functions (TypeScript/JavaScript serverless functions, NOT SQL functions) with active deployment, triggers and recent execution stats","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdFunctions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a CubiBase Function. Body { name, sourceCode?|templateId?, language?, httpAuthMode? (jwt default), signatureMode?, timeoutSeconds?, memoryMb?, envVars?, createHttpTrigger? }. Enforces plan function/memory quotas.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdFunctions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/usage":{"get":{"summary":"Functions usage vs plan entitlements for the current billing cycle (invocations, GB-seconds, functions, schedules, concurrency, warnings)","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdFunctionsUsage","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/executions":{"get":{"summary":"Paginated execution history. Query functionId, trigger, status, limit, offset. Project-isolated.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdFunctionsExecutions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/executions/{executionId}":{"get":{"summary":"Execution detail with bounded, redacted logs","security":[{"bearerAuth":[]}],"operationId":"getProjectsProjectIdFunctionsExecutionsExecutionId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"executionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/queue":{"get":{"summary":"Async invocation queue state (pending/retrying/dead). Query status.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdFunctionsQueue","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}":{"get":{"summary":"Function detail: source, config, secrets (names only), triggers, deployments, invocation URL","security":[{"bearerAuth":[]}],"operationId":"getProjectsProjectIdFunctionsIdOrName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update source/config. Changes take effect on next deployment.","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdFunctionsIdOrName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a function: removes triggers (incl. installed DB triggers), runtime artifacts, secrets and metadata","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdFunctionsIdOrName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/deployments":{"get":{"summary":"Deployment history (immutable versions)","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdFunctionsIdOrNameDeployments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Bundle (esbuild, nodejs22.x) and deploy a new immutable version; atomically activates it only on success","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdFunctionsIdOrNameDeployments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/deployments/{deploymentId}/activate":{"post":{"summary":"Atomically switch the active deployment pointer (rollback support)","security":[{"bearerAuth":[]}],"operationId":"activateProjectsProjectIdFunctionsIdOrNameDeploymentsDeploymentId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/secrets":{"post":{"summary":"Set/rotate an encrypted secret. Body { name, value }. Values are never returned by read APIs.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdFunctionsIdOrNameSecrets","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/secrets/{name}":{"delete":{"summary":"Delete a secret","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdFunctionsIdOrNameSecretsName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/signature/rotate":{"post":{"summary":"Rotate the built-in HMAC signing secret; the previous secret stays valid for a grace period","security":[{"bearerAuth":[]}],"operationId":"rotateProjectsProjectIdFunctionsIdOrNameSignature","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/triggers":{"post":{"summary":"Create a trigger. Body { kind: http|database|storage|schedule, config, enabled? }. Database triggers install AFTER-row capture into the project DB; schedule config uses cron + timezone.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdFunctionsIdOrNameTriggers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/triggers/{triggerId}":{"patch":{"summary":"Update trigger config/enabled state","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdFunctionsIdOrNameTriggersTriggerId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}},{"name":"triggerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a trigger and uninstall any installed DB capture","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdFunctionsIdOrNameTriggersTriggerId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}},{"name":"triggerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/functions/{idOrName}/test":{"post":{"summary":"Trusted test invocation through the same execution pipeline (auth bypass is console-only). Body { method, path, headers, body, event }.","security":[{"bearerAuth":[]}],"operationId":"testProjectsProjectIdFunctionsIdOrName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"idOrName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/provisioning":{"get":{"summary":"Provisioning status","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdProvisioning","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/provisioning/retry":{"post":{"summary":"Requeue provisioning for a failed project","security":[{"bearerAuth":[]}],"operationId":"retryProjectsProjectIdProvisioning","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/lifecycle":{"get":{"summary":"Inactivity pause and backup state","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdLifecycle","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/resume":{"post":{"summary":"Resume a paused project; restores from the S3 backup when archived","security":[{"bearerAuth":[]}],"operationId":"resumeProjectsProjectId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/backup/download":{"get":{"summary":"Presigned download URL for the newest .backup file","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdBackupDownload","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/api-keys":{"get":{"summary":"List API keys. Secret material is never returned.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdApiKeys","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a publishable or secret key. A secret is returned once.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdApiKeys","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/dev/tokens":{"post":{"summary":"Issue a development end-user JWT when DEV_IDP_ENABLED=true","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdDevTokens","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables":{"get":{"summary":"List tables for a schema. Query: schema (public, auth, vault, logs, cubibase; default public). Returns schemas metadata, the selected schema, readOnly flag, and tables. Platform schemas are read-only.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdTables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a table in public. It is not publicly accessible until exposure is granted.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/columns":{"post":{"summary":"Add a column","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTablesTableColumns","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/columns/{column}":{"delete":{"summary":"Drop a column","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdTablesTableColumnsColumn","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"column","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/exposure":{"post":{"summary":"Grant or revoke Data API privileges","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTablesTableExposure","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth":{"get":{"summary":"Auth provider issuer, audience, and algorithms. No signing secret.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdAuth","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update auth provider settings. The development signing secret is kept.","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdAuth","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/settings":{"get":{"summary":"Project end-user auth settings (signup, password policy, token TTLs, MFA)","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdAuthSettings","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update project auth settings","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdAuthSettings","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/rate-limits":{"get":{"summary":"Project auth rate limits","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdAuthRateLimits","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update project auth rate limits","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdAuthRateLimits","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/users":{"get":{"summary":"List end users. Query: search, limit, offset.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdAuthUsers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an end user","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdAuthUsers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/users/{userId}":{"patch":{"summary":"Update an end user (email, password, verification, ban, metadata)","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdAuthUsersUserId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete an end user and their sessions","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdAuthUsersUserId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/users/{userId}/sessions":{"delete":{"summary":"Revoke all sessions of an end user","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdAuthUsersUserIdSessions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/users/{userId}/factors":{"get":{"summary":"List MFA factors of an end user","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdAuthUsersUserIdFactors","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/users/{userId}/factors/{factorId}":{"delete":{"summary":"Remove an MFA factor","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdAuthUsersUserIdFactorsFactorId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"factorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/sessions":{"get":{"summary":"List end-user sessions. Query: userId.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdAuthSessions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/auth/sessions/{sessionId}":{"delete":{"summary":"Revoke an end-user session","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdAuthSessionsSessionId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/logs/requests":{"get":{"summary":"Search Data API request logs. Filters: from, to, method, path, status/statusMin/statusMax, userId, requestId, errorCode, minDurationMs, search, limit, offset. Bodies are redacted.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdLogsRequests","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/logs/requests/{logId}":{"get":{"summary":"One request log with request/response bodies and params","security":[{"bearerAuth":[]}],"operationId":"getProjectsProjectIdLogsRequestsLogId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/logs/auth":{"get":{"summary":"Search auth event logs. Filters: from, to, event, userId, email, search, limit, offset.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdLogsAuth","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/logs/audit":{"get":{"summary":"Search console audit logs. Filters: from, to, action, actor, search, limit, offset.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdLogsAudit","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/extensions":{"get":{"summary":"List allowlisted PostgreSQL extensions and their installed state","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdExtensions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/extensions/{name}":{"post":{"summary":"Enable an allowlisted extension","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdExtensionsName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Disable an extension (refused when objects depend on it)","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdExtensionsName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/policies":{"get":{"summary":"List RLS policies and per-table RLS state in the public schema","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdPolicies","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an RLS policy on a public table. Body { table, name, command, permissive, roles, using, withCheck }. Enables RLS on the table.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdPolicies","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/rls":{"post":{"summary":"Enable/disable (and force) row level security on a public table. Body { enabled, force? }.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTablesTableRls","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/policies/{policy}":{"post":{"summary":"Alter a policy (command, permissive, roles, using, withCheck)","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTablesTablePoliciesPolicy","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"policy","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Drop a policy","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdTablesTablePoliciesPolicy","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"policy","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/sql-functions":{"get":{"summary":"List user-created SQL functions with definitions, structured arguments/body for editing, and Data API EXECUTE state. Extension functions are hidden unless includeExtensions=true; they carry an extension field and cannot be edited or dropped.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdSqlFunctions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create (or replace) a SQL/plpgsql function in public. Private by default; apiExecute grants the Data API role. Replacing an extension function is refused (403 extension_function).","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdSqlFunctions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/sql-functions/{name}":{"delete":{"summary":"Drop a SQL function. Query args selects an overload by argument types. Refused when objects depend on it or it belongs to an extension (403 extension_function).","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdSqlFunctionsName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/sql-functions/{name}/api-access":{"post":{"summary":"Grant or revoke EXECUTE for the Data API role. Body { enabled, args? }. Allowed for extension functions too.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdSqlFunctionsNameApiAccess","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/db-triggers":{"get":{"summary":"List non-internal native PostgreSQL triggers on public tables plus available trigger functions","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdDbTriggers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a native PostgreSQL trigger on a public table calling a public trigger function","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdDbTriggers","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/triggers/{trigger}":{"delete":{"summary":"Drop a trigger","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdTablesTableTriggersTrigger","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"trigger","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/triggers/{trigger}/enabled":{"post":{"summary":"Enable or disable a trigger. Body { enabled }.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTablesTableTriggersTriggerEnabled","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"trigger","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/indexes":{"get":{"summary":"List indexes on public tables with definitions and sizes","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdIndexes","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an index (columns or expression, optional UNIQUE / method / partial WHERE)","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdIndexes","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/indexes/{name}":{"delete":{"summary":"Drop an index. Refused when it backs a constraint.","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdIndexesName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/types":{"get":{"summary":"List enum and composite types in the public schema","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdTypes","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/types/enum":{"post":{"summary":"Create an enum type. Body { name, labels }.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTypesEnum","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/types/composite":{"post":{"summary":"Create a composite type. Body { name, attributes: [{ name, type }] }.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTypesComposite","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/types/{name}":{"delete":{"summary":"Drop a type. Refused when columns or functions depend on it.","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdTypesName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/types/{name}/labels":{"post":{"summary":"Add an enum label. Body { label, before? , after? }.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTypesNameLabels","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/types/{name}/labels/rename":{"post":{"summary":"Rename an enum label. Body { from, to }.","security":[{"bearerAuth":[]}],"operationId":"renameProjectsProjectIdTypesNameLabels","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/views":{"get":{"summary":"List views and materialized views in public with definitions and Data API SELECT state","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdViews","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a view or materialized view from a SELECT. Private by default; apiSelect grants the Data API role.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdViews","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/views/{name}":{"delete":{"summary":"Drop a view. Refused when other views depend on it.","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdViewsName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/views/{name}/api-access":{"post":{"summary":"Grant or revoke SELECT for the Data API role. Body { enabled }.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdViewsNameApiAccess","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/views/{name}/refresh":{"post":{"summary":"Refresh a materialized view","security":[{"bearerAuth":[]}],"operationId":"refreshProjectsProjectIdViewsName","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/signup":{"post":{"summary":"Data API: end-user signup. Host + apikey required. Body { email, password, data? }.","operationId":"signupEndUser","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/token":{"post":{"summary":"Data API: grant_type=password, refresh_token, or mfa. Returns a session or an MFA challenge.","operationId":"createEndUserToken","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/logout":{"post":{"summary":"Data API: revoke the session behind a refresh token","operationId":"logoutEndUser","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/user":{"get":{"summary":"Data API: current end user. Requires the end-user bearer token.","operationId":"listEndUserUser","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/factors":{"post":{"summary":"Data API: enroll a TOTP factor for the signed-in end user","operationId":"createEndUserFactors","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/factors/verify":{"post":{"summary":"Data API: confirm TOTP enrollment with a code","operationId":"verifyEndUserFactors","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/v1/factors/{factorId}":{"delete":{"summary":"Data API: remove own MFA factor","operationId":"deleteEndUserFactorsFactorId","parameters":[{"name":"factorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/rows":{"get":{"summary":"List rows as the project sql role. Query: schema (default public), limit, offset, order=column.asc, column=op.value filters. Platform schemas are read-only and secret columns are redacted.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdTablesTableRows","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Insert a row into a public table. Body { values }. Platform schemas reject writes.","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdTablesTableRows","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/tables/{table}/rows/{id}":{"patch":{"summary":"Update a row by its single primary key. Body { values }.","security":[{"bearerAuth":[]}],"operationId":"updateProjectsProjectIdTablesTableRowsId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a row by its single primary key.","security":[{"bearerAuth":[]}],"operationId":"deleteProjectsProjectIdTablesTableRowsId","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/sql":{"post":{"summary":"Run one read-only SQL statement as the project sql role","security":[{"bearerAuth":[]}],"operationId":"createProjectsProjectIdSql","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/plans":{"get":{"summary":"Public plan catalog with quotas and monthly prices (Free, Pro, Business)","operationId":"listBillingPlans","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/catalog":{"get":{"summary":"Public V4.3 pricing catalog: published plan versions, entitlements (per-project database quota, shared organization quotas), add-on prices and the quota model. Source for the Website pricing snapshot.","operationId":"listBillingCatalog","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing":{"get":{"summary":"Current plan, subscription state, organization billing (project slots, purchased add-ons, scheduled changes) and available plans","security":[{"bearerAuth":[]}],"operationId":"listBilling","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/usage":{"get":{"summary":"Shared organization usage dashboard (V4.3): consumption, reservations, limits and reset dates for every shared quota, with per-project breakdowns","security":[{"bearerAuth":[]}],"operationId":"listBillingUsage","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/invoices":{"get":{"summary":"Recent invoices mirrored from Stripe","security":[{"bearerAuth":[]}],"operationId":"listBillingInvoices","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/events":{"get":{"summary":"Recent Stripe webhook activity for the account (event type, outcome, error)","security":[{"bearerAuth":[]}],"operationId":"listBillingEvents","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/plan-change/preview":{"post":{"summary":"V4.3 consolidated plan-change preview. Body { planId }. Between paid plans the Additional Project item and quantity are preserved (additionalProjectsPreserved). Returns direction, target additional-project quantity, new monthly recurring total, scheduled changes and usage incompatibilities that block a downgrade (no data is ever deleted).","security":[{"bearerAuth":[]}],"operationId":"createBillingPlanChangePreview","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Body { planId, additionalProjectQuantity? }. Returns { url }: Stripe Checkout for a first subscription (optionally combined with additional-project slots), or an in-place plan change for an existing one. V4.3 paid-to-paid changes modify only the base item; purchased slots are preserved. Downgrades are validated against current usage first (409 downgrade_incompatible_usage / scheduled_change_conflict).","security":[{"bearerAuth":[]}],"operationId":"checkoutBilling","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/portal":{"post":{"summary":"Returns { url } for the Stripe Customer Portal (payment methods, cancellation)","security":[{"bearerAuth":[]}],"operationId":"portalBilling","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/additional-projects/preview":{"post":{"summary":"Stripe invoice preview for purchasing additional project slots. Body { quantity }. Returns the immediate prorated amount, taxes and new recurring total; shared quotas stay unchanged.","security":[{"bearerAuth":[]}],"operationId":"createBillingAdditionalProjectsPreview","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/additional-projects/purchase":{"post":{"summary":"Purchase additional project slots on the existing subscription (pending-update payment behavior, SCA support). Body { quantity, confirm: true }. Entitlements activate only after Stripe payment verification.","security":[{"bearerAuth":[]}],"operationId":"createBillingAdditionalProjectsPurchase","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/additional-projects/reduce":{"post":{"summary":"Schedule a reduction of purchased slots for the next renewal (no mid-cycle refund). Body { quantity, confirm: true }. Validates the organization fits its future entitlement.","security":[{"bearerAuth":[]}],"operationId":"createBillingAdditionalProjectsReduce","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/additional-projects/reduction/cancel":{"post":{"summary":"Cancel a scheduled slot reduction before it takes effect","security":[{"bearerAuth":[]}],"operationId":"createBillingAdditionalProjectsReductionCancel","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/additional-projects/operations/{operationId}":{"get":{"summary":"Poll a purchase operation: pending payment / SCA client secret / success / failure. Entitlement quantities come from authoritative Stripe state.","security":[{"bearerAuth":[]}],"operationId":"getBillingAdditionalProjectsOperationsOperationId","parameters":[{"name":"operationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/webhooks":{"post":{"summary":"Stripe webhook receiver. Verified with the Stripe-Signature header against the raw body; no bearer auth.","operationId":"createBillingWebhooks","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"Account consumption vs plan quotas, per-project usage, and quota suspension state","security":[{"bearerAuth":[]}],"operationId":"listUsage","responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage/reevaluate":{"post":{"summary":"Re-check quotas now; reactivates suspended projects when the account fits its plan again","security":[{"bearerAuth":[]}],"operationId":"reevaluateUsage","responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{projectId}/usage":{"get":{"summary":"Project consumption (database bytes, end users) vs plan quotas. Query: refresh=true forces a live measurement.","security":[{"bearerAuth":[]}],"operationId":"listProjectsProjectIdUsage","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden (role, scope, or verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rest/v1/{table}":{"get":{"summary":"Data API collection. Requires Host + apikey, and an end-user JWT or the project secret key (cb_sec_, service actor: cubibase.role=service, user_id empty, RLS still applies; writes are audit-logged).","operationId":"getTable","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Data API insert. End-user JWT or secret key.","operationId":"createTable","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rest/v1/{table}/{id}":{"get":{"summary":"Data API fetch one row. End-user JWT or secret key.","operationId":"getTableId","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Data API update. End-user JWT or secret key.","operationId":"updateTableId","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Data API delete. End-user JWT or secret key.","operationId":"deleteTableId","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rest/v1/rpc/{name}":{"post":{"summary":"Data API: call a public function granted EXECUTE to the api role. Host + apikey, and an end-user JWT or the project secret key. Body is a JSON object of named arguments (omit for none). User calls run with cubibase.user_id set, so RLS applies; service calls set cubibase.role=service instead. SECURITY DEFINER runs as the owner. SETOF returns an array, composite one object, scalar the value, void null.","operationId":"createRpcName","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success. JSON body; see the endpoint summary for the shape.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}