API Documentation: Integrate AffiliHub with Your Casino Tech Stack in Under 2 Hours
Here's what nobody tells you about affiliate software APIs: most are built by developers who've never run a casino operation. You get 200+ endpoints you'll never use, authentication flows that break during high-traffic spins, and documentation written like a computer science thesis.
We built AffiliHub's API after watching operators waste 40+ dev hours integrating platforms that couldn't handle Black Friday traffic spikes. Our RESTful API has 23 core endpoints. That's it. Each one solves a specific tracking, commission, or reporting problem you actually have.
This documentation walks you through everything from initial authentication to custom webhook configurations. If you're technical enough to integrate payment processors, you can get our affiliate software platform live in an afternoon.
Authentication and API Keys: Security That Doesn't Slow You Down
We use OAuth 2.0 with JWT tokens. Standard industry practice, nothing exotic. Your API credentials live in Settings > Developers > API Access. Generate a key, get your client_id and client_secret, start making calls.
Token expiration: 24 hours by default. Refresh tokens valid for 90 days. Rate limits: 1,000 requests per minute for tracking endpoints (because real-time matters), 100/min for reporting queries (nobody needs to pull affiliate stats 1,000 times per minute).
Quick Start Authentication Flow
POST to /api/v2/auth/token with your credentials. Response includes access_token and refresh_token. Include access_token in Authorization header for all subsequent requests: "Authorization: Bearer {your_token}". That's the entire authentication story.
IP whitelisting available for enterprise accounts. Webhook signatures use HMAC-SHA256 for payload verification. If you're handling sensitive player data across state lines, our security and compliance standards page covers the regulatory side.
Core Tracking Endpoints: Where the Money Actually Lives
These four endpoints handle 90% of affiliate tracking scenarios:
- POST /api/v2/events/click - Register affiliate click with GEO, device, and source data
- POST /api/v2/events/registration - Track player signup with attribution window matching
- POST /api/v2/events/deposit - First-time depositor conversion with amount and payment method
- POST /api/v2/events/activity - Ongoing player value for revenue share calculations
Each endpoint accepts JSON payloads with required fields (player_id, affiliate_id, timestamp) and optional metadata (campaign_id, sub_id, landing_page). Response time averages 47ms at 95th percentile. During March Madness traffic? Still under 120ms.
Handling Attribution Windows and Multi-Touch
Default attribution: last-click within 30 days. Override with attribution_model parameter: first-click, linear, time-decay. Most operators stick with last-click because it's defensible when affiliates question commission splits.
Multi-device tracking works through our fingerprinting system. If a player clicks affiliate link on mobile, registers on desktop - we catch it. Cross-domain tracking requires cookie consent compliance (we handle CCPA/GDPR requirements automatically in supported states).
Webhook Configuration: Real-Time Updates Without Polling
Stop polling our API every 30 seconds to check for new conversions. Configure webhooks once, receive instant POST notifications when events happen. We support 12 webhook events including player_registered, first_deposit_completed, commission_calculated, and fraud_flag_triggered.
Setup takes three steps: define endpoint URL in dashboard, select events to monitor, verify signature in your receiver. Our webhooks include retry logic (exponential backoff, 5 attempts over 6 hours) because networks fail and that shouldn't cost you attribution data.
Custom Webhook Payloads for Complex Setups
Need to include custom fields in webhook data? Use the payload_template parameter. Want webhooks only for specific affiliate tiers or GEOs? Event filtering supports AND/OR logic across 18 player and affiliate attributes. This is how enterprise operators route different conversion types to separate internal systems.
Webhook security: every payload includes X-AffiliHub-Signature header. Verify using your webhook secret (not your API secret - different keys for different purposes). Sample verification code in 7 languages available in our GitHub examples repo.
Reporting and Analytics Endpoints: Data Without the Delay
GET /api/v2/reports/performance pulls affiliate metrics with flexible date ranges and grouping. Response includes clicks, conversions, revenue, commission owed - basically everything from the dashboard in JSON format. Default pagination: 100 results per page, max 1,000.
Query parameters worth knowing: group_by (affiliate, campaign, date, geo), metric_type (revenue_share, cpa, hybrid), status_filter (pending, approved, paid). Want to see which affiliates drove the most high-value players last quarter? This endpoint + 4 parameters = your answer in 2 seconds.
Real-Time vs Batch Reporting
Real-time endpoints (/api/v2/reports/live) update every 30 seconds. Use these for dashboards and alerts. Batch endpoints (/api/v2/reports/historical) process overnight, include fraud filtering and chargeback adjustments. Use these for accurate commission calculations.
Most operators query real-time for monitoring, batch for payouts. Mixing the two causes "why don't these numbers match?" support tickets. Our core features page explains the reporting logic differences if you're building custom BI integrations.
Advanced Integration Patterns for Multi-Brand Operations
Running multiple casino brands through one affiliate network? Use our workspace API (/api/v2/workspaces) to manage separate tracking domains, commission structures, and affiliate pools under one master account. Each workspace gets isolated data - affiliates promoting Brand A never see Brand B performance.
White-label operators: our API supports custom branding parameters. Pass brand_id with tracking calls, get branded reporting endpoints, even customize webhook payload structure per brand. This is how affiliates integrate once and promote your entire portfolio without touching code again.
SDK Libraries and Code Examples: Because Nobody Codes From Scratch
Official SDKs in PHP, Node.js, Python, Ruby, and C#. Each includes connection handling, automatic token refresh, webhook verification helpers, and error handling. Install via package manager (npm, pip, composer), initialize with credentials, start tracking.
Don't see your language? Our RESTful API works with any HTTP client. We've seen successful platform integrations using Go, Java, even legacy Perl systems. The documentation includes curl examples for every endpoint - convert to your preferred language from there.
Getting Technical Support That Actually Understands Your Stack
API support channel: [email protected] with [API] in subject line. Average first response: 2.3 hours during business hours. After-hours? We monitor critical tracking endpoints 24/7. If clicks stop registering at 2am Saturday, you'll get a proactive alert before your affiliates email you.
Enterprise accounts get dedicated Slack channel with our platform team. Not outsourced support reading scripts - the developers who built these endpoints. When you're pushing 50K clicks per hour during a major sporting event, that response time difference matters.
Ready to integrate? Generate your API credentials in the dashboard and start with our Quick Start tutorial. Most operators have test tracking live within an hour. Questions on specific endpoints? Our API reference includes interactive examples you can test directly from the docs.
API Documentation: Integrate AffiliHub with Your Casino Tech Stack in Under 2 Hours
Here's what nobody tells you about affiliate software APIs: most are built by developers who've never run a casino operation. You get 200+ endpoints you'll never use, authentication flows that break during high-traffic spins, and documentation written like a computer science thesis.
We built AffiliHub's API after watching operators waste 40+ dev hours integrating platforms that couldn't handle Black Friday traffic spikes. Our RESTful API has 23 core endpoints. That's it. Each one solves a specific tracking, commission, or reporting problem you actually have.
This documentation walks you through everything from initial authentication to custom webhook configurations. If you're technical enough to integrate payment processors, you can get our affiliate software platform live in an afternoon.
Authentication and API Keys: Security That Doesn't Slow You Down
We use OAuth 2.0 with JWT tokens. Standard industry practice, nothing exotic. Your API credentials live in Settings > Developers > API Access. Generate a key, get your client_id and client_secret, start making calls.
Token expiration: 24 hours by default. Refresh tokens valid for 90 days. Rate limits: 1,000 requests per minute for tracking endpoints (because real-time matters), 100/min for reporting queries (nobody needs to pull affiliate stats 1,000 times per minute).
Quick Start Authentication Flow
POST to /api/v2/auth/token with your credentials. Response includes access_token and refresh_token. Include access_token in Authorization header for all subsequent requests: "Authorization: Bearer {your_token}". That's the entire authentication story.
IP whitelisting available for enterprise accounts. Webhook signatures use HMAC-SHA256 for payload verification. If you're handling sensitive player data across state lines, our security and compliance standards page covers the regulatory side.
Core Tracking Endpoints: Where the Money Actually Lives
These four endpoints handle 90% of affiliate tracking scenarios:
Each endpoint accepts JSON payloads with required fields (player_id, affiliate_id, timestamp) and optional metadata (campaign_id, sub_id, landing_page). Response time averages 47ms at 95th percentile. During March Madness traffic? Still under 120ms.
Handling Attribution Windows and Multi-Touch
Default attribution: last-click within 30 days. Override with attribution_model parameter: first-click, linear, time-decay. Most operators stick with last-click because it's defensible when affiliates question commission splits.
Multi-device tracking works through our fingerprinting system. If a player clicks affiliate link on mobile, registers on desktop - we catch it. Cross-domain tracking requires cookie consent compliance (we handle CCPA/GDPR requirements automatically in supported states).
Webhook Configuration: Real-Time Updates Without Polling
Stop polling our API every 30 seconds to check for new conversions. Configure webhooks once, receive instant POST notifications when events happen. We support 12 webhook events including player_registered, first_deposit_completed, commission_calculated, and fraud_flag_triggered.
Setup takes three steps: define endpoint URL in dashboard, select events to monitor, verify signature in your receiver. Our webhooks include retry logic (exponential backoff, 5 attempts over 6 hours) because networks fail and that shouldn't cost you attribution data.
Custom Webhook Payloads for Complex Setups
Need to include custom fields in webhook data? Use the payload_template parameter. Want webhooks only for specific affiliate tiers or GEOs? Event filtering supports AND/OR logic across 18 player and affiliate attributes. This is how enterprise operators route different conversion types to separate internal systems.
Webhook security: every payload includes X-AffiliHub-Signature header. Verify using your webhook secret (not your API secret - different keys for different purposes). Sample verification code in 7 languages available in our GitHub examples repo.
Reporting and Analytics Endpoints: Data Without the Delay
GET /api/v2/reports/performance pulls affiliate metrics with flexible date ranges and grouping. Response includes clicks, conversions, revenue, commission owed - basically everything from the dashboard in JSON format. Default pagination: 100 results per page, max 1,000.
Query parameters worth knowing: group_by (affiliate, campaign, date, geo), metric_type (revenue_share, cpa, hybrid), status_filter (pending, approved, paid). Want to see which affiliates drove the most high-value players last quarter? This endpoint + 4 parameters = your answer in 2 seconds.
Real-Time vs Batch Reporting
Real-time endpoints (/api/v2/reports/live) update every 30 seconds. Use these for dashboards and alerts. Batch endpoints (/api/v2/reports/historical) process overnight, include fraud filtering and chargeback adjustments. Use these for accurate commission calculations.
Most operators query real-time for monitoring, batch for payouts. Mixing the two causes "why don't these numbers match?" support tickets. Our core features page explains the reporting logic differences if you're building custom BI integrations.
Advanced Integration Patterns for Multi-Brand Operations
Running multiple casino brands through one affiliate network? Use our workspace API (/api/v2/workspaces) to manage separate tracking domains, commission structures, and affiliate pools under one master account. Each workspace gets isolated data - affiliates promoting Brand A never see Brand B performance.
White-label operators: our API supports custom branding parameters. Pass brand_id with tracking calls, get branded reporting endpoints, even customize webhook payload structure per brand. This is how affiliates integrate once and promote your entire portfolio without touching code again.
SDK Libraries and Code Examples: Because Nobody Codes From Scratch
Official SDKs in PHP, Node.js, Python, Ruby, and C#. Each includes connection handling, automatic token refresh, webhook verification helpers, and error handling. Install via package manager (npm, pip, composer), initialize with credentials, start tracking.
Don't see your language? Our RESTful API works with any HTTP client. We've seen successful platform integrations using Go, Java, even legacy Perl systems. The documentation includes curl examples for every endpoint - convert to your preferred language from there.
Getting Technical Support That Actually Understands Your Stack
API support channel: [email protected] with [API] in subject line. Average first response: 2.3 hours during business hours. After-hours? We monitor critical tracking endpoints 24/7. If clicks stop registering at 2am Saturday, you'll get a proactive alert before your affiliates email you.
Enterprise accounts get dedicated Slack channel with our platform team. Not outsourced support reading scripts - the developers who built these endpoints. When you're pushing 50K clicks per hour during a major sporting event, that response time difference matters.
Ready to integrate? Generate your API credentials in the dashboard and start with our Quick Start tutorial. Most operators have test tracking live within an hour. Questions on specific endpoints? Our API reference includes interactive examples you can test directly from the docs.