Rolyx API openapi.json

Tokens and scopes

Every request needs a personal token, sent as a bearer token. Make one in Rolyx under Settings → API (you need to be signed in with sync on).

Authorization: Bearer rlx_1a2b3c4d_…

Tokens

  • A token looks like rlx_, 8 hex characters, _, then 64 hex characters (256 random bits).
  • It is shown once, when you make it. Rolyx stores only its SHA-256 hash, so a lost token can't be recovered: revoke it and make another.
  • An account can have up to 20 tokens. Each has a name, its scopes and an expiry (never, 30, 90 or 365 days).
  • Settings → API shows when each token was last used. Revoking a token stops it at once.
  • Keep tokens out of code and repositories; read them from the environment, as $ROLYX_TOKEN in these docs.

A missing, malformed, expired or revoked token gets 401 unauthorized. A valid token without the scope an endpoint needs gets 403 insufficient_scope.

Scopes

A token can do only what its scopes allow. There is no wildcard: pick each one the script needs.

ScopeAllowsEndpoints
nodes:readRead nodes, days and types.
nodes:writeAdd and change nodes.
nodes:deleteDelete nodes and everything under them.
searchRun searches.
anyAny valid token.

Spaces

A token reaches the spaces its owner can reach, with the owner's role in each: your personal space and every shared item you are a member of. GET /v1/me lists them. Anything a token can't see answers 404, as if it didn't exist.

  • Reads (nodes:read, search) cover every space you can read, viewer ones included.
  • Writes (nodes:write, nodes:delete) reach your personal space and the shared items where you are owner or editor; a viewer's space answers 404.
  • A new node joins its parent's space. In a shared item it can only take that item's own custom types.
  • Days and the Journal are personal only: GET /v1/days and day:… parents never reach a shared item.
  • A move stays within one space: moving into, out of or between shared items is done in the app, as is moving the top of a shared item. The top of a shared item, or a node holding one, can't be deleted here (stop sharing it in the app first).