trak.sh docs
API Reference

Delete Link

DELETE /api/v1/links/:slug — Delete a link and all its analytics data.

DELETE /api/v1/links/:slug

Permanently delete a link by its slug. All associated click analytics data is also deleted (cascade).

Request

curl -X DELETE \
  -H "Authorization: Bearer trak_YOUR_API_KEY" \
  https://trak.sh/api/v1/links/my-link

Response (200 OK)

{
  "ok": true,
  "deleted": "my-link"
}

Errors

StatusErrorCause
404"Link not found"Slug doesn't exist or belongs to another user

Notes

  • This action is irreversible. All click data for this link is permanently deleted.
  • You can only delete links you own.

On this page