Rest API
Create and read your own shortlinks programmatically using a personal API key.
Endpoints
POST
/api/v1/links
Create a new shortlink from a destination URL, with an optional custom alias.
curl -X POST https://api.safelinkme.net/api/v1/links \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/page","alias":"my-code"}'
GET
/api/v1/links/:code
Retrieve stats for a specific link you own — views, earnings, and creation date.
curl https://api.safelinkme.net/api/v1/links/abcd12 \
-H "Authorization: Bearer YOUR_API_KEY"
GET
/api/v1/links
List all links belonging to your account, 50 per page.
curl https://api.safelinkme.net/api/v1/links?page=1 \
-H "Authorization: Bearer YOUR_API_KEY"