Vai al contenuto principale

Rate limit

I rate limit sono applicati per endpoint su una finestra mobile di 60 secondi. Ogni endpoint ha il proprio contatore, quindi raggiungere il limite su una route non ne influenza un'altra. Superare un limite restituisce 429 Too Many Requests.

Come funziona

  • La finestra è di 1 minuto per ogni endpoint.
  • I limiti sono isolati per endpoint — list-boards e send-message contano separatamente.
  • Ogni response porta header di rate limit così puoi regolare il ritmo prima di colpire il cap.

Header di response

HeaderDescription
X-RateLimit-LimitMaximum requests allowed for this endpoint per window.
X-RateLimit-RemainingRequests remaining in the current window.
X-RateLimit-ResetWhen the current window resets.
Retry-AfterSeconds to wait before retrying (sent on 429 only).

Limiti per categoria

I limiti si raggruppano in pochi tier. Il cap esatto dipende da quanto è pesante l'operazione.

CategoryTypical limit (per minute)Examples
Reads50List boards, get a row, list channels, list notifications, list bookings
Heavier reads30Docs tree, drive tree, all /workspace/* reads
Writes30Create/update/delete rows, docs, comments, folders; upload presigned URLs
Heavy writes20Markdown writes (row, column, doc), multipart upload start/finalize
Search60The cross-entity /search endpoint (docs/drive search are 50)
Notification mutations60Mark read/unread, delete
Messaging100Send channel message, send direct message
Export10Async table export (the most restricted endpoint)

Limiti rappresentativi per endpoint

EndpointMethodLimit / min
/board/list-boardsGET50
/board/{boardId}/table/{tableId}/rowsGET50
/board/{boardId}/table/{tableId}/rowPOST30
/board/{boardId}/table/{tableId}/row/{rowId}/mdPOST20
/board/{boardId}/table/{tableId}/exportPOST10
/docs/treeGET30
/docs/{docId}/mdPOST20
/drive/files/upload/multipart/startPOST20
/searchGET60
/notificationsGET50
/notifications/{notificationId}PATCH / DELETE60
/workspace/infoGET30
/chat/channelsGET50
/chat/channel/{channelId}/send-messagePOST100
nota

Questi numeri sono accurati al momento della scrittura ma possono cambiare. Leggi sempre gli header X-RateLimit-* a runtime invece di hardcodare i limiti — e consulta l'API Reference per il valore attuale di un endpoint specifico.

La response 429

Quando superi un limite, l'endpoint restituisce:

{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests, please try again later",
"retryAfter": 27
}

L'header Retry-After porta lo stesso valore (in secondi) del campo body retryAfter — il tempo fino al reset della finestra.

Guida al backoff

  • Rispetta Retry-After. Su un 429, attendi i secondi che specifica prima di ritentare.
  • Usa exponential backoff come fallback. Se non c'è Retry-After (ad esempio su un 5xx), fai backoff esponenziale: 1s, 2s, 4s, …
  • Osserva X-RateLimit-Remaining. Rallenta proattivamente mentre si avvicina a zero invece di aspettare un 429.
  • Distribuisci il lavoro bulk. Quando iteri liste grandi o crei righe in batch, aggiungi un piccolo delay tra le chiamate per restare sotto il cap per-minuto.
  • Limita i retry. Rinuncia dopo alcuni tentativi e propaga l'errore invece di ritentare all'infinito.

Vedi Gestione errori per un esempio completo di retry.