Integrate 4wrd.ing into your applications with our simple and powerful REST API
All API requests require authentication
Include your API key in the x-api-key header with every request.
x-api-key: YOUR_API_KEY
Get your API key from the admin dashboard.
/api/v1/shorten{
"url": "https://example.com",
"slug": "my-link" // optional
}curl -X POST https://4wrd.ing/api/v1/shorten \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://google.com", "slug": "go"}'{
"success": true,
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"slug": "go",
"short_link": "https://4wrd.ing/go",
"admin_link": "https://4wrd.ing/550e8400-e29b-41d4-a716-446655440000",
"target_url": "https://google.com"
}
}/api/v1/stats/{key}key - Can be either a UUID or slug
curl https://4wrd.ing/api/v1/stats/go \ -H "x-api-key: YOUR_API_KEY"
{
"success": true,
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"slug": "go",
"target_url": "https://google.com",
"clicks": 42,
"created_at": "2024-01-15T10:30:00Z"
}
}