Using the API

Everything the console does.

One REST API, one token, and an OpenAPI document that is generated from the same route table the server routes with — so it cannot describe an endpoint that does not exist.

01

Get a token

  1. Switch on API access for your account. It requires two-factor authentication or a passkey, and is off until you do.
  2. On the API page, create a token. Choose read-only unless the thing using it needs to write.
  3. Copy it. It is shown once.
curl -H "Authorization: Bearer orb_…" https://dash.yunzheng.space/api/v1/me
Value
Base URLhttps://dash.yunzheng.space/api/v1
OpenAPIGET /api/v1/openapi.json — no authentication needed
Rate limit300 requests per minute per token
Tokens per account10
02

When it says no

{ "error": { "code": "validation_error", "message": "TTL must be between 60 and 86400." } }
CodeHTTPMeans
unauthorized401No token, or it is invalid, expired, or API access is off for the account.
forbidden403A read-only token on a write route, or a team role that is not enough.
not_found404It does not exist — or it is not yours, which reads the same on purpose.
limit_exceeded400A quota on your pack.
conflict409Already exists, or the name is taken.
rate_limited429Over 300 requests in a minute.
not_found is returned for resources that exist but belong to somebody else. Do not treat a 404 as proof that an id is free.
03

Listing things

Most lists use offset paging: limit (1 to 500, default 100) and offset. The response carries pagination.next_offset, and the last page has it as null.

Shield request logs use a keyset cursor instead, because an offset into a list that is still being written skips and repeats rows. Pass the previous page's next_cursor.

04

Questions

Can a token do everything I can?

Almost. Token management, session management and the billing checkout accept only a browser session — a token cannot mint another token or change what you pay.

How do I get told when something changes?

Webhooks. Register an endpoint and we sign each delivery, so you can confirm it came from us rather than from somebody who learnt your URL.

Next

Related

Getting started

How an Orbit account is organised, what lives where in the console, and the shortest path from signing in to serving a name from our network.

DNS hosting

Add a zone, point your registrar at our name servers, and manage records. Includes weighted answers, health-checked records, ALIAS at the apex and zone-file import.

Connect a hostname

Delegate the whole domain, delegate one hostname, or add a CNAME and leave your DNS where it is. What each one costs you and when to pick it.

← All documentation