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_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

API 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

POST/api/v1/links

Create a new short link.

Body

FieldTypeDescription
urlstring, requiredThe destination to redirect to.
custom_aliasstring, optionalUse a specific code instead of a random one.
expires_atISO date, optionalLink stops redirecting after this time.
usage_limitnumber, optionalLink stops redirecting after this many uses.
passwordstring, optionalVisitors 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"
}
GET/api/v1/links

List 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"
    }
  ]
}
DELETE/api/v1/links/:code

Permanently 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" }
400Missing or malformed request body.
401Missing, invalid or revoked API key.
404The link doesn't exist, or isn't owned by this key.
422The request was understood but rejected (e.g. alias already taken).
429Rate limit exceeded -- see Retry-After header.