Platforms API reference

Reference of the Management API for platforms: organizations, tokens, projects, limits, usage, webhooks, claim links. OpenAPI 3.1 document included.

Base URL https://stitchdb.com/platform/v1, JSON in and out, Authorization: Bearer <token>. The full machine-readable reference is the OpenAPI 3.1 document. Database, migrations, types, branches and functions: see Management API.

Method and pathScopeDoes
GET /organizations—Organizations this credential can act in
GET|POST /organizations/<org>/tokens, DELETE …/<id>people onlyOrganization tokens
GET /organizations/<org>/usageusage:readUsage of every project (?from&to&format=csv)
GET /organizations/<org>/billingbilling:readPlan, limits, project count (owner)
GET|POST /organizations/<org>/webhooks, PATCH|DELETE …/<id>webhooks:writeWebhook endpoints; …/test, …/rotate-secret, …/deliveries, …/deliveries/<id>/redeliver
GET|POST /projectsprojects:read / writeList (labels, status, pagination) / create
GET|PATCH|DELETE /projects/<ref>projects:read / writeRead / rename, labels, expiry / delete
POST /projects/<ref>/pause, /restoreprojects:writePause / restore
GET|PATCH /projects/<ref>/limitsprojects:read / writePer-project caps
GET /projects/<ref>/usageusage:readDaily usage
GET /projects/<ref>/api-keys, POST …/rotateprojects:read / writeKeys / rotation
GET|POST /projects/<ref>/tokens, DELETE …/<id>projects:readShort-lived project tokens
GET|PATCH /projects/<ref>/config/authprojects:read / auth:writeAuth settings (admin)
GET|POST /projects/<ref>/claim-links, DELETE …/<id>projects:writeClaim links

#Errors and limits

Errors are { "error": "message", "code"?: "…" } with the HTTP status: 400 invalid input, 401 invalid or expired token, 403 missing scope (code: missing_scope) or role, address not allowed (ip_not_allowed), 404 not found or not yours, 409 conflict, 422 idempotency mismatch, 429 rate limited, 503 no capacity (code: capacity). Each token has its own rate (default 5 requests/s for personal credentials, the token's rate_per_sec for organization tokens).