Short link API - documentation

JSON API for creating and inspecting short links. Use the API key issued for your account (or the platform API_TOKEN where applicable).

Public API: https://anyurl.bond - JSON under /api/v1/.

Authorization

Authorization: Bearer 1234

Send the exact API key we provided as a Bearer token. Dashboard sign-in uses the same key together with your email.

POST /api/v1/shorten

{"long_url":"https://example.com","expiration_time":"24h","max_uses":100,"allow_bots":false}
{"long_url":"https://example.com","permanent":true}

Paid API (your account key): new links default to a 24-hour expiry when you omit expiration_time and permanent. Set "permanent": true for no expiry (paid only; uses one monthly smart edit, same bucket as PATCH/PUT). You may still send expiration_time and/or max_uses. Unpaid API tier: monthly new-link cap (UTC) and ~10 minute expiry per link, unchanged.

GET /api/v1/info/{short_code}

Returns metadata and validity for a short code without incrementing click counts.

GET /api/v1/me

Returns your plan tier, effective limits from the control-panel, and this month’s usage (new links and API edits, UTC month).

GET /api/v1/links

?limit=50&offset=0

Lists short links for your account API key only (owner_id matches that key; same scope as GET /info). The platform API token cannot use this endpoint. Optional query: limit (default 50, max 100), offset (default 0, max 100000). JSON: links (same fields as GET /info per item), total, limit, offset. Listing does not delete rows or increment clicks.

PUT / PATCH /api/v1/info/{short_code}

{"long_url":"https://example.com/new","expiration_time":"24h","max_uses":20,"allow_bots":false}

To change an existing short code, use PUT or PATCH on /api/v1/info/{short_code} - not POST /shorten. Body (JSON): any of long_url, expiration_time, max_uses, allow_bots. Omit a field to leave it unchanged. Clear time expiry with expiration_time "". max_uses must be >= 0 when provided (use a larger value to add allowed clicks). Response shape matches GET /info.

Command-line examples (curl)

The token 1234 is only an example - use your real API key. Examples use https://anyurl.bond.

POST /api/v1/shorten - full JSON (host https://anyurl.bond)
curl
curl -sS -X POST 'https://anyurl.bond/api/v1/shorten' \
  -H 'Authorization: Bearer 1234' \
  -H 'Content-Type: application/json' \
  -d "{\"long_url\":\"https://example.com\",\"expiration_time\":\"24h\",\"max_uses\":100,\"allow_bots\":false}"
POST /api/v1/shorten - minimal body (paid: defaults to 24 h expiry)
curl
curl -sS -X POST 'https://anyurl.bond/api/v1/shorten' \
  -H 'Authorization: Bearer 1234' \
  -H 'Content-Type: application/json' \
  -d "{\"long_url\":\"https://example.com\"}"
POST /api/v1/shorten - permanent (paid; uses a smart edit)
curl
curl -sS -X POST 'https://anyurl.bond/api/v1/shorten' \
  -H 'Authorization: Bearer 1234' \
  -H 'Content-Type: application/json' \
  -d "{\"long_url\":\"https://example.com\",\"permanent\":true}"
GET /api/v1/info/{short_code} - example short code abc123
curl
curl -sS 'https://anyurl.bond/api/v1/info/abc123' \
  -H 'Authorization: Bearer 1234'
GET /api/v1/me
curl
curl -sS 'https://anyurl.bond/api/v1/me' \
  -H 'Authorization: Bearer 1234'
GET /api/v1/links - paginate your short links
curl
curl -sS 'https://anyurl.bond/api/v1/links?limit=50&offset=0' \
  -H 'Authorization: Bearer 1234'
PATCH /api/v1/info/{short_code}
curl
curl -sS -X PATCH 'https://anyurl.bond/api/v1/info/abc123' \
  -H 'Authorization: Bearer 1234' \
  -H 'Content-Type: application/json' \
  -d "{\"long_url\":\"https://example.com/updated-destination\"}"
PUT /api/v1/info/{short_code}
curl
curl -sS -X PUT 'https://anyurl.bond/api/v1/info/abc123' \
  -H 'Authorization: Bearer 1234' \
  -H 'Content-Type: application/json' \
  -d "{\"long_url\":\"https://example.com/updated\",\"expiration_time\":\"7d\",\"max_uses\":50,\"allow_bots\":true}"
Verbose (-v) for debugging
curl
curl -v -X POST 'https://anyurl.bond/api/v1/shorten' \
  -H 'Authorization: Bearer 1234' \
  -H 'Content-Type: application/json' \
  -d "{\"long_url\":\"https://example.com\"}"

Free API tier: up to 100 new short links per calendar month (UTC), with the allowance resetting on the 1st. Each link expires after about 10 minutes. Paid plans use the same monthly cycle.

Back to home · Terms and conditions