Developers
The DLNK API
Create, list and delete short links from your own apps, scripts and integrations -- available on the Business plan.
Authentication
API keys
Every request is authenticated with an API key, sent as a Bearer token. Create and revoke keys from your dashboard -- the plaintext key is shown once, right after you create it, so store it somewhere safe. Only its hash is kept on our side, so a lost key can't be recovered -- revoke it and create a new one instead.
Authorization: Bearer dlnk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAPI keys are only available on the Business plan. A request with an invalid, missing or revoked key gets a 401 with an error message.
Limits
Rate limits
120 requests per minute per API key, or 600/minute on Business tier's high-volume usage. Going over the limit returns 429 with a Retry-After: 60 header:
{ "error": "Rate limit exceeded. Try again in a minute." }Reference
Endpoints
/api/v1/linksCreate a new short link.
Body
| Field | Type | Description |
|---|---|---|
| url | string, required | The destination to redirect to. |
| custom_alias | string, optional | Use a specific code instead of a random one. |
| expires_at | ISO date, optional | Link stops redirecting after this time. |
| usage_limit | number, optional | Link stops redirecting after this many uses. |
| password | string, optional | Visitors must enter this before being redirected. |
Example
curl -X POST https://dlnk.tech/api/v1/links \
-H "Authorization: Bearer dlnk_live_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/campaign", "custom_alias": "summer-sale"}'Response · 201
{
"id": "b6b6...",
"code": "summer-sale",
"short_url": "https://dlnk.tech/summer-sale"
}/api/v1/linksList your most recent 100 links, newest first.
Example
curl https://dlnk.tech/api/v1/links \
-H "Authorization: Bearer dlnk_live_..."Response · 200
{
"data": [
{
"id": "b6b6...",
"code": "summer-sale",
"short_url": "https://dlnk.tech/summer-sale",
"destination_url": "https://example.com/campaign",
"disabled": false,
"expires_at": null,
"usage_limit": null,
"uses_count": 42,
"created_at": "2026-09-20T10:00:00Z"
}
]
}/api/v1/links/:codePermanently delete a link you own. Deleting someone else's code (or one that doesn't exist) returns 404, never someone else's data.
Example
curl -X DELETE https://dlnk.tech/api/v1/links/summer-sale \
-H "Authorization: Bearer dlnk_live_..."Returns 204 with no body on success, or 404 if that code doesn't exist (or isn't yours).
Errors
Error format
Every error response is JSON with a single human-readable message:
{ "error": "`url` is required" }| 400 | Missing or malformed request body. |
| 401 | Missing, invalid or revoked API key. |
| 404 | The link doesn't exist, or isn't owned by this key. |
| 422 | The request was understood but rejected (e.g. alias already taken). |
| 429 | Rate limit exceeded -- see Retry-After header. |