Use the GeoRedir API to programmatically create links, manage redirect rules, and pull analytics data. This guide covers authentication, endpoints, and examples.
10 min read
Generate an API key in your dashboard:
Keep Keys Secret
Include your API key in the X-API-Key header with every request:
curl -H "X-API-Key: your_api_key_here" \ https://api.georedir.com/api/v1/public/links
Create a smart link with rules in a single request:
curl -X POST https://api.georedir.com/api/v1/public/links \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Casino Offer Q1",
"slug": "casino-q1",
"rules": [
{
"priority": 1,
"rule_type": "geo",
"conditions": {"countries": ["US", "CA"]},
"destination_url": "https://offer-us.com/?ref=123"
},
{
"priority": 2,
"rule_type": "geo",
"conditions": {"countries": ["GB"]},
"destination_url": "https://offer-uk.com/?ref=456"
},
{
"priority": 99,
"rule_type": "fallback",
"conditions": {},
"destination_url": "https://offer-global.com/?ref=789"
}
]
}'Update a link's settings:
curl -X PATCH https://api.georedir.com/api/v1/public/links/123 \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Casino Offer Q1 (Updated)",
"is_active": true
}'Get analytics for a specific link:
# Get analytics for link ID 123 (last 30 days) curl -H "X-API-Key: your_api_key_here" \ "https://api.georedir.com/api/v1/public/analytics/123?days=30" # Get current usage and limits curl -H "X-API-Key: your_api_key_here" \ https://api.georedir.com/api/v1/public/usage
API requests are rate-limited to 100 requests per minute per API key. If you exceed this limit, you'll receive a 429 Too Many Requests response.
For full API documentation, see the API Reference.
Create your first geo-targeted smart link in under 2 minutes. Free plan available, no credit card required.
Free plan included • No credit card required • Upgrade anytime