B
BlocLinks
/Docs
Dashboard →
Docs/API Reference

API Reference

Base URL
https://attribution.bloclinks.cc

Authentication

⚠️All endpoints require x-api-secret header. These are server-to-server calls only. Never expose your API secret in client-side code.
bash
curl -X POST https://attribution.bloclinks.cc/api/attribution/clicks \
  -H "x-api-secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{...}'
POST/api/attribution/clicks

Record a click event. Called automatically by the link server.

Request body
json
{
  "linkId": "your-slug",
  "ip": "1.2.3.4",
  "ua": "Mozilla/5.0...",
  "country": "US",
  "timestamp": 1234567890000
}
Response
json
{
  "ok": true
}
POST/api/attribution/installs

Record an install. Called by the SDK on first app launch.

Request body
json
{
  "appId": "your-app-uuid",
  "deviceId": "device-uuid",
  "fingerprint": "ip|ua|country"
}
Response
json
{
  "installId": "uuid",
  "attributed": true,
  "campaignId": "campaign-id",
  "deepLinkPath": "/product/123"
}
GET/api/attribution/analytics/:appId

Get analytics for an app.

Response
json
{
  "totalClicks": 1842,
  "totalInstalls": 384,
  "attributedInstalls": 291,
  "links": [...]
}