Ads

Records 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.

post/ad_stats

Request

  • Base URL
    https://api.whop.com/api/v1
  • URL
    https://api.whop.com/api/v1/ad_stats
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

ad_idstring required

The ad's ID, prefixed ad_: the campaign's ad or the runner's copy of it.

hour_started_atstring date-time required

Start of the hour, on the hour, within the last 24 hours.

Example request

{
  "ad_id": "ad_xxxxxxxxxxxxxx",
  "hour_started_at": "2026-01-01T12:00:00.000Z"
}

Response

stats recorded

ad_campaign_idstring required

The ID of the ad's campaign, prefixed adcamp_.

ad_group_idstring required

The ID of the ad's ad group, prefixed adgrp_.

ad_idstring required

The ad's ID, prefixed ad_, as sent.

clicksinteger required

The ad's clicks in the hour.

hour_started_atstring required

Start of the hour, as an ISO 8601 timestamp.

impressionsinteger required

The ad's impressions in the hour.

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