Idlen Logo
Advertiser API

Overview

Authentication, scopes, rate limit, and errors for the Idlen Advertiser API

Overview

The Advertiser API manages one advertiser organization: the organization that owns the API key. It lists and updates campaigns, ads, stats, and the wallet. Server-side conversions use a separate endpoint. An MCP server calls this same API.

There is no staff path and no cross-organization path. A resource that belongs to another organization is not found.

Base URL

https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api

Paths are appended directly. There is no /v1 prefix.

curl 'https://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api/campaigns' \
  -H 'Authorization: Bearer idl_adv_xxx'
FunctionURL
Advertiser APIhttps://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-api
Conversions APIhttps://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/conversions-api
MCP serverhttps://tyfrhxfejrawgdlhryfu.supabase.co/functions/v1/advertiser-mcp

The OpenAPI document lists every field and status code: advertiser-api.yaml.

API keys

Create a key in Ads Manager, under Settings → API keys. Only an organization owner or admin can create or revoke keys. An organization can have 25 active keys.

The key is shown in full once, at creation. It starts with idl_adv_. Later, the dashboard shows the prefix only.

Send it on every request, either way:

-H 'Authorization: Bearer idl_adv_xxx'
-H 'x-api-key: idl_adv_xxx'

A missing, malformed, or revoked key returns 401.

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key"
  }
}

Scopes

A key has one or more of conversions, read, and write. write does not include read. A key created without an explicit scope list is conversions only.

ScopeAllows
readGET campaigns, ads, stats, wallet, transactions
writePOST and PATCH campaigns, ads, pause, resume, deposit Checkout
conversionsPOST on the separate conversions endpoint only

The wrong scope returns 403 with insufficient_scope.

Rate limit

advertiser-api allows 120 requests per key per 60 seconds. The window is fixed. A 429 includes Retry-After (seconds) and:

HeaderMeaning
X-RateLimit-LimitRequests allowed in the current window (120)
X-RateLimit-RemainingRequests left after this one
X-RateLimit-ResetUnix time when the window ends

The conversions endpoint does not use this budget. POST /ads/from-url also shares the landing-page extractor limit of 10 requests per organization per hour.

The MCP server uses the same 120 requests per minute. It authenticates once per HTTP call and does not count that call twice.

Idempotency-Key

POST requests accept Idempotency-Key (1–255 printable ASCII characters). The same key and the same body replay the first response for 24 hours. The key is scoped to the API key.

SituationStatuserror.code
Same key, different body409idempotency_key_reused
Same key, first request still running409idempotency_in_progress
Key is not 1–255 printable ASCII400invalid_request

PATCH does not use this header.

Errors

Advertiser API errors use this shape:

{
  "error": {
    "code": "not_found",
    "message": "Campaign not found"
  }
}

Activation errors can also include campaign_id and dashboard_url.

StatuscodeWhen
400invalid_requestBad query, body, or id
401unauthorizedMissing or unknown key
403insufficient_scopeKey lacks read or write
404not_foundUnknown path, or the resource is not in this organization
405method_not_allowedVerb not allowed. The Allow header lists the verbs.
409first_campaign_requires_dashboard_validationThe organization's first API campaign cannot be turned on here
409insufficient_balanceWallet balance is zero
409ads_pending_moderationNo ad is approved yet
409ad_requiredThe campaign has no ad that can deliver
409no_active_ad_setThe campaign has no ad set that can go active
429rate_limitedOver 120 requests in the current window, or the landing-page limit
500internal_errorServer error
503not_readyThe API, Checkout, or creative extraction is not configured

Days and date filters are UTC. Amounts on the wallet, transactions, stats, budgets, and bids are cents of the wallet currency. That currency is EUR unless the wallet row stores another three-letter code. Transaction rows and stat days do not include a currency field.

Pages

Copyright © 2026