Skip to content
CirrusDocs

API reference

API overview

The base URL, how to authenticate, the shape of every answer, and the list of operations.

Base URL#

Every path in this reference starts with /v1, after the host: https://api.cirrusmail.example/v1. The host is a placeholder until the product is live. Against a local copy of the API it is http://localhost:8090/v1. Requests and answers are JSON, over HTTPS in production.

Authentication#

Send an API key as a bearer token: Authorization: Bearer cirrus_live_…. Each operation says which scope the key needs. See Authentication and API keys.

Operations#

These 9 operations are everything an API key can call. The document they come from also describes the dashboard's own routes; those use a signed-in session, are not part of the developer API and are not listed here.

The shape of every answer#

  • One thing comes back as { "data": { … } }.
  • A long list comes back with a pagination member. See Pagination.
  • A short list, bounded by what it describes, comes back whole as { "data": [ … ] } with no pagination.
  • Every error is { "error": { "code", "message", … } }. See Errors.
A paginated list
{
  "data": [ … ],
  "pagination": { "has_more": true, "next_cursor": "…" }
}

Every timestamp is RFC 3339 in UTC and ends in Z, never an offset. A request body must be one JSON object; a field the operation does not accept is rejected, not ignored.

Answers every operation can give#

These are not repeated on each operation.

Errors every operation can answer with
StatusCodeMeaning
400invalid_jsonThe body is not one JSON object, or has a field the endpoint does not accept.
413body_too_largeThe body is larger than 1 MB.
404not_foundNo such route, or no such resource. An ID in a path that is not a valid UUID is a 404 too.
405method_not_allowedThe route exists but not for this method.
500internal_errorSomething went wrong on the server.