Skip to content
Documentation menu
HTTP APIReporting

Earnings

GET/api/v1/earnings

Pull your earnings programmatically. Same Bearer token as the ad endpoints — no separate stats key. Aggregates impressions, clicks, and earnings over a recent window, with optional per-platform scoping and a per-day breakdown. Impressions and earnings are also split by creative format (image vs text).

Authentication

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Query parameters

FieldTypeDescription
platform_idstringScope to a single platform (plt_…). Omit to aggregate across all platforms owned by the API key's publisher.
daysnumberInteger from 1 to 90. Default: 30. Current reports can include the day before period.from.

Example

curl "https://sidekick-ads.com/api/v1/earnings?platform_id=plt_xxx&days=7" \
-H "Authorization: Bearer sk_live_xxxxx"

Response

200 OK
{
"publisher_id": 50,
"scope": "platform",
"platform": {
"public_id": "plt_xxx",
"name": "AI Chat Companion",
"type": "telegram"
},
"period": {
"from": "2026-05-08",
"to": "2026-05-14",
"days": 7
},
"total": {
"impressions": 2561,
"image_impressions": 320,
"text_impressions": 2241,
"clicks": 40,
"ctr": 1.5619,
"earnings_micro": 8195200,
"earnings_usd": 8.1952,
"image_earnings_micro": 1920000,
"image_earnings_usd": 1.92,
"text_earnings_micro": 6275200,
"text_earnings_usd": 6.2752
},
"daily": [
{
"day": "2026-05-13",
"impressions": 1200,
"image_impressions": 0,
"text_impressions": 1200,
"clicks": 18,
"earnings_micro": 3840000,
"earnings_usd": 3.84,
"image_earnings_micro": 0,
"image_earnings_usd": 0,
"text_earnings_micro": 3840000,
"text_earnings_usd": 3.84
},
{
"day": "2026-05-14",
"impressions": 1361,
"image_impressions": 320,
"text_impressions": 1041,
"clicks": 22,
"earnings_micro": 4355200,
"earnings_usd": 4.3552,
"image_earnings_micro": 1920000,
"image_earnings_usd": 1.92,
"text_earnings_micro": 2435200,
"text_earnings_usd": 2.4352
}
]
}

earnings_micro is what you actually got paid in micro-USD (1 USD = 1,000,000 micro). earnings_usd is provided for human reading. image_* and text_* fields split impressions and earnings by the creative format of the ad shown — image creatives typically pay a higher per-impression rate. Historical events from before image ads existed all count as text. The two splits always sum to the totals (image_impressions + text_impressions = impressions, image_earnings_micro + text_earnings_micro = earnings_micro). The daily array only contains days with activity — zero-volume days are omitted. When no platform_id is passed, scope is "all" and platform is null.

Error responses

StatusMeaning
400Invalid days (integer 1–90) or malformed platform_id (must start with plt_).
401Invalid or missing API key.
404platform_id doesn't exist or doesn't belong to this account.