Developer API
Server-to-server only. Send your site's key in the X-API-Key header. Keys are issued by SpLink admins and shown once.
curl -X POST "$SPLINK_BASE_URL/api/v1/links" \
-H "X-API-Key: $SPLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"long_url":"https://foodpulse.net/recipes/appam"}'
# → { "slug": "a1B2c3D", "short_url": "https://splink.pro/a1B2c3D", ... }/api/v1/whoamiCheck your key and which deployment you're talking to. Call once at startup.
/api/v1/linksCreate one link. Body: { long_url, alias?, expires_at?, password? }. Plain links are de-duplicated per site.
/api/v1/links/bulkCreate up to 500 links. Body: { items: [{ long_url, alias?, ref? }] }. Row errors don't stop the batch; ref is echoed back.
/api/v1/links?limit=100Your site's most recent links.
/api/v1/links/{slug}/statsClicks, last scan, referrers, countries and devices for one link.
/api/v1/analytics/summaryTotals and breakdowns for your whole site.
/api/v1/analytics/clicks.csv?since=&until=Raw click export (CSV).
/api/v1/webhooksSubscribe to link.clicked events. Body: { url }. Returns a signing secret once.
/api/v1/webhooksList webhooks with delivery health.
/api/v1/webhooks/{id}/rotate-secretNew signing secret; re-enables a paused hook.
/api/v1/webhooks/{id}Unsubscribe.
/api/qr/{slug}?fmt=png|svg&size=10QR image for any live link (no key needed).
/go/{slug}Plain 307 redirect for crawlers and link previews.
Verifying webhooks
Each delivery carries X-SpLink-Signature: sha256=<hex> — an HMAC-SHA256 of the raw body with your secret. Compare in constant time. Failed deliveries retry once; a hook pauses after 20 failures in a row.
Errors
401 missing/invalid key · 409 name taken or reserved · 410 expired · 422 bad URL or input. Error bodies look like { "detail": "..." }.