API Rate Limit Block Duration and IP Unblocking

53 replies
Last updated: Nov 29, 2025
It seems we hit one of the api rate limits per IP when one of our developers was migrating data using the API and now he seems to be blocked: https://www.sanity.io/docs/technical-limits
How can we enable his IP again? How long does the block stays?
AI Update

Based on the technical limits documentation, I can help clarify the situation with the IP rate limit block.

How Long Does the Block Last?

The good news is that IP rate limit blocks are temporary and reset automatically. According to the documentation, the rate limits are enforced per second. This means:

  • Once you exceed the rate limit (e.g., more than 25 mutations/second or 500 total API calls/second), you'll receive HTTP 429 responses
  • The block lasts only until the current one-second period ends
  • After that second passes, the counter resets and requests can resume

So your developer should be able to make requests again within seconds of stopping the migration activity that triggered the limit. There's no permanent IP blacklist - it's just a per-second throttle.

Understanding the Rate Limits

The per-IP rate limits are:

  • Maximum mutation rate: 25 req/s (POST to /data/mutate)
  • Maximum upload rate: 25 req/s (POST to /assets/)
  • Maximum global API call rate: 500 req/s

Best Practices for Data Migration

To avoid hitting these limits during migrations:

  1. Use the CLI import tool: The sanity dataset import command is specifically designed for bulk imports and handles rate limiting automatically with built-in retry logic and proper throttling

  2. Implement throttling: If writing a custom migration script, add delays between batches of requests to stay under the 25 req/s limit for mutations

  3. Use transactions: Batch multiple mutations into single transaction requests where possible to reduce the total number of API calls

  4. Add retry logic: Implement exponential backoff when you receive 429 responses - wait a bit longer after each retry

If You Need Higher Limits

If your developer continues to experience issues or if you need to perform large-scale migrations that require higher limits, you should contact Sanity support to discuss your specific needs. Enterprise customers can work with Sanity to customize limits for their use case.

For immediate relief, the simplest solution is to slow down the migration script to stay under 25 requests per second, or better yet, use the official sanity dataset import CLI tool which handles all of this automatically.

Show original thread
53 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?