Delete Link

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

Permanently deletes an existing shortened link using its database ID. Returns the link object as it existed immediately before deletion.

Headers

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

Path parameters

  • id integer required
    The database ID of the shortened link to delete.
    Example: 1

Responses

  • 200OK
  • 404Not Found
Request
curl -X DELETE 'https://api.example.com/api/link/1' \
  -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
}