View your AFFILIFY data via API
Fetch the same statistics, conversions, brands and tracking links you see in the dashboard — into spreadsheets, BI tools, or your own scripts. You read data out. You do not send operator postbacks here.
Personal key
Create once in Settings → API access. Shown only once.
Your data only
Scoped to your account. Brand names match the app.
Dashboard metrics
The metrics behind Statistics, Conversions and Links. Totals can include conversions later rejected.
- GET/api/v1/stats/summaryPeriod totals + previous period
- GET/api/v1/stats/seriesDaily breakdown for a date range
- GET/api/v1/stats/hourlyLast 24 hours by hour
- GET/api/v1/stats/geoClicks by country
- GET/api/v1/conversionsRecent conversion events
- GET/api/v1/brandsActive brands you can promote
- GET/api/v1/brands/{id}/landingsLandings for a brand
- GET/api/v1/linksYour tracking links
- POST/api/v1/linksCreate a tracking link
- GET/api/v1/links/{id}One tracking link
- DELETE/api/v1/links/{id}Soft-delete a link
- POST/api/v1/links/{id}/restoreRestore a deleted link
Quick start
- Sign in → Settings → API access → generate a key. Copy it immediately (shown once).
- Call any endpoint below with
Authorization: Bearer YOUR_KEYover HTTPS. - Parse the JSON — every success body has
ok: true.
curl -H "Authorization: Bearer affa_…" \ "https://affilify.partners/api/v1/stats/summary?days=30"
Authentication
Keys start with affa_. We store only a hash — if you lose the raw key, revoke it and create a new one.
Pass the key with either header (both work):
Authorization: Bearer affa_… # or X-API-Key: affa_…
Do not put the key in public front-end code or shared repos.
Summary stats
Totals for the last N days, plus a previous window of equal length (for deltas). Matches the Statistics page.
| Param | Required | Description |
|---|---|---|
| days | No | Lookback window, 1–366. Default 30. |
{
"ok": true,
"days": 30,
"has_revshare": true,
"clicks": 24,
"registrations": 1,
"ftds": 0,
"deposits_count": 0,
"deposits_sum": 0,
"ngr": 0,
"conversions": 1,
"commission": 0,
"previous": { "clicks": 8, "registrations": 0, "ftds": 0, "…" : "…" }
}Daily series
Inclusive date range with per-day rows — same chart data as the dashboard date picker.
| Param | Required | Description |
|---|---|---|
| from | No | Start date YYYY-MM-DD. Default: 30 days ago. |
| to | No | End date YYYY-MM-DD. Default: today (UTC). |
Response includes totals, previous, and daily[] with date, clicks, registrations, ftds, ngr, commission. Max range 366 days.
Hourly (last 24 hours)
Last 24 hours in UTC hour buckets. Use this for the same “24h” view as Statistics.
Returns totals, previous (prior 24h), and hourly[] where each row has ts (bucket start) plus metrics.
GEO stats
Click volume by country for a lookback window, plus proxy share.
| Param | Required | Description |
|---|---|---|
| days | No | 1–366. Default 30. |
{
"ok": true,
"days": 30,
"total_clicks": 24,
"proxy_clicks": 17,
"countries": 3,
"top_countries": [
{ "country": "GB", "clicks": 17 },
{ "country": "CY", "clicks": 5 },
{ "country": "DE", "clicks": 2 }
]
}Conversions
Recent events on your links — registrations, FTDs, deposits, NGR, etc. Brand/operator company names are not included; link + campaign id are.
| Param | Required | Description |
|---|---|---|
| limit | No | 1–500. Default 100. |
| event_type | No | registration | ftd | deposit | ngr | purchase | subscription | lead | custom |
| include_test | No | true or 1 to include test events. Default false. |
{
"ok": true,
"count": 1,
"conversions": [{
"id": "…",
"event_type": "registration",
"amount": 0,
"currency": "USD",
"status": "approved",
"created_at": "2026-07-07T16:24:23Z",
"is_test": false,
"sub_ids": { "sub_id1": "…", "sub_id2": null },
"link": { "id": "…", "code": "6c1ia02o", "name": "goon", "campaign_id": "…" }
}]
}Brands & landings
Active brands you can promote (same catalogue as Brands in the app), and GEO/landing rows used when creating a link.
Landings return id, country, name (no raw destination URLs). Pass a landing id when creating a link.
{
"ok": true,
"campaign_id": "…",
"landings": [
{ "id": "…", "country": "GB", "name": "Bonus", "sort_order": 2, "is_default": false }
]
}Your links
List and manage tracking links. Each link (list, get and create) includes blocked and a ready-to-share tracking_url (/go/{code} on the same link domain the dashboard shows; null once the link is deactivated, see below). Sub-IDs are query params when you share the URL — not stored on the link.
| Param | Required | Description |
|---|---|---|
| include_deleted | No | On list: true or 1 to include soft-deleted links. |
| limit | No | On list: 1–500. Default 200. |
| campaign_id | Yes | On create (JSON body): brand id from /brands. |
| landing_id | No | On create: landing id from /landings (or omit for default). |
| name | No | On create: optional label for the link. |
{
"ok": true,
"count": 14,
"links": [{
"id": "…",
"code": "dhxjnue0",
"name": "test",
"status": "active",
"blocked": false,
"tracking_url": "https://…/go/dhxjnue0",
"clicks_count": 0,
"conversions_count": 0,
"commission_earned": 0,
"campaign": { "id": "…", "name": "CASINACHO", "image_url": "…" }
}]
}curl -X POST -H "Authorization: Bearer affa_…" \
-H "Content-Type: application/json" \
-d '{"campaign_id":"…","landing_id":"…","name":"DE FB"}' \
"https://affilify.partners/api/v1/links"Create uses the same rules as the dashboard (application, KYC, CPA gates). A blocked create returns link_gate with a message.
status is active or paused. AFFILIFY can deactivate a link: it then has blocked: true, status paused and tracking_url: null, and it no longer sends visitors anywhere. A deactivated link can't be deleted, restored or reactivated (link_blocked); its stats stay available.
Errors
All bodies are JSON with an ok flag.
| HTTP | error | Meaning |
|---|---|---|
| 401 | missing_api_key | No Bearer / X-API-Key header |
| 401 | invalid_key | Unknown or revoked key |
| 403 | account_inactive | Account closed, banned, or suspended |
| 403 | insufficient_scope | Key lacks stats or links scope |
| 403 | link_gate | Create blocked (application / KYC / CPA) |
| 403 | link_blocked | The link was deactivated by AFFILIFY and can't be deleted or restored |
| 400 | bad_days / bad_range | Invalid query window (from/to must be real YYYY-MM-DD dates) |
| 400 | bad_limit | limit is not a number from 1 to 500 |
| 400 | bad_event_type | Unknown event_type filter |
| 400 | bad_id | An id is not in the expected format |
| 400 | invalid_json | Request body is not a JSON object |
| 400 | missing_campaign_id | Create without campaign_id |
| 400 | campaign_inactive | Brand is not active |
| 400 | no_destination | Brand has no landing URL to link to |
| 404 | not_found / unknown_campaign, unknown_landing | Link id not found / brand or landing id not found |
| 500 | query_failed | Temporary server error, retry |
| 500 | create_failed | The link could not be created |
Operator postbacks (sending conversions into AFFILIFY) are documented separately at /docs.