Skip to content
cloudhostDocs
API reference

The public API

Everything the dashboard, the CLI and the MCP server do is a call to this API. This page has the basics; every route, one by one, is in the groups below, generated from the OpenAPI file.

Base URL#

Variables
export KEY=chk_live_…
curl -H "Authorization: Bearer $KEY" https://api.ibel.ai/v1/whoami

Every route is under https://api.ibel.ai/v1, except the MCP server at /mcp. Requests and responses are JSON, except where a route says otherwise (file and build uploads, the live log). Unknown fields are ignored.

Credentials#

CredentialFormMade byLifetime
API keychk_live_<id>_<secret> · chk_test_…the dashboard, cloudhost keys create, cloudhost loginuntil revoked or expired; shown once
Sessionchs_<id>_<secret>signing in to the dashboard12 hours idle, 30 days at most

Send the credential as Authorization: Bearer …. Both kinds work on every route, except routes that need a session (403 session_only). A missing, invalid, expired or revoked credential gets 401 unauthorized.

Roles and step-up#

Every key and every team member has one role: owner, admin, developer, billing or viewer; the table is in Teams and roles. Each route in the reference says which roles may call it.

Sensitive routes called with a dashboard session need a second factor confirmed in the last 10 minutes, or they return 403 step_up_required. API keys pass.

Errors#

Error shape
{"error": {"code": "not_found", "message": "no function named shop"}}

code is stable and meant for programs; message is for people and may change. Another team's resources are never shown: 404 not_found, as if they did not exist.

StatusCodeWhen
400bad_json · bad_param · bad_inputthe body is not JSON, a query parameter is malformed, or another value is
401unauthorizedno valid credential
403forbidden · session_only · step_up_requiredthe role cannot, a session is needed, or step-up
404not_foundno such route, or no such resource in this team
405methodthe path exists, the method does not
413too_largethe body is over the route's limit
429rate_limited · resend_waitover a limit (sign-in, step-up, invites, device login)
500internalan unexpected failure

Money, times and periods#

  • Every amount is integer rials (currency: "IRR"). 1 toman = 10 rials.
  • Times are ISO 8601 in UTC (2026-11-04T09:30:00.000Z).
  • Billing periods are Jalali months, YYYY-MM (for example 1405-08), from midnight Tehran time on the first.
  • Every response carries a cloudhost-version header with the API version.

Lists and limits#

Lists have no cursor pagination yet: they return everything, or the newest entries up to a fixed number.

ListReturns
versionsnewest 100
buildsnewest 50
build log1000 lines per call; after for more
logslimit 1–1000 (default 100)
auditlimit 1–500 (default 100)
wallet transactionsnewest 200
alert eventsnewest 50

Names and addresses#

Functions, apps, databases, caches and branches are named with one DNS label: lowercase letters, digits and hyphens, 1–63 characters, starting and ending with a letter or digit, with no -- (it separates a branch from a name). Buckets are the same with 3–63 characters. Names are unique across the platform; a name another team holds gets 409 name_taken.

ResourceAddress
Functionhttps://<name>.fn.trustpage.ir
Apphttps://<name>.app.trustpage.ir
Previewhttps://<branch>--<name>.app.trustpage.ir (or .fn.trustpage.ir)
Database<db>.database.trustpage.ir:5432, user app, database <db>; a branch: <branch>--<db>
Cache<name>.cache.trustpage.ir:6379 and https://<name>.cache.trustpage.ir
Storagehttps://storage.trustpage.ir, region us-east-1

Reference groups