Read
Read
GET routes require the read scope. Replace nothing in the host below. The key in the examples is a placeholder.
https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api
List responses are:
{
"data": [],
"next_cursor": null,
"has_more": false
}
limit is 1–100 and defaults to 50. Pass next_cursor back as cursor. Do not build the cursor yourself.
There is no /ad-sets route and no CSV route. Creating a campaign creates its ad set. Bids, budgets, placements, countries, and tech stack are fields on the campaign. Each ad includes ad_set_id. Daily stats are JSON from GET /campaigns/{id}/stats. CSV export in Ads Manager is computed in the browser and is not an API endpoint.
Campaigns
curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/campaigns?limit=50' \
-H 'Authorization: Bearer idl_adv_xxx'
| Query | Meaning |
|---|---|
limit | Page size, 1–100, default 50 |
cursor | next_cursor from the previous page |
include_archived | true includes campaigns with archived_at set. Default false |
curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/campaigns/CAMPAIGN_UUID' \
-H 'Authorization: Bearer idl_adv_xxx'
GET /campaigns/{id} returns { "data": { ... } }. The id must be a UUID. A campaign outside this organization is 404.
status is draft, active, paused, or completed. created_via is adsmanager or api. The response also includes the earliest ad set's bid, billing model (cpm or cpc), placements, countries, and tech stack. countries: null means worldwide.
Ads
GET /ads and GET /creatives are the same list. GET /ads/{id} and GET /creatives/{id} are the same ad.
curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/ads?campaign_id=CAMPAIGN_UUID' \
-H 'Authorization: Bearer idl_adv_xxx'
| Query | Meaning |
|---|---|
campaign_id | Only ads on this campaign. Unknown campaign is 404 |
limit, cursor | Same paging as campaigns |
is_approved is null while the ad is pending review, true when approved, and false when rejected. is_active is false until it can deliver. rejection_reason is set when an ad is rejected.
Stats
One row per UTC day, inclusive. The default range is the last 30 days through today. The range cannot exceed 366 days.
curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/campaigns/CAMPAIGN_UUID/stats?from=2026-10-01&to=2026-11-01' \
-H 'Authorization: Bearer idl_adv_xxx'
{
"data": {
"campaign_id": "CAMPAIGN_UUID",
"from": "2026-10-01",
"to": "2026-11-01",
"days": [
{
"day": "2026-10-01",
"impressions": 0,
"clicks": 0,
"spend_cents": 0,
"conversions": 0
}
]
}
}
Impressions, clicks, and spend count billed impressions (paid_amount_cents). spend_cents is cents of the wallet currency and the row has no currency field. Conversions follow the campaign's conversion_event and conversion_window_days (7 days when unset). An unknown campaign returns 404. A known campaign returns one row per day in the range, including zeros.
from and to are YYYY-MM-DD. from after to, or a range over 366 days, returns 400.
Wallet
curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/wallet' \
-H 'Authorization: Bearer idl_adv_xxx'
{
"data": {
"organization_id": "ORG_UUID",
"balance_cents": 10000,
"currency": "EUR"
}
}
balance_cents is cents of currency. On this platform that is EUR, unless the wallet row stores another three-letter code.
curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/wallet/transactions?limit=50' \
-H 'Authorization: Bearer idl_adv_xxx'
Deposits are positive amount_cents. Spends are negative. type is deposit, campaign_spend, refund, or adjustment. Payment processor references are not returned. Transaction rows do not include a currency field.