Back to dashboard

Rate limits

The Morta API enforces rate limits so the service stays fast and available for every customer. If your integration goes over a limit, requests are temporarily rejected with a 429 response until the limit window resets.

Global limit

The Morta API accepts up to 10 requests per second. This limit applies across all endpoints combined — not per endpoint.

The limit is counted for each API key or signed-in session; requests sent without either are counted for each IP address. Requests are counted over a 10-second window, so a short burst is fine as long as the total over those 10 seconds stays under the limit.

Authentication limits

A few authentication endpoints have stricter hourly limits per email address to protect accounts from abuse:

EndpointMethodLimit per email
/v1/user/authenticatePOST20 per hour
/v1/user/send-verification-emailPOST5 per hour
/v1/user/send-password-reset-emailPOST5 per hour
/v1/identities/allowed-methodsGET30 per hour

These limits are intentionally low — they exist to slow down brute-force login attempts and account-recovery abuse, and should be well above anything a legitimate integration needs.

Each of these endpoints also limits the requests it accepts from a single IP address, whichever email they're for: 100 a minute to each of /v1/user/authenticate and /v1/identities/allowed-methods, and 30 a minute to each of /v1/user/send-verification-email and /v1/user/send-password-reset-email. Over one of these IP limits, the API returns 429 the same way it does for the global limit.

Rate limit headers

Responses from the authentication endpoints above include these headers for their per-email limits, so you can see where you stand:

HeaderDescription
X-RateLimit-LimitThe maximum number of requests allowed in the current window.
X-RateLimit-RemainingThe number of requests remaining in the current window.
X-RateLimit-ResetThe UTC epoch time (in seconds) when the current window resets.
Retry-AfterOn a 429 response, the number of seconds to wait before retrying.

Responses from other endpoints don't include them.

When you hit a limit

When a request goes over the global limit, or the per-IP limit on an authentication endpoint, the API returns HTTP 429 Too Many Requests. This response has no JSON body and no Retry-After header, so check the status code rather than the body.

When a request goes over one of the per-email authentication limits, the API returns HTTP 429 Too Many Requests with a Retry-After header and a JSON body:

{
  "code": "too_many_requests",
  "detail": {
    "message": "20 per 1 hour"
  }
}

The message field indicates which limit was triggered.

Handling rate limits in your integration

  • On a 429, wait before retrying: for the number of seconds in Retry-After when it's there, otherwise start at a few seconds. Retrying immediately in a loop will only extend the block.
  • Use exponential backoff with jitter for retries.
  • On the authentication endpoints, watch X-RateLimit-Remaining and slow down before it reaches 0.
  • Prefer bulk endpoints over many individual requests where available.
  • If your integration legitimately needs a higher limit, contact support@morta.io. Customers on the Scale Up plan have higher rate limits than customers on Professional or Team plans.