Error codes · ksef · Poland

KSEF-21121Partly

KSeF rate limit reached for this endpoint

This is the rejection, word for word: „[KSEF-21121] KSeF error 21121 ("Limit żądań osiągnięty") is returned when the calling context exceeds the per-endpoint request quota published by the Polish Ministry of Finance. The API rejects the request with HTTP 429 and the client must back off before retrying. Quotas are applied per NIP context, per endpoint, and per time window.“

The Ministry publishes current limits at https://ksef-test.mf.gov.pl/document/LimitValues/1.3/PL. Limits differ between environments (test vs production) and between endpoints — /online/Session/AuthorisationChallenge, /online/Invoice/Send, /online/Query/Invoice/Sync, and batch endpoints each have their own bucket. The response includes a Retry-After header when a wait time is defined.

What to have readyThe correct figures from your bookkeeping; we show you which field is affected.
What we doImplement client-side rate limiting with the published per-endpoint quotas, honour the Retry-After header, and stagger bulk workloads across multiple contexts or across time. Do not retry immediately.
What the finding looks likeExample
FindingNeeds your check · KSEF-21121
From youThe correct figures
ThenChecked again
ProofSHA-256 and /verify link after the check
Fix KSEF-21121 Rate Limit Error | KSeF Throttling Guide