What this key has left, on every budget that applies to it, measured after this request has been counted.
Two budgets exist. general counts every request made with the key.
audience counts only the operations that return subscriber or
recipient email addresses, and is smaller: those operations are charged
to both budgets and have to pass both, so a key that has exhausted
audience can still call everything else.
Read this rather than inferring the whole picture from the RateLimit-*
headers. Those describe one budget, whichever is closest to exhaustion,
because a retry loop can only act on one number.
This operation is itself counted against the general budget. An
endpoint exempt from the limit would be the one call a client could make
in a loop for free.
Headers
-
The contract version this request is written against, as a release date (
YYYY-MM-DD). 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. An unknown value answers400withinvalid_version.
Responses
-
The current window, limit and remaining for this key.
-
No API key was presented, or the key is unknown, revoked or expired.
All four answer identically, down to the wording. Saying that a key was revoked rather than never issued confirms to whoever is holding the string that it was once real, which a legitimate caller does not need and a thief should not get.
-
Too many requests. Back off and retry after the interval named by the
Retry-Afterresponse header. -
Something failed inside Commune. The request may be retried.
curl \
--request GET 'https://api.usecommune.com/rate-limit' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Commune-Version: 2026-08-26"
{
"object": "rate_limit",
"limit": 42,
"remaining": 42,
"window_seconds": 42,
"reset_at": "2026-05-04T09:42:00Z",
"policies": [
{
"name": "general",
"limit": 42,
"used": 42,
"remaining": 42,
"window_seconds": 42,
"reset_at": "2026-05-04T09:42:00Z",
"description": "string"
}
]
}
# Headers
WWW-Authenticate: string
# Payload
{
"error": {
"code": "bad_request",
"message": "Newsletter not found.",
"param": "cursor",
"allowed_values": [
"subscribed",
"unsubscribed",
"bounced",
"complained",
"pending"
],
"request_id": "req_01j9c8h1q7m3n4p5r6s7t8u9v0",
"docs_url": "https://usecommune.com/docs/api/errors#not_found"
}
}
# Headers
Retry-After: 42
# Payload
{
"error": {
"code": "bad_request",
"message": "Newsletter not found.",
"param": "cursor",
"allowed_values": [
"subscribed",
"unsubscribed",
"bounced",
"complained",
"pending"
],
"request_id": "req_01j9c8h1q7m3n4p5r6s7t8u9v0",
"docs_url": "https://usecommune.com/docs/api/errors#not_found"
}
}
{
"error": {
"code": "bad_request",
"message": "Newsletter not found.",
"param": "cursor",
"allowed_values": [
"subscribed",
"unsubscribed",
"bounced",
"complained",
"pending"
],
"request_id": "req_01j9c8h1q7m3n4p5r6s7t8u9v0",
"docs_url": "https://usecommune.com/docs/api/errors#not_found"
}
}