API Reference / rate limits

Rate Limits

DramWell API rate limits by plan, response headers, handling 429 errors, and best practices for staying within your quota.

Overview

Rate limits protect API stability for all customers. Limits are enforced per API key on a rolling 60-second window. If you exceed your limit, requests return 429 Too Many Requests until the window resets.


Limits by Plan

Plan Requests per minute
Standard 100
Professional 500
Premium 1,000
Enterprise Custom — contact sales

All limits apply per API key. If you have multiple keys, each key has its own independent quota.


Rate Limit Headers

Every API response includes these headers so you can monitor your consumption in real time:

Header Description
X-RateLimit-Limit Your total request allowance per minute
X-RateLimit-Remaining Requests remaining in the current window
X-RateLimit-Reset Unix timestamp (seconds) when the window resets and your full quota restores
HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 62
X-RateLimit-Reset: 1741625460

Handling 429 Responses

When you receive a 429 Too Many Requests response:

  1. Read the X-RateLimit-Reset header to determine when your quota resets.
  2. Pause all requests to that key until the reset timestamp.
  3. Resume with the next request after the reset.
async function handleRateLimit(response: Response): Promise<void> {
  if (response.status !== 429) return

  const resetAt = parseInt(response.headers.get('X-RateLimit-Reset') ?? '0', 10)
  const waitMs = Math.max(0, resetAt * 1000 - Date.now()) + 100 // 100ms buffer
  await new Promise(resolve => setTimeout(resolve, waitMs))
}

Best Practices

Batch when possible. Many list endpoints support limit=100. Fetch 100 records in one request instead of 100 individual requests.

Cache responses. Data that changes infrequently — service catalogs, technician profiles, plan configurations — can be cached locally and refreshed on a schedule rather than fetched on demand.

Use webhooks for real-time updates. Instead of polling an endpoint every few seconds to detect changes, subscribe to webhooks. A single webhook delivery replaces potentially hundreds of polling requests.

Distribute load. If you run scheduled bulk sync jobs, spread requests evenly over time rather than firing all at once at a fixed clock time. Staggering start times also avoids collisions with other processes sharing the same key.

Monitor remaining quota. Read X-RateLimit-Remaining in your responses. If it drops below 10, slow down proactively before you hit zero.

Upgrade if you consistently hit limits. Sustained rate limit errors indicate your integration has outgrown your plan. Contact sales@dramwell.ai to discuss a higher-limit plan or an Enterprise arrangement.


Related Articles

Was this article helpful?