Overview
To ensure fair usage and maintain service quality, the Postiz API implements rate limiting on all public endpoints.Default Limits
The default rate limit is:30 requests per hour
Rate limits are calculated per API key on a rolling one-hour window
Technical Details
- Window: 3,600,000 milliseconds (1 hour)
- Limit: 30 requests per window
- Scope: Per API key
- Storage: Redis-backed for distributed systems
Custom Limits
Self-hosted instances can configure custom rate limits using theAPI_LIMIT environment variable:
Rate Limit Headers
The API includes rate limit information in response headers:Maximum number of requests allowed in the current window
Number of requests remaining in the current window
Unix timestamp when the rate limit resets
Rate Limit Exceeded
When you exceed the rate limit, you’ll receive a429 Too Many Requests response:
Handling Rate Limits
Implement exponential backoff when you hit rate limits:Best Practices
Cache Responses
Cache Responses
Cache API responses when possible to reduce the number of requests. For example, integration lists rarely change.
Batch Operations
Batch Operations
Use batch endpoints when available. The posts creation endpoint accepts multiple integrations in a single request.
Monitor Headers
Monitor Headers
Always check rate limit headers and adjust your request rate proactively before hitting limits.
Use Webhooks
Use Webhooks
For real-time updates, consider using webhooks instead of polling the API repeatedly.
Implement Queuing
Implement Queuing
Use a queue system to manage API requests and prevent bursts that exceed rate limits.
Rate Limit by Endpoint
Rate limits apply globally across all endpoints. Each API call counts toward your hourly limit, regardless of the endpoint.Request Cost
All endpoints have the same cost:| Endpoint | Cost |
|---|---|
| GET /integrations | 1 request |
| GET /posts | 1 request |
| POST /posts | 1 request |
| POST /upload | 1 request |
| DELETE /posts/:id | 1 request |
Monitoring Usage
Track Your Usage
Implement client-side tracking to monitor your API usage:Increasing Limits
Need higher rate limits? Here are your options:Next Steps
Create Post
Start making API requests
List Integrations
Fetch your connected accounts