Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Headers

Idempotency-Key
string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Maximum string length: 255

Body

application/json

CTWA ad.

account_id
string
ad_account_id
string
name
string
special_ad_categories
enum<string>[]

Meta only. Declare what the ad offers: HOUSING (homes for sale or rent, mortgages, home insurance), EMPLOYMENT, FINANCIAL_PRODUCTS_SERVICES (loans, credit, insurance, investing), ISSUES_ELECTIONS_POLITICS or ONLINE_GAMBLING_AND_GAMING. It is set on the new campaign and this API cannot add it later. With the first three, Meta rejects narrowed targeting: omit age_min, age_max and gender, and use no ZIP codes, lookalikes or location exclusions.

Available options:
HOUSING,
EMPLOYMENT,
FINANCIAL_PRODUCTS_SERVICES,
ISSUES_ELECTIONS_POLITICS,
ONLINE_GAMBLING_AND_GAMING
special_ad_category_country
string[]

Meta only. Countries the category applies to, as ISO 3166-1 alpha-2 codes, e.g. ["US"]. Send the countries the ad targets. Requires special_ad_categories.

Response

Created ad(s).

Created ad(s).