AffihubDocs
DocsGetting StartedQuickstart

Quickstart

Run the block below to provision a full sandbox, create a partner, fire a conversion event, and read the resulting commission. No dashboard, no signup — just curl. Replace you@example.com with your email.

API_KEY=$(curl -s -X POST https://api.affihub.com/api/v1/onboarding/quickstart \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com"}' | jq -r .api_key)
PARTNER_ID=$(curl -s -X POST https://api.affihub.com/api/v1/partners \
  -H "Authorization: Bearer $API_KEY" \
  -d '{"email":"test@partner.com"}' | jq -r .id)
curl -s -X POST https://api.affihub.com/api/v1/events \
  -H "Authorization: Bearer $API_KEY" \
  -d "{\"partner_id\":\"$PARTNER_ID\",\"event\":\"conversion\",\"amount_cents\":1000}"
curl -s https://api.affihub.com/api/v1/commissions \
  -H "Authorization: Bearer $API_KEY"