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/shorten{
"url": "https://example.com",
"count": 10, // number of links to create (max 100)
"group_uuid": "uuid-here" // optional: assign to group
}curl -X POST https://4wrd.ing/api/v1/shorten \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "count": 10}'{
"success": true,
"bulk": true,
"batch_id": "batch-uuid",
"count": 10,
"links": [
{
"uuid": "uuid-1",
"short_link": "https://4wrd.ing/uuid-1",
"admin_link": "https://4wrd.ing/uuid-1",
"target_url": "https://example.com"
},
...
]
}/api/v1/groups{
"name": "Marketing Campaign",
"description": "Q1 2024 links" // optional
}curl -X POST https://4wrd.ing/api/v1/groups \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Marketing Campaign", "description": "Q1 2024"}'{
"success": true,
"group": {
"uuid": "group-uuid",
"name": "Marketing Campaign",
"description": "Q1 2024 links",
"created_at": "2024-01-15T10:30:00Z"
}
}/api/v1/groups/{group_uuid}/links{
"link_keys": ["link-uuid-1", "my-slug", "link-uuid-3"]
}curl -X POST https://4wrd.ing/api/v1/groups/GROUP_UUID/links \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"link_keys": ["uuid-1", "my-slug"]}'{
"success": true,
"updated": 2,
"not_found": []
}/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"
}
}