API documentation
View as Markdown

Rate Limits

The Demarky API admits requests through an IP gate before authentication, then atomically charges application, installation, and token buckets. Installation access also charges the paying account's own bucket. Limits vary by operation and are communicated on every response; clients should use the response headers instead of hard-coding quotas.

Headers

Every response includes rate limit headers:

HeaderDescription
RateLimit-LimitMost constraining limit for the current request window
RateLimit-RemainingRemaining requests in the current window
RateLimit-ResetUnix timestamp when the most constraining window resets
RateLimit-PolicyMost constraining dimension and window, such as app;w=60
Retry-AfterSeconds until the next retry (only on 429 responses)

Handling rate limits

When a rate limit is exceeded, the API returns 429 Too Many Requests:

{
  "error": "rate_limit_exceeded",
  "message": "Application rate limit exceeded",
  "request_id": "cce50960-a535-4472-a7a7-5b4f9719aa42",
  "details": {
    "dimension": "application",
    "retry_after_seconds": 43
  }
}

Use the Retry-After header or the retry_after_seconds value to determine when to retry. The dimension identifies only the caller's limiting bucket and never exposes another tenant's usage.