Project Phil Documentation
Sign in

Get Link

Added in v1.0

GEThttps://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-keystringrequired
    Your API authentication key.

Path parameters

  • namestringrequired
    The name of the shortened link or its complete destination URL.

Responses

  • 200OK
  • 404Not Found

Request

curl -X GET 'https://api.example.com/api/link/google' \
  -H 'x-api-key: YOUR_API_KEY'
const res = await fetch('https://api.example.com/api/link/google', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const link = await res.json();
import requests

res = requests.get('https://api.example.com/api/link/google', headers={'x-api-key': 'YOUR_API_KEY'})
link = res.json()
$ch = curl_init('https://api.example.com/api/link/google');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$link = json_decode(curl_exec($ch), true);

200 OK

{
  "id": 1,
  "name": "google",
  "url": "https://google.com",
  "count": 0,
  "creator": "API",
  "creatorID": "0",
  "createdAt": 1795400000000
}

404 Not Found

{
  "msg": "Link not found from name or url."
}
Written by !RAB Last updated 1 Dec 2026

Discussion 0

No comments yet. Sign in with Discord to start the conversation.