API Reference
Complete reference for the Redirections Edge Query API.
API Reference
Complete reference for the Redirections Edge Query API.
Base URL
All API requests are made to:
https://api.3xx.appThis endpoint is deployed globally on Cloudflare's edge network with 300+ locations for sub-50ms P95 latency worldwide.
Authentication
All API requests require authentication using an API key.
API Key Header
Include your API key in the X-API-Key header:
X-API-Key: redir_live_a1b2c3d4e5f67890abcdef1234567890Generating API Keys
- Navigate to your project settings in the Dashboard
- Go to the "API Keys" section
- Click "Generate API Key"
- Copy and securely store the key (shown only once)
Never commit API keys to version control or expose them in client-side code. Use environment variables.
API Key Format
API keys follow this format:
- Prefix:
redir_live_(production) orredir_test_(test mode) - Suffix: 32 alphanumeric characters
- Example:
redir_live_a1b2c3d4e5f67890abcdef1234567890
Rate Limiting
API requests are rate-limited based on your organization's tier.
Rate Limit Tiers
| Tier | Requests per Minute | Overage Behavior |
|---|---|---|
| Free | 100 | 429 error response |
| Pro | 1,000 | 429 error response |
| Enterprise | Unlimited | No rate limiting |
Rate Limit Headers
Every response includes rate limit information:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706745600X-RateLimit-Limit- Maximum requests allowed per minuteX-RateLimit-Remaining- Requests remaining in current windowX-RateLimit-Reset- Unix timestamp when limit resets
For Enterprise tier with unlimited requests, headers show:
X-RateLimit-Limit: unlimited
X-RateLimit-Remaining: unlimitedRate Limit Exceeded
When you exceed the rate limit, you'll receive a 429 Too Many Requests response:
{
"error": "Too Many Requests",
"code": "RATE_LIMIT_EXCEEDED"
}The response includes a Retry-After header indicating seconds until the limit resets.
Monthly Quotas
In addition to per-minute rate limits, accounts have monthly API quotas.
Quota Tiers
| Tier | Requests per Month | Overage Behavior |
|---|---|---|
| Free | 10,000 | 429 error response |
| Pro | 1,000,000 | 429 error response |
| Enterprise | Unlimited | No quota enforcement |
Quota Headers
Responses include monthly quota information:
X-Quota-Limit: 10000
X-Quota-Remaining: 9500
X-Quota-Reset: 1709251200X-Quota-Limit- Total requests allowed this monthX-Quota-Remaining- Requests remaining this billing periodX-Quota-Reset- Unix timestamp when quota resets (billing period end)
Quota Exceeded
When you exceed your monthly quota, you'll receive a 429 Too Many Requests response:
{
"error": "Monthly API Quota Exceeded",
"code": "QUOTA_EXCEEDED"
}Upgrade your plan to increase quotas, or wait until the next billing cycle when quotas reset.
Response Format
The API returns different response formats depending on the endpoint and result.
JSON Responses
The /v1/lookup endpoint returns JSON for successful matches:
{
"destination": "/articles/new-post",
"statusCode": 301,
"matchType": "exact"
}No Content Response
When no redirect is found, the lookup endpoint returns:
- Status:
204 No Content - Body: Empty (no JSON)
This allows you to quickly check if a redirect exists without parsing response data.
File Downloads
The /v1/export endpoint returns configuration files with appropriate Content-Type and Content-Disposition headers for download.
Error Responses
All errors return JSON with two fields:
{
"error": "Human-readable error message",
"code": "MACHINE_READABLE_CODE"
}See the Error Reference for all error codes and resolution steps.
Caching
All API responses are cached at the edge for optimal performance.
Cache Headers
Successful responses include:
Cache-Control: public, max-age=300This indicates responses are cached for 5 minutes (300 seconds) at the edge and in browsers.
Cache Behavior
- Lookup responses (200): Cached for 5 minutes
- No content (204): Cached for 5 minutes
- Errors (4xx, 5xx): Not cached
When you deploy a new configuration, the cache is automatically invalidated and fresh data propagates to all edge locations within 60-90 seconds.
Edge caching ensures sub-50ms response times globally without hitting origin servers for every request.
Endpoints
Explore the complete endpoint documentation:
- GET /v1/lookup - Query for redirect rules by path
- GET /v1/export - Download redirect configurations in various formats
Error Handling
For complete error documentation including all error codes, HTTP statuses, and resolution steps, see:
- Error Reference - Complete error code listing
HTTP Methods
The API only supports GET requests. All other HTTP methods return:
{
"error": "Method Not Allowed",
"code": "METHOD_NOT_ALLOWED"
}With status code 405 Method Not Allowed.