Create ad stats
Changed onRecords a runner's stats for one of their ads in one hour, and pays them for the spend. Send the ad's totals so far for an hour that started in the last 24 hours; they replace what the ad held for that hour, and its ad group's and campaign's hours are rebuilt from their ads. The spend can go up but never down. Reporting on a campaign starts with the hour of its first recorded report; earlier hours are refused. The spend is recorded and paid exactly as sent, with no markup added, so send it with the runner's markup already applied. Takes the runner's Whop session, a user API key, or a user OAuth token with ad_campaign:update. A token without that scope gets a 403, and anyone not holding the ad's campaign gets a 404.
Request
- Base URLhttps://api.whop.com/api/v1
- URLhttps://api.whop.com/api/v1/ad_stats
- AuthHTTP bearer
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
Example request
{
"ad_id": "ad_xxxxxxxxxxxxxx",
"hour_started_at": "2026-01-01T12:00:00.000Z"
}Response
stats recorded
Example response
{
"ad_campaign_id": "adcamp_xxxxxxxxxxxxxx",
"ad_group_id": "adgrp_xxxxxxxxxxxxxx",
"ad_id": "ad_xxxxxxxxxxxxxx",
"clicks": 150,
"hour_started_at": "2026-01-01T12:00:00.000Z",
"impressions": 6000,
"spend": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
}Changes
- info
endpoint added
- info