Redirections
API Reference

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.app

This 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_a1b2c3d4e5f67890abcdef1234567890

Generating API Keys

  1. Navigate to your project settings in the Dashboard
  2. Go to the "API Keys" section
  3. Click "Generate API Key"
  4. 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) or redir_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

TierRequests per MinuteOverage Behavior
Free100429 error response
Pro1,000429 error response
EnterpriseUnlimitedNo rate limiting

Rate Limit Headers

Every response includes rate limit information:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706745600
  • X-RateLimit-Limit - Maximum requests allowed per minute
  • X-RateLimit-Remaining - Requests remaining in current window
  • X-RateLimit-Reset - Unix timestamp when limit resets

For Enterprise tier with unlimited requests, headers show:

X-RateLimit-Limit: unlimited
X-RateLimit-Remaining: unlimited

Rate 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

TierRequests per MonthOverage Behavior
Free10,000429 error response
Pro1,000,000429 error response
EnterpriseUnlimitedNo quota enforcement

Quota Headers

Responses include monthly quota information:

X-Quota-Limit: 10000
X-Quota-Remaining: 9500
X-Quota-Reset: 1709251200
  • X-Quota-Limit - Total requests allowed this month
  • X-Quota-Remaining - Requests remaining this billing period
  • X-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=300

This 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:

Error Handling

For complete error documentation including all error codes, HTTP statuses, and resolution steps, see:

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.