{"openapi":"3.1.0","info":{"title":"koigrid API","version":"1","description":"Flat-rate managed cloud, API-first. Deploy apps, managed Postgres/Redis, cron jobs, object storage, email and observability — everything a human does in the dashboard, an agent does here with a Bearer token. See also /llms.txt.\n\nIdempotency: send header `Idempotency-Key: <unique-id>` on any mutation (POST/PUT/PATCH/DELETE) — a retry with the same key returns the same response (no duplicates; scoped to your token+method+path, kept 24h). Pagination: list endpoints accept `?limit=N`&`?cursor=` (opt-in) → `{items, nextCursor, total}`."},"servers":[{"url":"https://koigrid.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account"},{"name":"Connect"},{"name":"Manifest"},{"name":"Rewards"},{"name":"Changelog"},{"name":"Projects"},{"name":"Apps"},{"name":"Databases"},{"name":"Cache"},{"name":"Storage"},{"name":"Jobs"},{"name":"Observability"},{"name":"Email"},{"name":"Checks"},{"name":"Webhooks"},{"name":"Log Drains"},{"name":"Spend Management"},{"name":"Bot Management"},{"name":"OpenTelemetry"},{"name":"DNS"},{"name":"Queues"},{"name":"Workflows"},{"name":"WordPress"},{"name":"Container Registry"},{"name":"Audit Log"},{"name":"Members"},{"name":"Feature Flags"},{"name":"Status Pages"},{"name":"Heartbeats"},{"name":"Config & Secrets"},{"name":"Web Analytics"},{"name":"Error Tracking"},{"name":"Speed Insights"},{"name":"Sandboxes"},{"name":"Image Optimization"},{"name":"Firewall"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"koi_ token","description":"API token: Authorization: Bearer koi_YOUR_KEY"}}},"paths":{"/me":{"get":{"summary":"Current authenticated user","tags":["Account"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope"}}}},"/usage":{"get":{"summary":"Usage and cost for the current period","tags":["Account"],"security":[{"bearerAuth":["usage:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (usage:read)"}}}},"/tokens":{"get":{"summary":"List API tokens (masked)","tags":["Account"],"security":[{"bearerAuth":["tokens:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (tokens:read)"}}},"post":{"summary":"Mint a scoped API token (scopes[], expiresInSeconds, maxCostCents) — returns the token once; cannot exceed the caller’s scopes","tags":["Account"],"security":[{"bearerAuth":["tokens:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresInSeconds":{"type":"integer"},"maxCostCents":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (tokens:write)"}}}},"/tokens/{id}":{"delete":{"summary":"Revoke an API token","tags":["Account"],"security":[{"bearerAuth":["tokens:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (tokens:write)"}}}},"/notifications/preferences":{"get":{"summary":"Notification preferences (email per category: alarms/anomalies/spend)","tags":["Account"],"security":[{"bearerAuth":["notifications:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (notifications:read)"}}},"put":{"summary":"Set a preference ({category, emailEnabled})","tags":["Account"],"security":[{"bearerAuth":["notifications:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["alarms","anomalies","spend"]},"emailEnabled":{"type":"boolean"}},"required":["category","emailEnabled"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (notifications:write)"}}}},"/connect/grants":{"get":{"summary":"List Connect grants (agent credential broker)","tags":["Connect"],"security":[{"bearerAuth":["connect:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (connect:read)"}}},"post":{"summary":"Create a broker grant (allowedScopes ceiling + maxTtlSeconds) — returns the secret (koicg_…) once","tags":["Connect"],"security":[{"bearerAuth":["connect:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"allowedScopes":{"type":"array","items":{"type":"string"}},"maxTtlSeconds":{"type":"integer"},"maxCostCents":{"type":"integer"},"projectId":{"type":"string"}},"required":["name","allowedScopes"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (connect:write)"}}}},"/connect/grants/{id}":{"patch":{"summary":"Pause/reconfigure a grant ({enabled, name, allowedScopes, maxTtlSeconds})","tags":["Connect"],"security":[{"bearerAuth":["connect:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"},"allowedScopes":{"type":"array","items":{"type":"string"}},"maxTtlSeconds":{"type":"integer"},"maxCostCents":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (connect:write)"}}},"delete":{"summary":"Revoke a grant (kills all future mints)","tags":["Connect"],"security":[{"bearerAuth":["connect:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (connect:write)"}}}},"/connect/token":{"post":{"summary":"EXCHANGE a grant for an ephemeral scoped token — auth with the grant secret (Authorization: Bearer koicg_…), not a normal token; requested scopes must be ⊆ the grant, TTL clamped to the grant ceiling","tags":["Connect"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}},"ttlSeconds":{"type":"integer"},"purpose":{"type":"string"},"maxCostCents":{"type":"integer"}},"required":["scopes"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope"}}}},"/manifest":{"post":{"summary":"APPLY a multi-service cutover manifest (koigrid.yaml/.json): project + databases + redis + apps wired by ${{...}} → brings up the whole stack in one call, idempotent (match by name).","tags":["Manifest"],"security":[{"bearerAuth":["manifest:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"databases":{"type":"array","items":{"type":"object"}},"redis":{"type":"array","items":{"type":"object"}},"apps":{"type":"array","items":{"type":"object"}}},"required":["project","apps"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (manifest:write)"}}}},"/manifest/plan":{"post":{"summary":"DRY-RUN a manifest: what would be created/updated, without mutating.","tags":["Manifest"],"security":[{"bearerAuth":["manifest:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"databases":{"type":"array","items":{"type":"object"}},"redis":{"type":"array","items":{"type":"object"}},"apps":{"type":"array","items":{"type":"object"}}},"required":["project","apps"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (manifest:write)"}}}},"/rewards":{"get":{"summary":"My reward balance + submissions","tags":["Rewards"],"security":[{"bearerAuth":["rewards:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (rewards:read)"}}},"post":{"summary":"Claim a reward ({reason, details?}) — gated by verified usage; manual approval where it applies","tags":["Rewards"],"security":[{"bearerAuth":["rewards:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"details":{"type":"object"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (rewards:write)"}}}},"/rewards/lines":{"get":{"summary":"Active reward lines (which actions pay and how much)","tags":["Rewards"],"security":[{"bearerAuth":["rewards:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (rewards:read)"}}}},"/rewards/referral":{"get":{"summary":"My referral link + stats (clicks, sign-ups brought, earned) — share it to refer other developers","tags":["Rewards"],"security":[{"bearerAuth":["rewards:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (rewards:read)"}}}},"/rewards/redeem":{"post":{"summary":"Redeem balance as infra credit (no minimum) or gift card ($5 min)","tags":["Rewards"],"security":[{"bearerAuth":["rewards:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["credit","giftcard"]},"amountCents":{"type":"integer"}},"required":["type"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (rewards:write)"}}}},"/rewards/submissions/{id}/review":{"post":{"summary":"Platform admin: approve/reject a submission (admin session only, not a token)","tags":["Rewards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","reject"]},"note":{"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope"}}}},"/changelog":{"get":{"summary":"What changed recently (public, no auth). ?since=YYYY-MM-DD returns only newer entries","tags":["Changelog"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope"}}}},"/projects":{"get":{"summary":"List projects (resource groups within the org)","tags":["Projects"],"security":[{"bearerAuth":["projects:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (projects:read)"}}},"post":{"summary":"Create a project","tags":["Projects"],"security":[{"bearerAuth":["projects:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (projects:write)"}}}},"/projects/{id}":{"delete":{"summary":"Delete a project (not the default; must be empty)","tags":["Projects"],"security":[{"bearerAuth":["projects:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (projects:write)"}}}},"/apps":{"get":{"summary":"List apps","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Create an app (container image or git repo)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"sourceType":{"type":"string","enum":["image","git"]},"image":{"type":"string"},"repo":{"type":"string"},"branch":{"type":"string"},"port":{"type":"integer"},"projectId":{"type":"string"},"healthCheckPath":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}":{"get":{"summary":"App detail (status, url)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"patch":{"summary":"Rename the app ({name}) — metadata, slug/URL unchanged","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}},"delete":{"summary":"Delete an app","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/deployments":{"get":{"summary":"Deployment history","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Deploy the app (repo/image, or archive from deploy --dir)","tags":["Apps"],"security":[{"bearerAuth":["apps:deploy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:deploy)"}}}},"/apps/{id}/source-upload":{"post":{"summary":"Presigned upload URL to deploy local code (koigrid apps deploy --dir)","tags":["Apps"],"security":[{"bearerAuth":["apps:deploy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:deploy)"}}}},"/apps/{id}/logs":{"get":{"summary":"Runtime logs","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}}},"/apps/{id}/scale":{"get":{"summary":"Current replica count","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Set replica count (horizontal scaling)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replicas":{"type":"integer"}},"required":["replicas"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/resources":{"get":{"summary":"Current RAM/CPU + plan maxima","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Set per-app RAM/CPU (clamped to plan)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"memoryMb":{"type":"integer"},"milliCpu":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/autoscale":{"get":{"summary":"Autoscale config","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Configure CPU-based autoscaling","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"min":{"type":"integer"},"max":{"type":"integer"},"cpuTargetPct":{"type":"integer"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/scale-out":{"get":{"summary":"Is the app served by the central edge?","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Serve the app via the central HA edge (enables redirect/rewrite/header rules)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/env":{"get":{"summary":"List env var names","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Set env vars (encrypted) + redeploy","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"},"target":{"type":"string","enum":["all","production","preview"]}},"required":["key","value"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}},"delete":{"summary":"Remove an env var + redeploy","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/env/verify":{"get":{"summary":"Check env vars against the running container WITHOUT revealing values (?key=NAME&expected=<sha256 of value>)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/domains":{"get":{"summary":"List custom domains (add ?verify=1 to re-check + emit cert)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Attach a custom domain","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"}},"required":["domain"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}},"delete":{"summary":"Detach a domain","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/domains/verify":{"post":{"summary":"Re-verify domains + trigger TLS cert emission (after setting the CNAME)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/volumes":{"get":{"summary":"List persistent volumes","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Create + attach a persistent volume","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"sizeGb":{"type":"integer"},"mountPath":{"type":"string"}},"required":["name","sizeGb","mountPath"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/volumes/{volId}":{"delete":{"summary":"Detach + delete a volume","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"volId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/volumes/{volId}/backups":{"get":{"summary":"List volume backups (snapshots)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"volId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Back up (snapshot) a volume now","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"volId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/volumes/{volId}/backups/{backupId}/restore":{"post":{"summary":"Restore a backup to a NEW volume attached to the app","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"volId","in":"path","required":true,"schema":{"type":"string"}},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/cdn":{"get":{"summary":"CDN status","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Enable/disable the CDN edge","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/github":{"get":{"summary":"GitHub link status","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Connect a repo for auto-deploy on push","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"branch":{"type":"string"}},"required":["repo"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/rollback":{"post":{"summary":"Roll back to a previous deployment (no rebuild)","tags":["Apps"],"security":[{"bearerAuth":["apps:deploy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:deploy)"}}}},"/apps/{id}/pause":{"post":{"summary":"Pause the app: tear down its containers, keep everything else (config, env, domains, volumes)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/resume":{"post":{"summary":"Resume a paused app by relaunching its last live image (no rebuild)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/migrate":{"post":{"summary":"Migrate the app to another runner (drain/rebalance/scale-up; zero-downtime)","tags":["Apps"],"security":[{"bearerAuth":["apps:deploy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"targetServerId":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:deploy)"}}}},"/apps/{id}/previews":{"get":{"summary":"List preview deployments (per branch)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Create a preview from a branch ({branch}, optional dbBranchId to wire+teardown a dedicated DB branch) — deploys to <slug>-<branch>","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branch":{"type":"string"},"dbBranchId":{"type":"string"},"dbEnvKey":{"type":"string"}},"required":["branch"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/rules":{"get":{"summary":"List redirect/rewrite/header rules","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Add a rule ({type, source, destination?/headerName?})","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["redirect","rewrite","header"]},"source":{"type":"string"},"destination":{"type":"string"},"headerName":{"type":"string"},"headerValue":{"type":"string"},"status":{"type":"integer"}},"required":["type","source"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/rules/{ruleId}":{"patch":{"summary":"Enable/disable a rule","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}},"delete":{"summary":"Delete a rule","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/restore":{"post":{"summary":"Restore an app from the trash (soft-delete) + redeploy","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/databases":{"get":{"summary":"List databases","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Create a managed Postgres (HA per plan)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"replicas":{"type":"integer"},"memoryMb":{"type":"integer"},"cpus":{"type":"integer"},"diskGb":{"type":"integer"},"projectId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}":{"get":{"summary":"Database detail (members, roles)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"patch":{"summary":"Rename the database ({name}) — metadata, connection unchanged","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"backupRetentionDays":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"delete":{"summary":"Delete a database","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/connection":{"get":{"summary":"Connection string (uri + readUri on HA)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}}},"/databases/{id}/backups":{"get":{"summary":"Backup ledger","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Trigger an on-demand base backup","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"full":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/restore":{"post":{"summary":"Restore to a new cluster (snapshot or PITR)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"targetTime":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/restore-dump":{"get":{"summary":"List managed-restore jobs","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Managed restore: restore an uploaded .sql dump into this DB — pre-seeds extensions (pgvector/Supabase), fail-fast (root-cause error), row-count summary ({dumpKey, preSeed?})","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dumpKey":{"type":"string"},"preSeed":{"type":"array","items":{"type":"object"}}},"required":["dumpKey"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/fix-ownership":{"post":{"summary":"Repair ownership: make the app role the OWNER of everything in the database (+ grants and default privileges). Idempotent — for databases left unusable by an older restore (owner=postgres → permission denied)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/restore-dump/upload-url":{"post":{"summary":"Presigned URL to upload a .sql dump (then POST /restore-dump with the returned key)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"gzip":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/restore-dump/{jobId}":{"get":{"summary":"Managed-restore job status (status, tableCounts, root-cause error)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}}},"/databases/{id}/metrics":{"get":{"summary":"Operational health metrics","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}}},"/databases/{id}/logs":{"get":{"summary":"Postgres logs of the leader (see OOM/crash cause)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}}},"/databases/{id}/extensions":{"get":{"summary":"List installable extensions (allowlist)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Install an extension (pgvector etc.)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/query":{"get":{"summary":"List tables (data browser)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Run SQL ({sql, write?}) — read-only unless write:true (then needs databases:write). SQL console.","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sql":{"type":"string"},"write":{"type":"boolean"}},"required":["sql"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}}},"/databases/{id}/replicas":{"get":{"summary":"Read-replica count + plan max","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Scale read replicas hot (no downtime)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replicas":{"type":"integer"}},"required":["replicas"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/publications":{"get":{"summary":"List logical-replication publications","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Create a publication (FOR ALL TABLES supported)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"allTables":{"type":"boolean"},"tables":{"type":"array","items":{"type":"string"}}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"delete":{"summary":"Drop a publication","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/apply-config":{"post":{"summary":"Recreate nodes to apply pending config (scoped backup credentials, limits)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/subscriptions":{"get":{"summary":"List inbound replication subscriptions, with lag and a cutover verdict","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Subscribe to an external Postgres (migrate with no downtime)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"},"publication":{"type":"string"},"copyData":{"type":"boolean"}},"required":["name","source","publication"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"delete":{"summary":"Drop a subscription","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/branches":{"get":{"summary":"Branch tree (production + branches)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Create a branch — full-copy clone, or schemaOnly:true for a fast structure-only branch (no data) ({name, fromTimestamp?, ttlHours?, protected?, schemaOnly?})","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"fromTimestamp":{"type":"string"},"ttlHours":{"type":"integer"},"protected":{"type":"boolean"},"schemaOnly":{"type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/branches/{branchId}":{"get":{"summary":"Branch detail","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"branchId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"patch":{"summary":"Set branch protection ({protected})","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"branchId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"protected":{"type":"boolean"}},"required":["protected"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"delete":{"summary":"Delete a branch (not production/protected)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"branchId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/branches/{branchId}/reset":{"post":{"summary":"Reset a branch from production (atomic swap: old branch serves until the fresh clone is healthy; connection re-points to the new clone)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"branchId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/roles":{"get":{"summary":"List database roles","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Create a least-privilege role ({name, password, login?, createdb?})","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"password":{"type":"string"},"login":{"type":"boolean"},"createdb":{"type":"boolean"}},"required":["name","password"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/roles/{roleName}":{"patch":{"summary":"Change a role password ({password})","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"roleName","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"}},"required":["password"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"delete":{"summary":"Drop a role (not the app user)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"roleName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/rotation":{"get":{"summary":"Password rotation policy + state (alternating dual-role, zero-downtime — AWS Secrets Manager rotation substitute)","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"put":{"summary":"Set the rotation policy ({intervalDays (0/null=off), graceDays?}) — enabling auto-rotation requires the pooler in file mode (migrate first)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intervalDays":{"type":"integer"},"graceDays":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/rotation/rotate":{"post":{"summary":"Rotate the password now (prepares the standby role, tests it, flips the active — previous credential stays valid until the next rotation)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/rotation/migrate":{"post":{"summary":"Migrate the pooler from legacy env mode to reloadable file mode (rotation-ready) — brief reconnect","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/rpc/{fn}":{"post":{"summary":"Data API RPC — call a Postgres function ({args:{…}}, write? for mutating funcs). PostgREST-style. Read-only by default","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fn","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object"},"write":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}}},"/databases/{id}/data/{table}":{"get":{"summary":"Data API — read rows (?select,?limit,?offset,?order,?col=op.val). Auto REST over tables, PostgREST-style","tags":["Databases"],"security":[{"bearerAuth":["databases:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:read)"}}},"post":{"summary":"Data API — insert rows ({rows:[…]}) RETURNING *. Values parameterized, identifiers validated","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}}},"required":["rows"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"patch":{"summary":"Data API — update rows ({set:{…}} + ?col=op.val filters, ≥1 required) RETURNING *","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"set":{"type":"object"}},"required":["set"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}},"delete":{"summary":"Data API — delete rows (?col=op.val filters, ≥1 required — never the whole table) RETURNING *","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/redis":{"get":{"summary":"List caches","tags":["Cache"],"security":[{"bearerAuth":["redis:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:read)"}}},"post":{"summary":"Create a managed Redis (HA per plan)","tags":["Cache"],"security":[{"bearerAuth":["redis:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"replicas":{"type":"integer"},"memoryMb":{"type":"integer"},"projectId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:write)"}}}},"/redis/{id}":{"get":{"summary":"Cache detail (members, roles)","tags":["Cache"],"security":[{"bearerAuth":["redis:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:read)"}}},"patch":{"summary":"Rename the cache ({name}) — metadata, connection unchanged","tags":["Cache"],"security":[{"bearerAuth":["redis:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:write)"}}},"delete":{"summary":"Delete a cache","tags":["Cache"],"security":[{"bearerAuth":["redis:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:write)"}}}},"/redis/{id}/connection":{"get":{"summary":"Connection string (rediss:// → current master)","tags":["Cache"],"security":[{"bearerAuth":["redis:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:read)"}}}},"/redis/{id}/backups":{"get":{"summary":"RDB snapshot ledger","tags":["Cache"],"security":[{"bearerAuth":["redis:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:read)"}}},"post":{"summary":"Trigger an on-demand RDB snapshot","tags":["Cache"],"security":[{"bearerAuth":["redis:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:write)"}}}},"/redis/{id}/apply-config":{"post":{"summary":"Re-provision nodes to apply current config (announces the brief outage)","tags":["Cache"],"security":[{"bearerAuth":["redis:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:write)"}}}},"/redis/{id}/restore":{"post":{"summary":"Restore to a new cache from a snapshot","tags":["Cache"],"security":[{"bearerAuth":["redis:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:write)"}}}},"/redis/{id}/metrics":{"get":{"summary":"Operational health metrics","tags":["Cache"],"security":[{"bearerAuth":["redis:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (redis:read)"}}}},"/buckets":{"get":{"summary":"List storage buckets","tags":["Storage"],"security":[{"bearerAuth":["storage:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:read)"}}},"post":{"summary":"Create an S3 bucket","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"projectId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/buckets/{id}":{"delete":{"summary":"Delete a bucket (soft-delete / trash)","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/buckets/{id}/versions":{"get":{"summary":"List object versions + delete-markers (file trash)","tags":["Storage"],"security":[{"bearerAuth":["storage:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:read)"}}},"post":{"summary":"Restore (undelete) an object ({key})","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/buckets/{id}/objects":{"get":{"summary":"Browse objects by prefix (folders + files with size/date)","tags":["Storage"],"security":[{"bearerAuth":["storage:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:read)"}}},"delete":{"summary":"Delete an object (?key=) — recoverable via versioning","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/buckets/{id}/objects/upload-url":{"post":{"summary":"Presigned URL to upload an object ({key, contentType})","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"contentType":{"type":"string"}},"required":["key"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/buckets/{id}/objects/download-url":{"get":{"summary":"Presigned URL to download an object (?key=)","tags":["Storage"],"security":[{"bearerAuth":["storage:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:read)"}}}},"/storage/keys":{"get":{"summary":"List S3 access keys","tags":["Storage"],"security":[{"bearerAuth":["storage:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:read)"}}},"post":{"summary":"Create a scoped S3 access key","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/storage/keys/{id}":{"delete":{"summary":"Revoke an S3 access key","tags":["Storage"],"security":[{"bearerAuth":["storage:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (storage:write)"}}}},"/jobs":{"get":{"summary":"List cron jobs","tags":["Jobs"],"security":[{"bearerAuth":["jobs:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:read)"}}},"post":{"summary":"Create a scheduled job","tags":["Jobs"],"security":[{"bearerAuth":["jobs:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"image":{"type":"string"},"command":{"type":"string"},"schedule":{"type":"string"},"memoryMb":{"type":"integer"},"timezone":{"type":"string"},"projectId":{"type":"string"}},"required":["name","image","schedule"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:write)"}}}},"/jobs/{id}":{"get":{"summary":"Job detail","tags":["Jobs"],"security":[{"bearerAuth":["jobs:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:read)"}}},"patch":{"summary":"Update a job","tags":["Jobs"],"security":[{"bearerAuth":["jobs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"string"},"command":{"type":"string"},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:write)"}}},"delete":{"summary":"Delete a job","tags":["Jobs"],"security":[{"bearerAuth":["jobs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:write)"}}}},"/jobs/{id}/runs":{"get":{"summary":"Run ledger","tags":["Jobs"],"security":[{"bearerAuth":["jobs:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:read)"}}}},"/jobs/{id}/trigger":{"post":{"summary":"Run the job now (manual)","tags":["Jobs"],"security":[{"bearerAuth":["jobs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (jobs:write)"}}}},"/events":{"get":{"summary":"Event timeline","tags":["Observability"],"security":[{"bearerAuth":["observability:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:read)"}}}},"/metrics":{"get":{"summary":"Consumption metrics (daily series + cost)","tags":["Observability"],"security":[{"bearerAuth":["observability:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:read)"}}}},"/alarms":{"get":{"summary":"List alarms","tags":["Observability"],"security":[{"bearerAuth":["observability:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:read)"}}},"post":{"summary":"Create a threshold alarm","tags":["Observability"],"security":[{"bearerAuth":["observability:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string"},"threshold":{"type":"integer"},"comparison":{"type":"string"}},"required":["metric","threshold"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:write)"}}}},"/alarms/{id}":{"delete":{"summary":"Delete an alarm","tags":["Observability"],"security":[{"bearerAuth":["observability:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:write)"}}}},"/anomalies":{"get":{"summary":"List anomaly detectors (statistical spike detection on cost/usage)","tags":["Observability"],"security":[{"bearerAuth":["observability:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:read)"}}},"post":{"summary":"Create an anomaly detector (metric, sigma, lookbackDays) — alerts when a day deviates >Nσ from its baseline","tags":["Observability"],"security":[{"bearerAuth":["observability:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string"},"sigma":{"type":"integer"}},"required":["metric"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:write)"}}}},"/anomalies/{id}":{"delete":{"summary":"Delete an anomaly detector","tags":["Observability"],"security":[{"bearerAuth":["observability:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (observability:write)"}}}},"/email/send":{"post":{"summary":"Send an email via your SMTP","tags":["Email"],"security":[{"bearerAuth":["email:send"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"from":{"type":"string"}},"required":["to","subject"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (email:send)"}}}},"/email/messages":{"get":{"summary":"Send ledger","tags":["Email"],"security":[{"bearerAuth":["email:send"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (email:send)"}}}},"/email/config":{"get":{"summary":"SMTP config status","tags":["Email"],"security":[{"bearerAuth":["email:write"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (email:write)"}}},"put":{"summary":"Set your SMTP credentials (encrypted)","tags":["Email"],"security":[{"bearerAuth":["email:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"smtp":{"type":"string"},"fromDefault":{"type":"string"}},"required":["smtp"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (email:write)"}}},"delete":{"summary":"Remove SMTP config","tags":["Email"],"security":[{"bearerAuth":["email:write"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (email:write)"}}}},"/checks":{"get":{"summary":"List checks (uptime & synthetic monitors)","tags":["Checks"],"security":[{"bearerAuth":["checks:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:read)"}}},"post":{"summary":"Create a check (URL/API with assertions)","tags":["Checks"],"security":[{"bearerAuth":["checks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"target":{"type":"string"},"type":{"type":"string"},"intervalSeconds":{"type":"integer"},"assertions":{"type":"array","items":{"type":"object"}},"webhookUrl":{"type":"string"}},"required":["name","target"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:write)"}}}},"/checks/{id}":{"get":{"summary":"Check detail (status, last latency)","tags":["Checks"],"security":[{"bearerAuth":["checks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:read)"}}},"patch":{"summary":"Update a check","tags":["Checks"],"security":[{"bearerAuth":["checks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string"},"intervalSeconds":{"type":"integer"},"assertions":{"type":"array","items":{"type":"object"}},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:write)"}}},"delete":{"summary":"Delete a check","tags":["Checks"],"security":[{"bearerAuth":["checks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:write)"}}}},"/checks/{id}/run":{"post":{"summary":"Run the check now (run-once) and return the result","tags":["Checks"],"security":[{"bearerAuth":["checks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:write)"}}}},"/checks/{id}/runs":{"get":{"summary":"Run history + metrics (uptime %, p95 latency)","tags":["Checks"],"security":[{"bearerAuth":["checks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (checks:read)"}}}},"/webhooks":{"get":{"summary":"List outbound webhooks","tags":["Webhooks"],"security":[{"bearerAuth":["webhooks:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (webhooks:read)"}}},"post":{"summary":"Create a webhook (url, events[]) — returns the signing secret once","tags":["Webhooks"],"security":[{"bearerAuth":["webhooks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}}},"required":["url"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (webhooks:write)"}}}},"/webhooks/{id}":{"patch":{"summary":"Enable or disable a webhook","tags":["Webhooks"],"security":[{"bearerAuth":["webhooks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"events":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (webhooks:write)"}}},"delete":{"summary":"Delete a webhook","tags":["Webhooks"],"security":[{"bearerAuth":["webhooks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (webhooks:write)"}}}},"/webhooks/{id}/deliveries":{"get":{"summary":"Delivery history (status, attempts, response code)","tags":["Webhooks"],"security":[{"bearerAuth":["webhooks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (webhooks:read)"}}}},"/log-drains":{"get":{"summary":"List log drains","tags":["Log Drains"],"security":[{"bearerAuth":["logs:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (logs:read)"}}},"post":{"summary":"Create a log drain (http|datadog sink, source filter)","tags":["Log Drains"],"security":[{"bearerAuth":["logs:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["http","datadog"]},"url":{"type":"string"},"headers":{"type":"object"},"sources":{"type":"array","items":{"type":"string"}}},"required":["type","url"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (logs:write)"}}}},"/log-drains/{id}":{"patch":{"summary":"Enable or disable a log drain","tags":["Log Drains"],"security":[{"bearerAuth":["logs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (logs:write)"}}},"delete":{"summary":"Delete a log drain","tags":["Log Drains"],"security":[{"bearerAuth":["logs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (logs:write)"}}}},"/logs":{"get":{"summary":"Query recent buffered logs","tags":["Log Drains"],"security":[{"bearerAuth":["logs:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (logs:read)"}}},"post":{"summary":"Ingest structured log records (forwarded to drains)","tags":["Log Drains"],"security":[{"bearerAuth":["logs:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object"}}},"required":["records"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (logs:write)"}}}},"/spend":{"get":{"summary":"Current month spend + limit + %","tags":["Spend Management"],"security":[{"bearerAuth":["spend:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (spend:read)"}}},"put":{"summary":"Set the monthly spend limit (amount, thresholds, hardStop)","tags":["Spend Management"],"security":[{"bearerAuth":["spend:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limitCents":{"type":"integer"},"hardStop":{"type":"boolean"},"thresholds":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (spend:write)"}}},"delete":{"summary":"Remove the spend limit","tags":["Spend Management"],"security":[{"bearerAuth":["spend:write"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (spend:write)"}}}},"/bots/policy":{"get":{"summary":"Get the bot policy","tags":["Bot Management"],"security":[{"bearerAuth":["bots:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (bots:read)"}}},"put":{"summary":"Set the bot policy (mode, allowVerified, difficulty)","tags":["Bot Management"],"security":[{"bearerAuth":["bots:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"string"},"automated":{"type":"string"},"likelyHuman":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (bots:write)"}}}},"/bots/evaluate":{"post":{"summary":"Classify a user-agent → allow|challenge|block","tags":["Bot Management"],"security":[{"bearerAuth":["bots:read"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userAgent":{"type":"string"},"ip":{"type":"string"}},"required":["userAgent"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (bots:read)"}}}},"/bots/challenge":{"post":{"summary":"Issue a proof-of-work challenge","tags":["Bot Management"],"security":[{"bearerAuth":["bots:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (bots:read)"}}}},"/bots/verify":{"post":{"summary":"Verify a solved challenge","tags":["Bot Management"],"security":[{"bearerAuth":["bots:read"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"challenge":{"type":"string"},"nonce":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (bots:read)"}}}},"/otel":{"get":{"summary":"Get the OTLP metrics exporter config","tags":["OpenTelemetry"],"security":[{"bearerAuth":["otel:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (otel:read)"}}},"put":{"summary":"Set the OTLP endpoint + auth headers","tags":["OpenTelemetry"],"security":[{"bearerAuth":["otel:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string"},"headers":{"type":"object"}},"required":["endpoint"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (otel:write)"}}},"delete":{"summary":"Remove the exporter","tags":["OpenTelemetry"],"security":[{"bearerAuth":["otel:write"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (otel:write)"}}}},"/dns/zones":{"get":{"summary":"List connected DNS zones","tags":["DNS"],"security":[{"bearerAuth":["dns:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:read)"}}},"post":{"summary":"Connect a zone (BYO provider token)","tags":["DNS"],"security":[{"bearerAuth":["dns:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"domain":{"type":"string"},"zoneId":{"type":"string"},"apiToken":{"type":"string"}},"required":["domain","zoneId","apiToken"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:write)"}}}},"/dns/zones/{id}":{"delete":{"summary":"Disconnect a zone","tags":["DNS"],"security":[{"bearerAuth":["dns:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:write)"}}}},"/dns/zones/{id}/records":{"get":{"summary":"List records","tags":["DNS"],"security":[{"bearerAuth":["dns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:read)"}}},"post":{"summary":"Create a record (A/AAAA/CNAME/TXT/MX/NS)","tags":["DNS"],"security":[{"bearerAuth":["dns:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"integer"},"proxied":{"type":"boolean"}},"required":["type","name","content"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:write)"}}}},"/dns/zones/{id}/records/{recordId}":{"put":{"summary":"Update a record","tags":["DNS"],"security":[{"bearerAuth":["dns:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"recordId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"integer"},"proxied":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:write)"}}},"delete":{"summary":"Delete a record","tags":["DNS"],"security":[{"bearerAuth":["dns:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"recordId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (dns:write)"}}}},"/queues":{"get":{"summary":"List queues","tags":["Queues"],"security":[{"bearerAuth":["queues:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:read)"}}},"post":{"summary":"Create a durable queue (SQS-like)","tags":["Queues"],"security":[{"bearerAuth":["queues:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"visibilityTimeoutSec":{"type":"integer"},"maxReceives":{"type":"integer"},"projectId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:write)"}}}},"/queues/{id}":{"get":{"summary":"Queue detail + stats","tags":["Queues"],"security":[{"bearerAuth":["queues:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:read)"}}},"patch":{"summary":"Reconfigure the queue ({visibilityTimeoutSec?, maxReceives?})","tags":["Queues"],"security":[{"bearerAuth":["queues:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"visibilityTimeoutSec":{"type":"integer"},"maxReceives":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:write)"}}},"delete":{"summary":"Delete a queue","tags":["Queues"],"security":[{"bearerAuth":["queues:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:write)"}}}},"/queues/{id}/messages":{"post":{"summary":"Send a message (delaySeconds/dedupeId optional)","tags":["Queues"],"security":[{"bearerAuth":["queues:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"object"},"delaySec":{"type":"integer"},"dedupeId":{"type":"string"}},"required":["body"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:write)"}}}},"/queues/{id}/receive":{"post":{"summary":"Receive/claim messages (visibility timeout)","tags":["Queues"],"security":[{"bearerAuth":["queues:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"max":{"type":"integer"},"visibilityTimeoutSec":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:write)"}}}},"/queues/{id}/ack":{"post":{"summary":"Ack (delete) a processed message","tags":["Queues"],"security":[{"bearerAuth":["queues:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"receiptHandle":{"type":"string"}},"required":["receiptHandle"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (queues:write)"}}}},"/workflows":{"get":{"summary":"List workflows","tags":["Workflows"],"security":[{"bearerAuth":["workflows:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:read)"}}},"post":{"summary":"Define a workflow (ordered steps)","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object"}},"projectId":{"type":"string"}},"required":["name","steps"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/workflows/{id}":{"get":{"summary":"Workflow detail","tags":["Workflows"],"security":[{"bearerAuth":["workflows:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:read)"}}},"patch":{"summary":"Reconfigure the workflow ({maxAttempts})","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxAttempts":{"type":"integer"}},"required":["maxAttempts"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}},"delete":{"summary":"Delete a workflow","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/workflows/{id}/runs":{"get":{"summary":"List runs","tags":["Workflows"],"security":[{"bearerAuth":["workflows:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:read)"}}},"post":{"summary":"Start a durable run","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/workflows/{id}/runs/{runId}":{"get":{"summary":"Run detail (status, step, journal)","tags":["Workflows"],"security":[{"bearerAuth":["workflows:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:read)"}}}},"/workflows/{id}/runs/{runId}/next":{"post":{"summary":"Worker: claim the next step (leased)","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/workflows/{id}/runs/{runId}/complete":{"post":{"summary":"Report step result (advances the run)","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"string"},"lease":{"type":"string"},"output":{"type":"object"}},"required":["step","lease"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/workflows/{id}/runs/{runId}/fail":{"post":{"summary":"Step failed → retry with backoff or fail run","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"string"},"lease":{"type":"string"},"error":{"type":"string"}},"required":["step","lease"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/workflows/{id}/runs/{runId}/sleep":{"post":{"summary":"Durable sleep (seconds to 90 days)","tags":["Workflows"],"security":[{"bearerAuth":["workflows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seconds":{"type":"integer"},"lease":{"type":"string"}},"required":["seconds","lease"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (workflows:write)"}}}},"/wordpress/accounts":{"get":{"summary":"List Managed WordPress accounts","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"post":{"summary":"Create a WordPress hosting account (OLS container, unlimited sites)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"planTier":{"type":"string"},"phpVersion":{"type":"string"},"projectId":{"type":"string"}},"required":["name","slug"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/accounts/{id}":{"get":{"summary":"Account detail","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"delete":{"summary":"Delete a WordPress account (and its sites)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/accounts/{id}/sites":{"get":{"summary":"List WordPress sites in the account","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"post":{"summary":"1-click install a WordPress site (wired to the shared Galera DB)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"adminUser":{"type":"string"},"adminEmail":{"type":"string"},"phpVersion":{"type":"string"},"wpVersion":{"type":"string"},"domain":{"type":"string"}},"required":["slug","title","adminUser","adminEmail"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/sites/{id}":{"get":{"summary":"Site detail","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"delete":{"summary":"Delete a WordPress site (drops its DB)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/sites/{id}/wp-cli":{"post":{"summary":"Run a sanitized WP-CLI command (AI-first; allowlist, no shell)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"}},"required":["command"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/sites/{id}/backups":{"get":{"summary":"List site backups","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"post":{"summary":"Back up the site (DB dump + files → S3)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/sites/{id}/domains":{"get":{"summary":"List custom domains of the site (each with the exact DNS record to create + live status)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"post":{"summary":"Connect your own domain (returns the DNS record to create)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"}},"required":["domain"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/wordpress/domains/{id}":{"post":{"summary":"Verify the domain DNS now (pending → dns_ok → active)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:read)"}}},"patch":{"summary":"Activate the domain: switch the WordPress site URL to it (requires DNS pointing)","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"primary":{"type":"boolean"}},"required":["primary"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}},"delete":{"summary":"Disconnect the domain","tags":["WordPress"],"security":[{"bearerAuth":["wordpress:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (wordpress:write)"}}}},"/apps/{id}/protection":{"get":{"summary":"Get Deployment Protection config (mode, scope, allowed IPs)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Set Deployment Protection (mode none|password|trusted_ips, scope preview|all, password, allowedIps[])","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["none","password","trusted_ips"]},"scope":{"type":"string","enum":["preview","all"]},"password":{"type":"string"},"allowedIps":{"type":"array","items":{"type":"string"}}},"required":["mode"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/retention":{"get":{"summary":"Get deployment retention policy (keepLast)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"put":{"summary":"Set deployment retention ({keepLast} — keep the newest N deployments; null=keep all)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keepLast":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/registry":{"put":{"summary":"Set/rotate private-registry credentials for image deploys — basic {registry, registryUsername, registryPassword} or ECR {registry, registryAwsRegion, registryAwsAccessKeyId, registryAwsSecretKey} (fresh token per deploy) or {clear:true}. Creds encrypted, never returned.","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"registry":{"type":"string"},"registryUsername":{"type":"string"},"registryPassword":{"type":"string"},"registryAwsRegion":{"type":"string"},"registryAwsAccessKeyId":{"type":"string"},"registryAwsSecretKey":{"type":"string"},"clear":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/loadtest":{"post":{"summary":"Capacity report / load test — hammer the app URL at bounded concurrency for N seconds → rps + p50/p95/p99 + saturation signal ({path, durationSec≤60, concurrency≤100}). Size before trusting real traffic.","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"durationSec":{"type":"integer"},"concurrency":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/protection/evaluate":{"post":{"summary":"Evaluate access for a deployment → allow|unauthorized|block (body: ip, password)","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}}},"/apps/{id}/deploy-hooks":{"get":{"summary":"List deploy hooks","tags":["Apps"],"security":[{"bearerAuth":["apps:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:read)"}}},"post":{"summary":"Create a deploy hook (secret URL that triggers a deploy)","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/apps/{id}/deploy-hooks/{hookId}":{"delete":{"summary":"Delete a deploy hook","tags":["Apps"],"security":[{"bearerAuth":["apps:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"hookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (apps:write)"}}}},"/registry/repositories":{"get":{"summary":"List image repositories (push/pull via docker on /v2)","tags":["Container Registry"],"security":[{"bearerAuth":["registry:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (registry:read)"}}}},"/registry/repositories/{name}/tags":{"get":{"summary":"List tags of a repo with digest, size and pushed date (ECR-like)","tags":["Container Registry"],"security":[{"bearerAuth":["registry:read"]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (registry:read)"}}}},"/registry/repositories/{name}/tags/{tag}":{"delete":{"summary":"Delete a tag (dereferences the image; space is reclaimed by POST /registry/gc)","tags":["Container Registry"],"security":[{"bearerAuth":["registry:write"]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (registry:write)"}}}},"/databases/{id}/pause":{"post":{"summary":"Pause a cluster (stops containers, keeps volumes and data — like RDS stop / Neon suspend)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/databases/{id}/resume":{"post":{"summary":"Resume a paused cluster (starts containers; recreates what is missing)","tags":["Databases"],"security":[{"bearerAuth":["databases:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (databases:write)"}}}},"/registry/gc":{"post":{"summary":"Garbage-collect unreferenced blobs (dryRun by default). Optional keepLast prunes old tags","tags":["Container Registry"],"security":[{"bearerAuth":["registry:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"string"},"dryRun":{"type":"boolean"},"keepLast":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (registry:write)"}}}},"/audit":{"get":{"summary":"Audit log entries — who did what (security/config changes), filter by category/type/actor/date. Owner/admin only","tags":["Audit Log"],"security":[{"bearerAuth":["audit:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (audit:read)"}}}},"/audit/export":{"get":{"summary":"Export the audit log as CSV (same filters). Owner/admin only","tags":["Audit Log"],"security":[{"bearerAuth":["audit:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (audit:read)"}}}},"/members":{"get":{"summary":"List team members and pending invitations","tags":["Members"],"security":[{"bearerAuth":["members:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:read)"}}},"post":{"summary":"Invite a member by email (role admin|member)","tags":["Members"],"security":[{"bearerAuth":["members:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["email"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:write)"}}}},"/members/two-factor":{"get":{"summary":"Organization 2FA policy and how many members still lack it","tags":["Members"],"security":[{"bearerAuth":["members:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:read)"}}},"put":{"summary":"Require (or stop requiring) 2FA for the whole team, with a grace period","tags":["Members"],"security":[{"bearerAuth":["members:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"required":{"type":"boolean"},"graceDays":{"type":"integer"}},"required":["required"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:write)"}}}},"/members/{userId}":{"patch":{"summary":"Change a member role (admin|member)","tags":["Members"],"security":[{"bearerAuth":["members:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]}},"required":["role"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:write)"}}},"delete":{"summary":"Remove a member from the team","tags":["Members"],"security":[{"bearerAuth":["members:write"]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:write)"}}}},"/members/invitations/{id}":{"delete":{"summary":"Revoke a pending invitation","tags":["Members"],"security":[{"bearerAuth":["members:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (members:write)"}}}},"/flags":{"get":{"summary":"List feature flags","tags":["Feature Flags"],"security":[{"bearerAuth":["flags:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (flags:read)"}}},"post":{"summary":"Create a flag (key, enabled, rolloutPercent)","tags":["Feature Flags"],"security":[{"bearerAuth":["flags:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"enabled":{"type":"boolean"},"rolloutPct":{"type":"integer"}},"required":["key"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (flags:write)"}}}},"/flags/{key}":{"get":{"summary":"Flag detail","tags":["Feature Flags"],"security":[{"bearerAuth":["flags:read"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (flags:read)"}}},"patch":{"summary":"Toggle or set rollout %","tags":["Feature Flags"],"security":[{"bearerAuth":["flags:write"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"rolloutPct":{"type":"integer"},"rules":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (flags:write)"}}},"delete":{"summary":"Delete a flag","tags":["Feature Flags"],"security":[{"bearerAuth":["flags:write"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (flags:write)"}}}},"/flags/evaluate":{"post":{"summary":"Evaluate all flags for a context (stable per user) — the SDK endpoint","tags":["Feature Flags"],"security":[{"bearerAuth":["flags:read"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"object"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (flags:read)"}}}},"/status-pages":{"get":{"summary":"List status pages","tags":["Status Pages"],"security":[{"bearerAuth":["status:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:read)"}}},"post":{"summary":"Create a status page (public at /status/<slug>)","tags":["Status Pages"],"security":[{"bearerAuth":["status:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["slug"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:write)"}}}},"/status-pages/{id}":{"get":{"summary":"Status page detail","tags":["Status Pages"],"security":[{"bearerAuth":["status:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:read)"}}},"patch":{"summary":"Update name/description/checkIds","tags":["Status Pages"],"security":[{"bearerAuth":["status:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:write)"}}},"delete":{"summary":"Delete a status page","tags":["Status Pages"],"security":[{"bearerAuth":["status:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:write)"}}}},"/status-pages/{id}/incidents":{"get":{"summary":"List incidents","tags":["Status Pages"],"security":[{"bearerAuth":["status:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:read)"}}},"post":{"summary":"Post an incident ({title, impact, status, body}) — shown on the public page","tags":["Status Pages"],"security":[{"bearerAuth":["status:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"impact":{"type":"string"},"status":{"type":"string"},"body":{"type":"string"}},"required":["title"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:write)"}}}},"/status-pages/{id}/incidents/{incidentId}":{"patch":{"summary":"Update an incident (status/impact/body; status:resolved to close)","tags":["Status Pages"],"security":[{"bearerAuth":["status:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"body":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (status:write)"}}}},"/heartbeats":{"get":{"summary":"List heartbeats","tags":["Heartbeats"],"security":[{"bearerAuth":["heartbeats:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (heartbeats:read)"}}},"post":{"summary":"Create a heartbeat (returns pingUrl; ping it from your cron)","tags":["Heartbeats"],"security":[{"bearerAuth":["heartbeats:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"periodSeconds":{"type":"integer"},"graceSeconds":{"type":"integer"},"webhookUrl":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (heartbeats:write)"}}}},"/heartbeats/{id}":{"get":{"summary":"Heartbeat detail","tags":["Heartbeats"],"security":[{"bearerAuth":["heartbeats:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (heartbeats:read)"}}},"patch":{"summary":"Update name/period/grace/webhook","tags":["Heartbeats"],"security":[{"bearerAuth":["heartbeats:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"periodSeconds":{"type":"integer"},"graceSeconds":{"type":"integer"},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (heartbeats:write)"}}},"delete":{"summary":"Delete a heartbeat","tags":["Heartbeats"],"security":[{"bearerAuth":["heartbeats:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (heartbeats:write)"}}}},"/config":{"get":{"summary":"List config keys (values masked)","tags":["Config & Secrets"],"security":[{"bearerAuth":["config:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (config:read)"}}},"put":{"summary":"Set a value (key, value) — encrypted at rest","tags":["Config & Secrets"],"security":[{"bearerAuth":["config:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (config:write)"}}}},"/config/pull":{"get":{"summary":"Pull all config decrypted → { key: value } (for your app/agent)","tags":["Config & Secrets"],"security":[{"bearerAuth":["config:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (config:read)"}}}},"/config/{key}":{"delete":{"summary":"Delete a config key","tags":["Config & Secrets"],"security":[{"bearerAuth":["config:write"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (config:write)"}}}},"/analytics/sites":{"get":{"summary":"List analytics sites","tags":["Web Analytics"],"security":[{"bearerAuth":["analytics:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:read)"}}},"post":{"summary":"Create a site (returns the beacon snippet)","tags":["Web Analytics"],"security":[{"bearerAuth":["analytics:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:write)"}}}},"/analytics/sites/{id}":{"get":{"summary":"Site detail","tags":["Web Analytics"],"security":[{"bearerAuth":["analytics:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:read)"}}},"delete":{"summary":"Delete a site and its events","tags":["Web Analytics"],"security":[{"bearerAuth":["analytics:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:write)"}}}},"/analytics/sites/{id}/stats":{"get":{"summary":"Stats: pageviews, unique visitors, top pages & referrers (?days=30)","tags":["Web Analytics"],"security":[{"bearerAuth":["analytics:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:read)"}}}},"/errors":{"get":{"summary":"Ingest token + error groups (message, level, count, resolved)","tags":["Error Tracking"],"security":[{"bearerAuth":["errors:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (errors:read)"}}}},"/errors/groups/{id}":{"patch":{"summary":"Resolve or reopen a group ({resolved})","tags":["Error Tracking"],"security":[{"bearerAuth":["errors:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["resolved","open"]}},"required":["status"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (errors:write)"}}},"delete":{"summary":"Delete an error group","tags":["Error Tracking"],"security":[{"bearerAuth":["errors:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (errors:write)"}}}},"/speed-insights":{"get":{"summary":"Core Web Vitals (p75 per metric) for all sites (?days=30)","tags":["Speed Insights"],"security":[{"bearerAuth":["analytics:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:read)"}}}},"/speed-insights/{id}":{"get":{"summary":"Core Web Vitals of one site (p75: LCP/CLS/FCP/TTFB + samples)","tags":["Speed Insights"],"security":[{"bearerAuth":["analytics:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (analytics:read)"}}}},"/sandboxes":{"get":{"summary":"Recent sandbox runs","tags":["Sandboxes"],"security":[{"bearerAuth":["sandboxes:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1..200, default 50). Presence enables pagination.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous response’s nextCursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (sandboxes:read)"}}},"post":{"summary":"Run an image+command once ({image, command?}) → exit code + logs","tags":["Sandboxes"],"security":[{"bearerAuth":["sandboxes:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string"},"command":{"type":"string"},"timeoutSec":{"type":"integer"},"memoryMb":{"type":"integer"}},"required":["image"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (sandboxes:write)"}}}},"/sandboxes/{id}":{"get":{"summary":"Sandbox run detail (status, exitCode, logs, duration)","tags":["Sandboxes"],"security":[{"bearerAuth":["sandboxes:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (sandboxes:read)"}}}},"/images/config":{"get":{"summary":"Public token + allowlisted source hosts + /img base URL","tags":["Image Optimization"],"security":[{"bearerAuth":["images:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (images:read)"}}},"put":{"summary":"Set allowed source hosts ({allowedHosts})","tags":["Image Optimization"],"security":[{"bearerAuth":["images:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedHosts":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (images:write)"}}}},"/images/usage":{"get":{"summary":"Usage: requests, bytes in/out and bytes saved (?days=30)","tags":["Image Optimization"],"security":[{"bearerAuth":["images:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (images:read)"}}}},"/waf/rules":{"get":{"summary":"List WAF rules (by priority)","tags":["Firewall"],"security":[{"bearerAuth":["waf:read"]}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (waf:read)"}}},"post":{"summary":"Add a rule ({action, matchType, matchValue, priority?})","tags":["Firewall"],"security":[{"bearerAuth":["waf:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["allow","block","rate_limit"]},"ip":{"type":"string"},"cidr":{"type":"string"},"country":{"type":"string"},"path":{"type":"string"},"method":{"type":"string"},"userAgent":{"type":"string"},"priority":{"type":"integer"},"rateLimit":{"type":"integer"},"rateWindowSec":{"type":"integer"},"rateKey":{"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (waf:write)"}}}},"/waf/rules/{id}":{"patch":{"summary":"Enable/disable a rule ({enabled})","tags":["Firewall"],"security":[{"bearerAuth":["waf:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"priority":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (waf:write)"}}},"delete":{"summary":"Delete a rule","tags":["Firewall"],"security":[{"bearerAuth":["waf:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (waf:write)"}}}},"/waf/evaluate":{"post":{"summary":"Evaluate a request ({ip,country,path,method,userAgent}) → {action, ruleId}","tags":["Firewall"],"security":[{"bearerAuth":["waf:read"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"string"},"country":{"type":"string"},"path":{"type":"string"},"method":{"type":"string"},"userAgent":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Missing or invalid token"},"403":{"description":"Token is missing the required scope (waf:read)"}}}}}}