# What rate limits does the DunSocial API have? > General API routes allow about 100 requests a minute per user or IP, auth routes about 20 per 15 minutes, CLI device login about 30 per 15 minutes & AI routes about 20 a minute. A 429 includes X-RateLimit headers. X also has a separate monthly posting cap. Updated: 2026-10-05. ## The limits The API limits are approximate & documented per scope: | Scope | Limit | |-------|-------| | General `/api/*` | About 100 requests per minute per authenticated user, or per client IP | | Auth `/api/auth/*` | About 20 requests per 15 minutes per client IP | | CLI device login `/api/cli/auth/*` | About 30 requests per 15 minutes per client IP | | AI `/api/ai/*` | About 20 requests per minute | The word "about" is deliberate. Use the response headers, not a hard-coded number, to decide your pace. ## What a limited response looks like You get a 429 status & `X-RateLimit-*` headers. Back off, then retry. A 429 is also what you see when a workspace hits its X monthly posting cap, which is a different limit. ## The X posting cap X has a monthly cap on posts per workspace. Scheduling or publishing to X past it returns a 429. Check usage before a large batch: ```bash curl https://api.dunsocial.com/api/posts/x-cap-usage \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "X-Workspace-Id: YOUR_WORKSPACE_ID" ``` Backing off won't help with the monthly cap. It resets with the period, so plan the batch around it. ## Retrying with backoff Retry a 429 & the occasional 500 with exponential backoff, & stop after a few attempts: ```bash for delay in 1 2 4 8; do curl -sf -X POST "$URL" -H "Authorization: Bearer $DUN_TOKEN" && break sleep $delay done ``` Don't retry a 401 or 403 without fixing auth or permissions. Those won't succeed by waiting. DunSocial's rate-limit headers show where a client stands, so use them to pace requests when you can. ## Staying under the limit - Fetch account ids once & reuse them - Upload media once & reuse the asset id - Send one request that targets several accounts instead of one request per account - Validate with a single call before a batch, not per post DunSocial's schedule route accepts several account ids in one request, so a multi-platform post is one call, not one per platform. ## Bulk work For a large batch, spread requests across the minute rather than firing them all at once. A short pause between calls keeps you well under the general limit. DunSocial's CLI & SDK report a rate limit clearly, with exit code 6 in the CLI, so a script can tell it apart from other failures. ## Related guides - [What do DunSocial API error codes mean?](https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/what-do-dunsocial-api-error-codes-mean.md) - [How to schedule a post with the DunSocial API](https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/how-to-schedule-a-post-with-the-dunsocial-api.md) - [How to bulk schedule social media posts](https://www.dunsocial.com/hub/social-media-scheduler/how-to-bulk-schedule-social-media-posts.md) - [What do the DunSocial CLI exit codes mean?](https://www.dunsocial.com/hub/dunsocial-cli-guides/what-do-the-dunsocial-cli-exit-codes-mean.md) ## About this document This is the Markdown representation of https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/what-rate-limits-does-the-dunsocial-api-have. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login