Get Link

GET https://api.example.com/api/link/{name}
Requires authentication: x-api-key: YOUR_API_KEY

Retrieves an existing shortened link by its name or destination URL. The supplied value is matched against both the name and url fields.

Headers

  • x-api-key string required
    Your API authentication key.
    Example: YOUR_API_KEY

Path parameters

  • name string required
    The name of the shortened link or its complete destination URL.
    Example: google

Responses

  • 200OK
  • 404Not Found
Request
curl -X GET 'https://api.example.com/api/link/google' \
  -H 'x-api-key: YOUR_API_KEY'
Response
OK
{
  "id": 1,
  "name": "google",
  "url": "https://google.com",
  "count": 0,
  "creator": "API",
  "creatorID": "0",
  "createdAt": 1795400000000
}