Get started

Errors & limits

Every failure has the same body: { "code", "message" }. The code is stable to build on; the message is for people.

Error codes

StatusCode
400BAD_REQUEST

Malformed request: bad ids, dates or ranges, an unknown metric or time zone, a write body that does not fit, or an Idempotency-Key already used for a different request. The message says which.

401UNAUTHORIZED

Missing, invalid, or revoked API key.

402SUBSCRIPTION_INACTIVE

You own this server, but cormac+ is not active on it.

403FORBIDDEN_SCOPE

The key wasn't given the scope this endpoint needs, or wasn't given this server.

404NOT_FOUND

Not your server, not a member of it, or really not there.

405METHOD_NOT_ALLOWED

The path exists, but not for this method. Allow lists the ones it takes.

409PLUGIN_DISABLED

The plugin behind this endpoint is turned off on that server.

409IDEMPOTENCY_CONFLICT

A write with the same Idempotency-Key is still running. Retry once it has finished.

429RATE_LIMITED

Over the limit. Retry-After says when to come back.

503UPSTREAM_UNAVAILABLE

cormac itself can't be reached. Retry with backoff. A write that fails this way may or may not have gone through, so check before you retry it.

Rate limits

60 requests a minute and 10,000 a day, per key. Writes also count against their own limit of 30 a minute, and the headers describe whichever limit is closest. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 adds Retry-After.