RefCampaign/docs

Record a click event

Public endpoint hit by the browser SDK when a referral link is followed. No authentication required — the request is rate-limited per IP and attributed to a campaign via the `tracking_url` parameter.

POST
/api/v1/track/click

Public endpoint hit by the browser SDK when a referral link is followed. No authentication required — the request is rate-limited per IP and attributed to a campaign via the tracking_url parameter.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://app.refcampaign.com/api/v1/track/click" \  -H "Content-Type: application/json" \  -d '{    "tracking_url": "string",    "session_id": "string"  }'
Empty
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}