Public API

Create links and read analytics with a Sanctum bearer token.

Mint and revoke tokens on token management. Send the plaintext token on every request:

Authorization: Bearer YOUR_API_TOKEN
Accept: application/json

Create a link

POST https://hopkit.net/api/links

curl -X POST https://hopkit.net/api/links \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"long_url":"https://example.com/campaign","snippet_name":"Spring launch"}'

Link analytics

GET https://hopkit.net/api/links/{id}/stats

curl https://hopkit.net/api/links/{id}/stats \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"