← Docs

Postback API

Server-to-server conversion API. Call from your backend when a lead or sale is completed.

Endpoint

POST /api/postback

Body (JSON)

FieldRequiredDescription
offerIdYesLeadsRefer offer ID
affiliateIdYesLeadsRefer affiliate (user) ID
amountNoPayout amount; defaults to offer's payout value
clickIdNoLeadsRefer click ID for attribution; must match offer+affiliate. If omitted, last click within attribution window is used.
externalIdNoYour unique transaction/lead ID; idempotency key

Example

curl -X POST https://your-app.com/api/postback \
  -H "Content-Type: application/json" \
  -d '{"offerId":"...","affiliateId":"...","externalId":"lead-12345"}'

Response codes

  • 200 – Conversion recorded or idempotent
  • 400 – Missing or invalid fields
  • 403 – Affiliate not approved
  • 404 – Offer not found or inactive
  • 409 – Duplicate (clickId or externalId already used)
  • 422 – clickId mismatch or fraud rules
  • 429 – Conversion cap reached