Create Click-to-WhatsApp ad
Creates a Click-to-WhatsApp (CTWA) ad on Meta. When tapped, the ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page, and the full hierarchy (campaign, ad set, creative, ad) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Prerequisites enforced by Meta (surfaced as platform_error on failure), the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
API key authentication - use your Zernio API key as a Bearer token
In: header
Facebook or Instagram SocialAccount ID.
1 <= lengthMeta ad account ID, e.g. act_123456789.
1 <= lengthAd display name. Used to derive campaign / ad set names.
1 <= length1 <= length <= 255Primary text shown above the image / video.
1 <= lengthImage asset for image creatives. Mutually exclusive with
video. Required if video is not supplied.
uriVideo creative. Mutually exclusive with imageUrl.
Required if imageUrl is not supplied.
Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0.
0 <= value"daily" | "lifetime"ISO 4217 currency code matching the ad account's currency
(e.g. USD). Optional; Meta infers from the ad account
when omitted.
3 <= length <= 3ISO 8601 datetime. Required when budgetType is lifetime.
date-timeISO 3166-1 alpha-2 country codes. Defaults to ["US"].
13 <= value <= 6513 <= value <= 65Custom audience ID to target.
Meta's Advantage+ audience expansion. 0 (default) keeps
targeting strict; 1 lets Meta expand beyond the supplied
targeting when its delivery system finds better matches.
Always sent on CREATE (Meta requires it).
0 | 1Defaults to OUTCOME_ENGAGEMENT (the broadly-supported CTWA
objective). OUTCOME_SALES and OUTCOME_LEADS require
additional account configuration (Dataset linked to the WABA
for sales) and may be rejected by Meta if missing.
"OUTCOME_ENGAGEMENT" | "OUTCOME_SALES" | "OUTCOME_LEADS"Name of the legal entity benefiting from the ad. Required by Meta when targeting EU users (DSA Article 26). Not enforced at schema level; enforced server-side when targeting intersects EU member states.
length <= 100Name of the legal entity paying for the ad. Required by Meta when targeting EU users (DSA Article 26). Note Meta API spelling: dsa_payor (not dsa_payer).
length <= 100Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.ads.createCtwaAd({ body: { accountId: 'account_abc123', adAccountId: 'adaccount_abc123', name: 'Example', headline: 'string', body: 'Hello, world!', budgetAmount: 0, budgetType: 'daily', },});console.log(data);{
"ad": {},
"message": "string"
}{
"error": "Unauthorized"
}Search targeting interests GET
Search for interest-based targeting options available on the platform.
Create standalone ad POST
Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, and X/Twitter. Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules (Meta only) are documented on each property below.