From e7a42c1ae62e2f665306d8cb7742a85067ea13a2 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 17:21:25 +0000 Subject: [PATCH] Document API rate limits and the 429 response (CP-9334) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F1a5xoeFpaLsRStWALK74R --- openapi.yaml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ server.js | 30 +++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index f9e9abf..98593c4 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -96,6 +96,37 @@ info: { "page": 1, "page_size": 10, "page_count": 146, "total_count": 1458, "data": [] } ``` + ## Rate limits + To keep the API fast for every organisation, calls are limited per minute: + + | Who | Limit | + |---|---| + | Each API key, connected app token, or person's email and token | 120 requests a minute | + | All of one Organisation's API keys and connected apps together | 300 requests a minute | + + The minute is a fixed clock minute (it resets at :00 seconds). Every response carries headers so an integration can pace itself: + + | Header | Meaning | + |---|---| + | `X-RateLimit-Limit` | Requests allowed per minute for this key or token | + | `X-RateLimit-Remaining` | Requests left this minute | + | `X-RateLimit-Reset` | When the minute resets, as a Unix timestamp | + + A call over a limit gets `429 Too Many Requests` with a `Retry-After` header (seconds) and this body: + ```json + { + "error": "Too many requests: this API key or token has made more than 120 requests in a minute. The limit resets at 17:31:00 UTC, in 23 seconds; try again then. ...", + "scope": "api_key", + "limit": 120, + "retry_after": 23, + "resets_at": "2026-11-25T17:31:00Z", + "documentation": "https://api-docs.makerble.com/#rate-limits" + } + ``` + `scope` is `api_key` for the key or token's own limit and `organisation` for the Organisation's shared one. + + **To stay within the limits:** wait `Retry-After` seconds after a `429` before trying again; space requests out (one every half second keeps a key under its limit); and fetch lists a page at a time with `per_page` up to 200 and `last_synced_datetime` to get only what changed since your last sync, instead of fetching records one by one. For example, 5,000 Survey Responses (Stories) take 25 calls to `GET /stories?per_page=200`, but 5,000 calls to `GET /stories/{id}`. + ## Webhooks Instead of polling, an Organisation's admins can register **webhook endpoints**: HTTPS URLs that Makerble sends a signed JSON `POST` to when records change. Manage them under **Connect > Webhooks** or with the Webhooks endpoints below. An Organisation's admin turns webhooks on by ticking **Turn on Webhooks** in the Organisation's Settings (Preferences) page; until then those endpoints answer `403`. @@ -6708,6 +6739,8 @@ paths: $ref: '#/components/responses/Unauthorized' "422": $ref: '#/components/responses/UnprocessableEntity' + "429": + $ref: '#/components/responses/TooManyRequests' post: tags: [Stories] @@ -6849,6 +6882,8 @@ paths: $ref: '#/components/responses/Unauthorized' "404": $ref: '#/components/responses/NotFound' + "429": + $ref: '#/components/responses/TooManyRequests' /stories/{id}/attachments: get: @@ -22379,6 +22414,39 @@ components: $ref: '#/components/schemas/Error' example: error: "You need to sign in before continuing." + TooManyRequests: + description: Over a rate limit (see Rate limits). Retry after the number of seconds in the Retry-After header. + headers: + Retry-After: + description: Seconds until the limit resets + schema: + type: integer + content: + application/json: + schema: + type: object + properties: + error: + type: string + scope: + type: string + enum: [api_key, organisation] + limit: + type: integer + retry_after: + type: integer + resets_at: + type: string + format: date-time + documentation: + type: string + example: + error: "Too many requests: this API key or token has made more than 120 requests in a minute. The limit resets at 17:31:00 UTC, in 23 seconds; try again then. To stay within it, space your requests out (about 0.5 seconds apart), and fetch lists a page at a time with per_page (up to 200) and last_synced_datetime, to get only what has changed, rather than one record per request. See https://api-docs.makerble.com/#rate-limits" + scope: api_key + limit: 120 + retry_after: 23 + resets_at: "2026-11-25T17:31:00Z" + documentation: "https://api-docs.makerble.com/#rate-limits" NotFound: description: Resource not found content: diff --git a/server.js b/server.js index bd0f584..f9c195a 100644 --- a/server.js +++ b/server.js @@ -915,6 +915,7 @@ function buildDocsPage() { Introduction Authentication Pagination + Rate limits Terminology Mock server @@ -1188,6 +1189,35 @@ function buildDocsPage() { + +
+
Reference
+

Rate limits

+
+

To keep the API fast for every organisation, calls are limited per clock minute. A call over a limit gets 429 Too Many Requests with a Retry-After header in seconds, and a message saying when the limit resets.

+
+ + + + + + +
WhoLimitscope in a 429
Each API key, connected app token, or person's email and token120 requests a minuteapi_key
All of one Organisation's API keys and connected apps together300 requests a minuteorganisation
+ + + + + + + + +
Response headerMeaning
X-RateLimit-LimitRequests allowed per minute for this key or token
X-RateLimit-RemainingRequests left this minute
X-RateLimit-ResetWhen the minute resets, as a Unix timestamp
Retry-AfterOn a 429 only: seconds to wait before trying again
+
+ ✓ + To stay within the limits, space requests out (one every half second keeps a key under its limit), wait Retry-After seconds after a 429, and fetch lists a page at a time with per_page up to 200 and last_synced_datetime rather than one record at a time: 5,000 Survey Responses take 25 calls to GET /stories?per_page=200, but 5,000 calls to GET /stories/{id}. +
+
+
Reference