← Back to WordLink

WordLink API

A tiny REST API to create, list, and resolve memorable short links from your own scripts and apps.

Authentication

Sign in to WordLink and open the API Keys tab on the home page to create a personal key. Pass it as a bearer token on every request:

Authorization: Bearer wl_live_...

Keys grant full access to your links. Rotate any key you think has leaked.

Base URL

https://www.wordlink.in/api/public/v1

POST/api/public/v1/linksAuth required

Create a new short link.

Body

{
  "url": "https://example.com/some/long/path",
  "alias": "optional-custom-alias",
  "expiresInDays": 30
}

Example

curl -X POST https://www.wordlink.in/api/public/v1/links \
  -H "Authorization: Bearer wl_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

Response

{
  "link": {
    "alias": "silent-forest-flows",
    "url": "https://example.com",
    "clicks": 0,
    "created_at": "2026-07-21T10:00:00Z",
    "expires_at": "2026-08-20T10:00:00Z",
    "safety_status": "safe"
  },
  "short_url": "https://www.wordlink.in/silent-forest-flows"
}

GET/api/public/v1/linksAuth required

List your links (newest first). Optional query: ?limit=50 (max 200).

curl https://www.wordlink.in/api/public/v1/links \
  -H "Authorization: Bearer wl_live_..."

GET/api/public/v1/links/:aliasAuth required

Fetch a single link you own.

curl https://www.wordlink.in/api/public/v1/links/silent-forest-flows \
  -H "Authorization: Bearer wl_live_..."

DELETE/api/public/v1/links/:aliasAuth required

Delete a link you own.

curl -X DELETE https://www.wordlink.in/api/public/v1/links/silent-forest-flows \
  -H "Authorization: Bearer wl_live_..."

GET/api/public/v1/resolve/:aliasPublic

Public alias resolver — returns the destination URL and safety status without recording a click. (The browser redirect at /{alias} is what increments click counts.)

curl https://www.wordlink.in/api/public/v1/resolve/silent-forest-flows

Errors

All errors return JSON: { "error": { "code": "...", "message": "..." } }

  • 400 invalid_body — request body failed validation
  • 401 missing_authorization / invalid_api_key
  • 404 not_found — alias doesn't exist or isn't yours
  • 409 alias_taken — that custom alias is already in use
  • 410 expired — the link has expired
  • 422 unsafe_url / adult_url / blocked_alias
  • 500 server_error — unexpected failure

Limits

  • URLs up to 2048 characters.
  • Custom aliases: lowercase letters/digits with dashes, 3–80 chars.
  • Expiry: 1–30 days (default 30). Refresh from the dashboard.
  • Every URL is scanned with Google Safe Browsing before shortening.