Skip to main content

Limits and Errors

Every crate has four limits, set by its plan. Errors come back as JSON with a message and, often, details.


The limits​

LimitFreeMakerWhen you go over
Requests a second (single readings and TTN)520429 API rate limit exceeded
Batch requests a second15429 API rate limit exceeded
Readings per batch100250400 Batch size limit exceeded
Readings a day50,0005,000,000429 Daily Quota Exceeded

Rate limits count requests in one-second windows, for each sending address and crate. Every reply carries X-RateLimit-Limit and X-RateLimit-Remaining headers.

The daily limit counts readings, not requests, and resets at midnight UTC. If a crate used more than 80% of its limit, we email you the next day.


Errors​

CodeMessageWhat to do
400Invalid request bodyThe body isn't valid JSON, or a batch isn't a JSON array.
400Validation Errordevice is missing, or a device or metric name is longer than 100 characters.
400No valid data foundNothing in the body is a number.
400Batch size limit exceededSend smaller batches. details shows the limit and how many you sent.
403API key is missingAdd the X-API-Key header.
403Invalid API key for this crateCheck the key belongs to this crate, or that it hasn't been replaced.
403Ingestion Method MismatchYou sent plain readings to a The Things Network crate, or a webhook to a General crate.
404Crate not foundCheck the crate ID in the URL.
429API rate limit exceededSlow down, then try again after a second.
429Daily Quota ExceededWait until midnight UTC, or move the crate to Maker.
500Internal Server ErrorWait a moment and try again.

Handling 429s​

  • Rate limit: wait a second and send again. If you get it often, send fewer, bigger batches.
  • Daily limit: retrying won't help until the next day. Send less often, or move the crate to Maker.

For your own code, wait a little longer after each failed try (1 second, then 2, then 4) instead of retrying straight away.