rdurl API

Create and manage short links with code

General API Information

  • All requests require an API token. Please refer to the Authentication section.
  • The base endpoint is: https://rdurl.link/api
  • Only HTTPS is supported.
  • All endpoints return a JSON object.
  • Requests are sent as JSON (Content-Type: application/json).
  • All time and timestamp related fields are in milliseconds.
  • All character encoding is UTF-8.

Authentication

The API uses a token to identify which account a request belongs to. A token is equivalent to your account password: anyone who has it can create and delete your links.

Step 1. Issue a token

Log in to the dashboard and issue a token from the 'API token' menu. A new token is generated on every issue, and it can only be viewed once.

Step 2. Add the token to your request

Choose one of the two methods below.

1. Authorization: Bearer (recommended)

The standard authentication method used by most public APIs.

curl https://rdurl.link/api/link/create   -H "Authorization: Bearer rd_YOUR_TOKEN"   -H "Content-Type: application/json"   -d '{ "url": "https://example.com/very/long/url" }'

2. x-api-key header

Handy for tools that do not easily support the Authorization header.

curl https://rdurl.link/api/link/create   -H "x-api-key: rd_YOUR_TOKEN"   -H "Content-Type: application/json"   -d '{ "url": "https://example.com/very/long/url" }'

Step 3. Verify your token

Run the command below. If your link list is returned, the token is working.

curl https://rdurl.link/api/link/list \
  -H "Authorization: Bearer rd_YOUR_TOKEN"

Token management

A token consists of rd_ followed by 32 hexadecimal characters. It can only be viewed once when issued, so store it safely. If you suspect a leak, revoke the token from the dashboard immediately — it stops working right away.

Endpoints

POST /api/link/create

Create a short link. Send a URL and get back a slug and the short link.

Parameters

  • urlThe URL to shorten (required)
  • titleLink title (optional, up to 100 characters)
  • folderLink folder (optional, up to 100 characters — filter list by folder)
  • domainCustom domain (optional, e.g., example.com)

Request

{ "url": "https://example.com/very/long/url" }

Response

{
  "success": true,
  "message": {
    "slug": "abc123",
    "short": "https://rdurl.link/abc123",
    "domain_no": 0,
    "domain": ""
  }
}
GET /api/link/list

List your links with pagination, 20 per page. Supports search and a domain filter.

Parameters

  • pagePage number (default 1)
  • domainCustom domain (optional, e.g., example.com)
  • searchSearch keyword (partial match on slug/URL)
  • folderLink folder (optional, up to 100 characters — filter list by folder)

Request

GET /api/link/list?page=1&domain=example.com&search=keyword

Response

{
  "success": true,
  "message": {
    "total": 42,
    "page": 1,
    "list": [
      {
        "slug": "abc123",
        "url": "https://example.com/very/long/url",
        "short": "https://rdurl.link/abc123",
        "clicks": 128,
        "tm": 1789379625000
      }
    ]
  }
}
GET /api/link/info

Get the details and click count for a single link.

Parameters

  • slugslug (required)
  • domainCustom domain (optional, e.g., example.com)

Request

GET /api/link/info?slug=abc123

Response

{
  "success": true,
  "message": {
    "slug": "abc123",
    "url": "https://example.com/very/long/url",
    "short": "https://rdurl.link/abc123",
    "clicks": 128,
    "tm": 1789379625000
  }
}
GET /api/link/stats

Click stats per link — total, today, and top 10 countries.

Parameters

  • slugslug (required)
  • domainCustom domain (optional, e.g., example.com)

Request

GET /api/link/stats?slug=abc123

Response

{
  "success": true,
  "message": {
    "clicks": 128,
    "clicksToday": 5,
    "countries": [
      { "country": "KR", "clicks": 80 },
      { "country": "US", "clicks": 30 }
    ]
  }
}
DELETE /api/link

Delete a link. Global links can be restored for 30 days; custom domain links are deleted immediately.

Parameters

  • slugslug (required)
  • domainCustom domain (optional, e.g., example.com)

Request

DELETE /api/link
{ "slug": "abc123" }

Response

{ "success": true }

Rate limits

Up to 10 requests per minute per IP and 1,000 links per day per account. Exceeding the limit returns 429.

Error codes

On failure, the response contains success: false and an error code.

{ "success": false, "message": "api_invalid_token" }
codestatusMeaning
api_invalid_token401Token is missing or invalid
link_invalid_url400Invalid URL (http/https only)
link_invalid_slug400Invalid slug format
link_not_found400Link not found
domain_not_found400Custom domain not found
link_own_domain400You cannot shorten your own domain
link_create_failed400Failed to create the link
link_rate_limit429Rate limit exceeded
koenjazh-TWzh-CNviesptfrru