Rate Limits

The Txtly API implements rate limiting to ensure fair use and maintain service stability. Rate limits vary depending on your plan.

Rate Limit Plans

Different plans have different rate limits:

PlanRate LimitDescription
Free5 req/s5 requests per second
Pro20 req/s20 requests per second
Scale100 req/s100 requests per second
EnterpriseCustomCustom rate limits available

Rate Limit Headers

Every API response includes headers that show your current rate limit status:

ParameterTypeDescription
X-RateLimit-LimitstringYour plan's rate limit (requests per second).
X-RateLimit-RemainingstringNumber of requests remaining in the current window.
X-RateLimit-ResetstringUnix timestamp when the rate limit window resets.

Rate Limit Exceeded

When you exceed your rate limit, you'll receive a 429 response with a Retry-After header:

{
  "status_code": 429,
  "name": "rate_limit_exceeded",
  "message": "You have exceeded the rate limit. Please try again later."
}

The response will also include a Retry-After header indicating how many seconds to wait before retrying.

Best Practices

To avoid hitting rate limits:

  • Implement exponential backoff: When you receive a 429 response, wait and retry with increasing delays (1s, 2s, 4s, etc.)
  • Batch requests: Use batch endpoints when available to send multiple items in a single request
  • Cache results: Cache API responses when appropriate to reduce unnecessary requests
  • Monitor rate limit headers: Check remaining requests and adjust your request rate accordingly