API Reference
Rate Limits
API rate limiting tiers and best practices.
Rate Limits
Workestra API uses rate limiting to ensure fair usage and platform stability.
Rate Limit Tiers
Four tiers based on authentication and plan:
| Tier | Requests/Minute | Who |
|---|---|---|
| Anonymous | 10 | Unauthenticated |
| Standard | 100 | API key, Starter plan |
| Professional | 500 | API key, Pro plan |
| Enterprise | 2,000 | API key, Enterprise plan |
Endpoint Tiers
Different endpoints have different limits:
Tier 1: Critical (Lowest Limits)
Authentication and sensitive operations:
POST /auth/*POST /usersPUT /users/{id}/password
Limit: 10 req/min (all tiers)
Tier 2: Standard
Most read operations:
GET /contactsGET /dealsGET /tasks
Limit: Applies your tier limit
Tier 3: Write Operations
Create and update:
POST /contactsPUT /deals/{id}DELETE /tasks/{id}
Limit: 50% of your tier limit
Tier 4: Bulk/Export
Data-heavy operations:
GET /export/*- Bulk imports
- Report generation
Limit: 10 req/min
Rate Limit Headers
API responses include rate limit info:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1710504000| Header | Description |
|---|---|
X-RateLimit-Limit | Your tier limit |
X-RateLimit-Remaining | Requests left in window |
X-RateLimit-Reset | Unix timestamp when limit resets |
Handling Rate Limits
When Rate Limited
If you exceed limits:
{
"error": "rate_limit_exceeded",
"message": "API rate limit exceeded. Try again in 60 seconds.",
"retry_after": 60
}Response: 429 Too Many Requests
Retry Strategies
Exponential Backoff:
import time
import requests
def api_call_with_retry(url, max_retries=3):
for i in range(max_retries):
response = requests.get(url)
if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 60))
time.sleep(retry_after)
continue
return response
raise Exception("Max retries exceeded")Best Practices
- Cache responses — Don't repeat identical requests
- Batch operations — Use bulk endpoints
- Use webhooks — Instead of polling
- Respect Retry-After — Wait before retrying
- Monitor usage — Track your consumption
Increasing Limits
Upgrade Plan
Higher plans get higher limits:
- Starter → Professional: 100 → 500 req/min
- Professional → Enterprise: 500 → 2,000 req/min
Request Increase
Enterprise customers can request higher limits:
- Contact support
- Explain use case
- Provide expected volume
- Reviewed case-by-case
Monitoring Usage
API Dashboard
View usage in Settings:
- Requests today
- Requests this month
- Usage by endpoint
- Rate limit hits
Usage Alerts
Set up notifications:
- At 80% of limit
- On rate limit exceeded
- Daily usage summary
Comparison
| Usage Pattern | Recommended Approach |
|---|---|
| Real-time sync | Webhooks |
| Periodic updates | Polling with caching |
| Bulk export | Export endpoints |
| Report generation | Cached reports |
Next Steps
- API Authentication — Get your API key
- Webhooks — Event-driven integration
- Endpoints — API reference