cirrux

API

Cirrux has a public HTTP API for building on top of your workspace. Requests and responses are JSON, served under the base URL https://api.cirrux.co/public_api. Every endpoint below is versioned under /v1.

Authentication

Bearer tokens & scopes

Authenticate every request with a bearer token in the Authorization header. Tokens carry scopes that gate what each endpoint can do.

Authorization: Bearer <access-token>
Content-Type: application/json

Two kinds of token exist: workspace API keys (created by a workspace admin) and user-scoped OAuth access tokens(issued to an app acting on behalf of a signed-in user). Some surfaces — the whole Drive API included — act on a specific user’s files and therefore require a user-scoped OAuth token; API keys are rejected on those endpoints.

The available scopes are:

FieldTypeRequiredDescription
user.profilescopenoRead the signed-in user’s profile.
email.readscopenoRead mailboxes, threads and messages.
email.writescopenoModify mail (labels, drafts, state).
email.sendscopenoSend mail.
drive.readscopenoList, read and download Drive files and folders.
drive.createscopenoCreate folders and upload files.
drive.updatescopenoRename and move files and folders.
drive.deletescopenoTrash and permanently delete files and folders.

Errors

Error responses

Errors return a non-2xx status and a JSON body with a machine-readable error code and a human error_description. Some errors add extra fields (for example max_size).

{
  "error": "insufficient_scope",
  "error_description": "Required scope: drive.update"
}
StatuserrorWhen
400invalid_requestMissing or malformed Authorization header.
400invalid_jsonThe request body is not valid JSON.
401invalid_requestUnknown or expired API key / access token.
403forbiddenThe endpoint requires a user-scoped OAuth token.
403insufficient_scopeThe token is missing the scope the endpoint requires.
404not_foundThe resource does not exist or is not visible to you.
429Rate limited (600 requests / minute, authenticated).

Per-resource error codes (e.g. name_taken, file_too_large, sync_token_invalid) are documented alongside each endpoint.