cloadyDocs
API Reference
Docs4 min read

API Overview

Authentication, scopes, conventions and errors for the Cloady REST API.

Everything you can do in the dashboard, you can do over HTTP: workspaces, applications, deploys, domains, vars, members. It is the same API the dashboard itself calls.

Base URL

https://cloady.com/api

All requests and responses are application/json. Send Content-Type: application/json on any request with a body.

Authentication

Authenticate with a personal API token. Pass it as a bearer token:

Authorization: Bearer cldy_...

A token acts as you: it reaches the workspaces you belong to, with your role in each. The secret is shown once, at creation, and cannot be retrieved afterwards — if you lose it, revoke it and create a new one.

A token can carry an expiry (never, 30d, 90d, 1y) and can be revoked at any time. A missing, malformed, expired, or revoked token gets 401 unauthorized.

A token can also be pinned to one workspace. Requests to any other workspace then return 403 forbidden, whatever your role there.

Create a token

From the dashboard: Account → API tokens (see the Dashboard Guide). Pick a name, a scope and an expiry — the secret is displayed once, so copy it immediately. Minting a token itself needs full scope or a signed-in browser session. API Tokens covers every step, each scope, and how the CLI, SDKs, Terraform and MCP take a token.

Token scopes

Every token is minted with one scope that bounds what it can do:

  • read — read-only. List and inspect workspaces, applications, deploys, logs. No changes.
  • deploy — everything read can do, plus what a developer does: deploy, redeploy, start, stop and restart, manage domains and vars, and delete an application (which permanently deletes its data).
  • full — unrestricted. Everything deploy can do, plus administrative actions: creating workspaces, workspace settings, members, integrations and billing.

Pick the narrowest scope that covers your use case — a CI deploy key wants deploy, not full.

Workspace roles

Scope bounds the token; your role in the workspace bounds the request. Workspace endpoints require a minimum role, ranked lowest to highest:

  • viewer — read the workspace and its applications.
  • developer — deploy and operate applications: deploy, restart, logs, shell, database, domains and vars, and deleting an application.
  • admin — manage workspace settings, members, integrations and single sign-on.
  • owner — everything, including billing and deleting the workspace.

A request below the endpoint's minimum role returns 403 forbidden. A workspace you aren't a member of returns 404 not_found — membership is never disclosed.

The authorization chain: a workspace request clears the token, membership, permission and application gates in order, and each gate answers with its own error code. The permission gate compares the endpoint's minimum role against both the caller's workspace role and the ceiling the token's scope allows: read reaches viewer, deploy reaches developer, full reaches owner.A workspace request clears these gates in order — the first one that fails is the answer you get.Tokenbearer cldy_…Membershipare you a memberPermissionrole and scopeApplicationenv + regionOperationhandler runs401 unauthorized404 not_found(membership hidden)403 forbidden(role or scope)404 not_found400 region_requiredThe endpoint's minimum role must fit inside your workspace role — and inside your token's ceiling:read → viewerdeploy → developerfull → ownerSo a deploy token can never call an admin endpoint, however high your workspace role.

Env + region query convention

Each application runs in one region and one environment — production, preview or development — and its name is unique within a workspace and environment. Dashboard URLs carry region and environment as path segments, but API requests carry them as query params:

?env=<production|preview|development>&region=<regionId>
  • env defaults to production when omitted.
  • region is optional and rarely needed. Pass it only when the same name exists in more than one region: those requests return 400 region_required, and you retry with ?region=.
GET /api/workspaces/acme/apps/my-blog?env=production&region=usw1

Region ids come from GET /api/regions. Any workspace can deploy to any of them; the region is chosen when you deploy the application.

Applications and workspaces are addressed by name in these paths, and an application's public address follows its name too — so renaming changes both the URL you call and the URL your app is served on. Update any scripts that reference the old name. Renaming is still the safe move: deleting an application permanently deletes its data.

Streaming endpoints

App status, metrics, deploy progress, deploy logs and ticket messages stream server-sent events. Send Accept: text/event-stream for the live stream; without that header you get the current state once, as ordinary JSON, which is what a script wants. Service logs do the same, answering a plain request with the last 200 lines.

Error shape

Errors carry a machine-readable code:

JSON
{ "error": { "code": "not_found", "message": "App my-blog not found" } }

Read the code as body.error.code and branch on that, never on the message or the status alone. Validation failures (bad_body) add a details array naming the fields that were wrong.

StatusTypical codeMeaning
400bad_body, bad_reference, bad_regionMalformed body, missing field, or a name/region that doesn't exist
400region_requiredThe name matches applications in more than one region — retry with ?region=
401unauthorizedMissing, expired or revoked token
403forbiddenRole too low, token scope too low, or token pinned to another workspace
402payment_requiredThe change would cost money, since neither the free tier nor a free trial covers it, and there is no card on file, or the card was declined
402payment_failed, payment_action_requiredA card payment, such as a domain order, was declined or needs the bank's confirmation
404not_foundWorkspace or application not found
503billing_misconfiguredBilling is unavailable

Example

List your workspaces:

Terminal
curl https://cloady.com/api/workspaces \
  -H "Authorization: Bearer cldy_..."
JSON
{
  "workspaces": [ /* ... */ ]
}

For the full endpoint catalog — paths, methods, params, and bodies — see the endpoint pages in the sidebar, starting with listWorkspaces.

On this page