Developer API
Programmatic link creation.
Generate short links from your backend, CI/CD pipeline, or client dashboards. Authenticate with a workspace API key and receive an instant 301-ready short URL.
Endpoint
POST /api/public/v1/links
POST /api/public/v1/links
Content-Type: application/json
Authorization: Bearer <API_KEY>Request body
application/json
{
"original_url": "https://example.com/a/very/long/path"
}Response
200 OK
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"short_code": "a3k9xZ",
"short_url": "https://dolix.co/a3k9xZ",
"original_url": "https://example.com/a/very/long/path",
"created_at": "2026-08-07T14:53:00.000Z"
}Example curl
curl
curl -X POST https://dolix.co/api/public/v1/links \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"original_url": "https://example.com/a/very/long/path"}'Errors
- 401 Unauthorized — Missing or invalid API key.
- 402 Payment Required — The workspace has no active plan with API access.
- 405 Method Not Allowed — Only POST is supported on this endpoint.
- 400 Bad Request — Invalid JSON, or a missing or invalid
original_url. - 429 Too Many Requests — Rate limit exceeded. Includes a
Retry-Afterheader with the seconds until the next window. - 503 Service Unavailable — Temporary failure. Retry after a short delay; no link is created.
Rate limits
Requests are counted per API key in fixed one-minute windows.
- Pro — 60 requests per minute.
- Business — 300 requests per minute.
- Agency — 1,200 requests per minute.
Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Once the limit is reached the endpoint returns 429 with Retry-After and X-RateLimit-Remaining: 0 until the next minute begins.
Ready to integrate?
Create a workspace, generate an API key, and start shortening programmatically.