/rate-limitRetrieve the calling credential's rate limit state
What this credential has left, on every budget that applies to it, measured after this request has been counted.
Three budgets exist. general counts every request. audience counts
only the operations that return subscriber or recipient email addresses.
write counts only the operations that change something. The two narrow
budgets are smaller than general, and the operations they cover are
charged to both and have to pass both, so a credential that has
exhausted one of them can still call everything else.
Read this rather than inferring the whole picture from the RateLimit-*
headers, which describe one budget at a time.
This operation is itself counted against the general budget.
The contract version this request is written against. Every version published so far is a release date (YYYY-MM-DD), which is why the examples look like one, but the value is an opaque identifier: match it against the versions this API publishes rather than parsing it, because a future one may not be only a date. An unknown value answers 400 with invalid_version.
Omitting the header pins the request to the version that was current when the API key was issued, so an integration keeps working when a newer version ships.
The general budget's limit, repeated for convenience.
Always rate_limit.
Every budget this key is measured against, general first. A budget that does not apply to any operation the key may call is still listed, because what it counts is a property of the API rather than of the key.
Requests left on the general budget in this window.
When the general budget's window resets.
The general budget's window length.
Retry-After response header. One of the budgets in RateLimit-Policy ran out, and the RateLimit-* headers on this response say which and when it resets.A 401 is returned: No credential was presented, or it is malformed, unknown, revoked or expired, or it is an access token minted for a different audience.
Every one of these answers identically, down to the wording and the
headers, so a refusal never confirms that a string was once real. A 429 is returned: Too many requests. Back off and retry after the interval named by the
Retry-After response header.
One of the budgets in RateLimit-Policy ran out, and the
RateLimit-* headers on this response say which and when it resets. A 500 is returned: Something failed inside Commune. The request may be retried.