Create ads that open a chat thread
Builds a whole campaign hierarchy in ONE call, or supplies adSetId to add creatives and ads under an existing Meta ad set while preserving its learning history. adSetId cannot be combined with campaign or adSet. A new campaign is created PAUSED and only flipped to ACTIVE as the LAST step. On the existing-ad-set path every new ad is created PAUSED and only flipped after ALL requested ads exist; the parent campaign/ad set is never paused because doing so could interrupt unrelated delivery.
PARTIAL FAILURE LEAVES WHAT IT BUILT. There is no compensating delete: if a later step fails, the campaign and ad set that already exist stay on the platform, paused, and the error carries them in details.created as {kind, platformId} entries. That is deliberate -- a surviving ad set is a HANDLE, not litter, and deleting it would close the documented way to continue.
The objects materialize in /v1/ads/tree on the next sync discovery pass, so no row is written locally here.
This endpoint accepts MORE THAN ONE ad under a single ad set: one creative each, all sharing the campaign, the ad set and the targeting. The response arrays line up with the request ads array.
The chat surface is chosen with the creative appDestination field (WHATSAPP or MESSENGER). Instagram Direct is NOT offered: the platform publishes no example of the value it expects, and sending an invented one would build a valid-looking ad on an undocumented field.
Authentication
The following security requirement applies to this operation.
Read the authentication guideParameters
Idempotency-KeyheaderoptionalClient-generated unique key that makes retries safe. The same key with the same body replays the original 201 without calling the platform again; the same key with a different body is a 422, and a key still being processed is a 409.
A request whose worst-case duration is longer than the replay lease is REFUSED with 422 rather than accepted, because a retry could otherwise start a second chain while the first is still running. Send fewer ads to fit, or send no key at all and accept that a retry duplicates the whole hierarchy.
Idempotency-Keystring- maxLength
255
Original schema
{
"type": "string",
"maxLength": 255
}Request body
Bodyobjectrequired
- additionalProperties
false- required
[ "accountId", "adAccountId", "ads" ]
accountIdstringrequiredSocial account id used to resolve the Meta token.
adAccountIdstringrequiredMeta ad account id (act_<n>).
campaignallOf
Required unless adSetId is supplied.
allOf / 1object
- required
[ "name", "goal" ]
namestringrequired- maxLength
255
goalstringrequiredMapped to the ODAX objective. The mapping is the one POST /v1/ads/campaigns uses; page_likes maps to OUTCOME_ENGAGEMENT. video_views and job_applicants are NOT accepted for the reason written there.
- enum
[ "engagement", "page_likes", "traffic", "awareness", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales" ]
specialAdCategoriesarray
Regulated-category declarations. Duplicates are rejected.
Array itemstring- enum
[ "HOUSING", "EMPLOYMENT", "CREDIT", "ISSUES_ELECTIONS_POLITICS", "FINANCIAL_PRODUCTS_SERVICES", "ONLINE_GAMBLING_AND_GAMING" ]
buyingTypestringOmit it and no buying type is sent at all, leaving the platform default in force -- this API does not substitute one. RESERVED is the reach-and-frequency path and pairs with adSet.rfPredictionId.
- enum
[ "AUCTION", "RESERVED" ]
adSetallOf
Required unless adSetId is supplied.
allOf / 1object
- required
[ "name", "billingEvent", "optimizationGoal", "targeting" ]
namestringrequired- maxLength
255
billingEventstringrequired- enum
[ "APP_INSTALLS", "CLICKS", "IMPRESSIONS", "LINK_CLICKS", "LISTING_INTERACTION", "NONE", "OFFER_CLAIMS", "PAGE_LIKES", "POST_ENGAGEMENT", "PURCHASE", "THRUPLAY" ]
optimizationGoalstringrequired- enum
[ "ADVERTISER_SILOED_VALUE", "AD_RECALL_LIFT", "APP_INSTALLS", "APP_INSTALLS_AND_OFFSITE_CONVERSIONS", "AUTOMATIC_OBJECTIVE", "CONVERSATIONS", "DERIVED_EVENTS", "ENGAGED_PAGE_VIEWS", "ENGAGED_USERS", "EVENT_RESPONSES", "IMPRESSIONS", "IN_APP_VALUE", "LANDING_PAGE_VIEWS", "LEAD_GENERATION", "LINK_CLICKS", "MEANINGFUL_CALL_ATTEMPT", "MESSAGING_APPOINTMENT_CONVERSION", "MESSAGING_DEEP_CONVERSATION_AND_FOLLOW", "MESSAGING_PURCHASE_CONVERSION", "NONE", "OFFSITE_CONVERSIONS", "PAGE_LIKES", "POST_ENGAGEMENT", "PROFILE_AND_PAGE_ENGAGEMENT", "PROFILE_VISIT", "QUALITY_CALL", "QUALITY_LEAD", "REACH", "REMINDERS_SET", "SUBSCRIBERS", "THRUPLAY", "VALUE", "VISIT_INSTAGRAM_PROFILE" ]
targetingobjectrequiredMeta targeting object, forwarded to the platform VERBATIM -- no key is renamed, added or dropped. geo_locations.countries is required by the platform and checked before the request leaves this API.
THIS IS NOT the canonical camelCase TargetingSpec used by /v1/ads/targeting/reach-estimate: the ad-set create primitive takes the platform wire shape, and the canonical translator lives inside the adapter where it is not reachable from here. Writing a second copy of that translation is what this repository forbids by name, so the wire shape is published instead of a half-true camelCase surface.
dailyBudgetMinorUnitsnumberEXACTLY ONE of dailyBudgetMinorUnits / lifetimeBudgetMinorUnits is required. The value is forwarded unchanged and the platform reads it in the MINOR unit of the ad account currency -- cents for USD.
lifetimeBudgetMinorUnitsnumberEXACTLY ONE of dailyBudgetMinorUnits / lifetimeBudgetMinorUnits is required. A lifetime budget also requires endTime.
bidStrategystring- enum
[ "LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS" ]
bidAmountMinorUnitsnumberstartTimestring- format
date-time
endTimestring- format
date-time
destinationTypestringWhere the ad sends people. PHONE_CALL is the call path; the messaging paths use the MESSENGER / WHATSAPP members. The combination of objective, optimisation goal and destination is NOT validated here -- primary platform documents contradict each other on which triples are legal, so the platform is left to refuse.
- enum
[ "APP", "APPLINKS_AUTOMATIC", "FACEBOOK", "FACEBOOK_LIVE", "FACEBOOK_PAGE", "IMAGINE", "INSTAGRAM_DIRECT", "INSTAGRAM_LIVE", "INSTAGRAM_PROFILE", "INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE", "MESSAGING_INSTAGRAM_DIRECT_MESSENGER", "MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP", "MESSAGING_INSTAGRAM_DIRECT_WHATSAPP", "MESSAGING_MESSENGER_WHATSAPP", "MESSENGER", "ON_AD", "ON_EVENT", "ON_PAGE", "ON_POST", "ON_VIDEO", "PHONE_CALL", "SHOP_AUTOMATIC", "WEBSITE", "WHATSAPP" ]
rfPredictionIdstringReach-and-frequency prediction id; pairs with campaign.buyingType.
promotedObjectobject
pageIdstringpixelIdstringcustomEventTypestringcustomEventStrstringapplicationIdstringobjectStoreUrlstringcustomConversionIdstringproductCatalogIdstringproductSetIdstringofflineConversionDataSetIdstringwhatsappPhoneNumberstringattributionSpecarray
Attribution windows, forwarded VERBATIM. Which combinations the platform requires could NOT be measured, so nothing is validated here.
Array itemobjectadSetIdstringExisting Meta ad set id; all ads must use one matching appDestination. Cannot be combined with campaign or adSet.
adsarrayrequired
One ad per creative, all under ONE ad set. The upper bound is not a product choice: it is the largest chain that still fits the ad account's outbound rate-limit window.
- minItems
1- maxItems
3
Array itemobject
- required
[ "name", "creative" ]
namestringrequired- maxLength
255
creativeobjectrequired
- required
[ "headline", "body", "callToAction", "linkUrl" ]
namestring- maxLength
255
headlinestringrequiredbodystringrequireddescriptionstringcallToActionstringrequired- enum
[ "LEARN_MORE", "SHOP_NOW", "SIGN_UP", "BOOK_TRAVEL", "CONTACT_US", "DOWNLOAD", "GET_OFFER", "GET_QUOTE", "SUBSCRIBE", "WATCH_MORE", "ADD_TO_CART", "APPLY_NOW", "BOOK_NOW", "BUY_TICKETS", "DONATE", "DONATE_NOW", "GET_DIRECTIONS", "GET_SHOWTIMES", "LISTEN_NOW", "ORDER_NOW", "PLAY_GAME", "REQUEST_TIME", "SEE_MENU", "START_ORDER", "INSTALL_MOBILE_APP", "USE_APP", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "VIEW_QUOTE", "APPLY", "SEE_MORE", "BUY_NOW", "WHATSAPP_MESSAGE", "MESSAGE_PAGE", "CALL_NOW" ]
linkUrlstringrequiredLanding url. Must stay https:// even on the call path.
imageUrlstringEXACTLY ONE of imageUrl / imageHash / cards.
imageHashstringcardsarray
Array itemobject
- required
[ "linkUrl" ]
imageUrlstringimageHashstringlinkUrlstringrequiredheadlinestringdescriptionstringcallToActionstring- enum
[ "LEARN_MORE", "SHOP_NOW", "SIGN_UP", "BOOK_TRAVEL", "CONTACT_US", "DOWNLOAD", "GET_OFFER", "GET_QUOTE", "SUBSCRIBE", "WATCH_MORE", "ADD_TO_CART", "APPLY_NOW", "BOOK_NOW", "BUY_TICKETS", "DONATE", "DONATE_NOW", "GET_DIRECTIONS", "GET_SHOWTIMES", "LISTEN_NOW", "ORDER_NOW", "PLAY_GAME", "REQUEST_TIME", "SEE_MENU", "START_ORDER", "INSTALL_MOBILE_APP", "USE_APP", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "VIEW_QUOTE", "APPLY", "SEE_MORE", "BUY_NOW", "WHATSAPP_MESSAGE", "MESSAGE_PAGE", "CALL_NOW" ]
urlTagsstringappDestinationstringRequired by the WHATSAPP_MESSAGE and MESSAGE_PAGE call-to-action types, and accepted with others -- the platform treats it as an axis of its own, NOT a value derived from the call-to-action type.
INSTAGRAM_DIRECT is NOT a member: the platform publishes no example for it and inventing one would send a valid creative with a field the platform never documented.
- enum
[ "WHATSAPP", "MESSENGER" ]
welcomeMessageallOf
Messaging creatives only. Maps to Meta page_welcome_message: text is the greeting and prefillText is placed in the user input ready to send.
allOf / 1object
- required
[ "text", "prefillText" ]
textstringrequired- minLength
1- maxLength
4096
prefillTextstringrequired- minLength
1- maxLength
4096
phoneNumberstringE.164 number the CALL_NOW button dials -- THE ADVERTISER OWN number, not an end user one. The tel: prefix is built by this API; send the bare E.164 value.
conversionDomainstringRegistrable domain the conversion is attributed to. The platform requires it to create an ad in a campaign that shares data with a pixel, and rejects the create when it is missing there; send it for those campaigns. Host name only -- no scheme, port or path.
- maxLength
253- pattern
^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
statusstring- enum
[ "ACTIVE", "PAUSED" ]- default
PAUSED
Original schema
{
"$ref": "#/components/schemas/CreateMessagingAdDto"
}Responses
Status codes and shapes declared for this operation. Read each description for the meaning of that response.
201Response schema
Response 201object
- required
[ "adAccountId", "campaignId", "adSetId", "creativeIds", "adIds", "status" ]
adAccountIdstringrequiredcampaignIdstringrequiredPlatform id of the created or existing parent campaign.
adSetIdstringrequiredPlatform id of the created or supplied existing ad set.
creativeIdsarrayrequired
Same order and same length as the request ads array.
Array itemstringadIdsarrayrequired
Same order and same length as the request ads array.
Array itemstringstatusstringrequiredThe status the whole hierarchy ended in. Everything is created PAUSED; ACTIVE flips the campaign as the LAST step, so a chain that fails part-way has never spent anything.
- enum
[ "ACTIVE", "PAUSED" ]
Original schema
{
"$ref": "#/components/schemas/AdChainResponseDto"
}400Response schema
Response 400object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}401Response schema
Response 401object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}403Response schema
Response 403object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}404Response schema
Response 404object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}409Response schema
Response 409object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}422Response schema
Response 422object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}429Response schema
Response 429object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}Response headers
X-RateLimit-Limit
Request ceiling that applied to this request. Authenticated requests use the team tier ceiling; unauthenticated identity endpoints use a per-IP ceiling. Usage is measured continuously against a trailing period rather than tallied and cleared at a boundary, so the full ceiling never becomes available again in one step.
X-RateLimit-Limitinteger- minimum
1
Original schema
{
"type": "integer",
"minimum": 1
}X-RateLimit-Remaining
Requests still allowed against that ceiling; never negative. On a 429 produced by the request throttler this is 0. Such a refused request is not counted, so retrying too early costs you no capacity and does not push your recovery further away.
X-RateLimit-Remaininginteger- minimum
0
Original schema
{
"type": "integer",
"minimum": 0
}X-RateLimit-Reset
Absolute Unix epoch time, in SECONDS, at which the current counting period turns over. This is NOT the number of seconds left: subtract the current time to obtain that. It is also NOT the moment your capacity returns: earlier usage keeps weighing on the ceiling across the turnover, so after a 429 wait for Retry-After instead, which is usually later than this value.
X-RateLimit-Resetinteger- format
int64- minimum
0
Original schema
{
"type": "integer",
"format": "int64",
"minimum": 0
}Retry-After
Seconds to wait before retrying. Always a positive integer delta (never an HTTP-date), at least 1. On a 429 from the request throttler it is the wait until your usage actually drops back under the ceiling; prefer it over any delay you compute from X-RateLimit-Reset.
Retry-Afterinteger- minimum
1- maximum
86400
Original schema
{
"type": "integer",
"minimum": 1,
"maximum": 86400
}500Server error
Server error
Response 500object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}501Response schema
Response 501object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}502Platform error
Platform error
Response 502object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}503Service unavailable
Service unavailable
Response 503object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}Referenced schemas
Original local definitions used by this operation. Recursive and deeply nested references can be inspected here without expanding them repeatedly.
CreateMessagingAdDto
#/components/schemas/CreateMessagingAdDto
{
"type": "object",
"properties": {
"accountId": {
"type": "string",
"description": "Social account id used to resolve the Meta token."
},
"adAccountId": {
"type": "string",
"description": "Meta ad account id (act_<n>)."
},
"campaign": {
"description": "Required unless adSetId is supplied.",
"allOf": [
{
"$ref": "#/components/schemas/AdChainCampaignDto"
}
]
},
"adSet": {
"description": "Required unless adSetId is supplied.",
"allOf": [
{
"$ref": "#/components/schemas/AdChainAdSetDto"
}
]
},
"adSetId": {
"type": "string",
"description": "Existing Meta ad set id; all ads must use one matching appDestination. Cannot be combined with campaign or adSet."
},
"ads": {
"minItems": 1,
"maxItems": 3,
"description": "One ad per creative, all under ONE ad set. The upper bound is not a product choice: it is the largest chain that still fits the ad account's outbound rate-limit window.",
"type": "array",
"items": {
"$ref": "#/components/schemas/AdChainAdDto"
}
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"PAUSED"
],
"default": "PAUSED"
}
},
"additionalProperties": false,
"required": [
"accountId",
"adAccountId",
"ads"
]
}AdChainCampaignDto
#/components/schemas/AdChainCampaignDto
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255
},
"goal": {
"type": "string",
"enum": [
"engagement",
"page_likes",
"traffic",
"awareness",
"lead_generation",
"lead_conversion",
"conversions",
"app_promotion",
"catalog_sales"
],
"description": "Mapped to the ODAX objective. The mapping is the one `POST /v1/ads/campaigns` uses; `page_likes` maps to OUTCOME_ENGAGEMENT. `video_views` and `job_applicants` are NOT accepted for the reason written there."
},
"specialAdCategories": {
"type": "array",
"description": "Regulated-category declarations. Duplicates are rejected.",
"items": {
"type": "string",
"enum": [
"HOUSING",
"EMPLOYMENT",
"CREDIT",
"ISSUES_ELECTIONS_POLITICS",
"FINANCIAL_PRODUCTS_SERVICES",
"ONLINE_GAMBLING_AND_GAMING"
]
}
},
"buyingType": {
"type": "string",
"enum": [
"AUCTION",
"RESERVED"
],
"description": "Omit it and no buying type is sent at all, leaving the platform default in force -- this API does not substitute one. `RESERVED` is the reach-and-frequency path and pairs with `adSet.rfPredictionId`."
}
},
"required": [
"name",
"goal"
]
}AdChainAdSetDto
#/components/schemas/AdChainAdSetDto
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255
},
"billingEvent": {
"type": "string",
"enum": [
"APP_INSTALLS",
"CLICKS",
"IMPRESSIONS",
"LINK_CLICKS",
"LISTING_INTERACTION",
"NONE",
"OFFER_CLAIMS",
"PAGE_LIKES",
"POST_ENGAGEMENT",
"PURCHASE",
"THRUPLAY"
]
},
"optimizationGoal": {
"type": "string",
"enum": [
"ADVERTISER_SILOED_VALUE",
"AD_RECALL_LIFT",
"APP_INSTALLS",
"APP_INSTALLS_AND_OFFSITE_CONVERSIONS",
"AUTOMATIC_OBJECTIVE",
"CONVERSATIONS",
"DERIVED_EVENTS",
"ENGAGED_PAGE_VIEWS",
"ENGAGED_USERS",
"EVENT_RESPONSES",
"IMPRESSIONS",
"IN_APP_VALUE",
"LANDING_PAGE_VIEWS",
"LEAD_GENERATION",
"LINK_CLICKS",
"MEANINGFUL_CALL_ATTEMPT",
"MESSAGING_APPOINTMENT_CONVERSION",
"MESSAGING_DEEP_CONVERSATION_AND_FOLLOW",
"MESSAGING_PURCHASE_CONVERSION",
"NONE",
"OFFSITE_CONVERSIONS",
"PAGE_LIKES",
"POST_ENGAGEMENT",
"PROFILE_AND_PAGE_ENGAGEMENT",
"PROFILE_VISIT",
"QUALITY_CALL",
"QUALITY_LEAD",
"REACH",
"REMINDERS_SET",
"SUBSCRIBERS",
"THRUPLAY",
"VALUE",
"VISIT_INSTAGRAM_PROFILE"
]
},
"targeting": {
"type": "object",
"description": "Meta targeting object, forwarded to the platform VERBATIM -- no key is renamed, added or dropped. `geo_locations.countries` is required by the platform and checked before the request leaves this API.\n\nTHIS IS NOT the canonical camelCase `TargetingSpec` used by `/v1/ads/targeting/reach-estimate`: the ad-set create primitive takes the platform wire shape, and the canonical translator lives inside the adapter where it is not reachable from here. Writing a second copy of that translation is what this repository forbids by name, so the wire shape is published instead of a half-true camelCase surface."
},
"dailyBudgetMinorUnits": {
"type": "number",
"description": "EXACTLY ONE of `dailyBudgetMinorUnits` / `lifetimeBudgetMinorUnits` is required. The value is forwarded unchanged and the platform reads it in the MINOR unit of the ad account currency -- cents for USD."
},
"lifetimeBudgetMinorUnits": {
"type": "number",
"description": "EXACTLY ONE of `dailyBudgetMinorUnits` / `lifetimeBudgetMinorUnits` is required. A lifetime budget also requires `endTime`."
},
"bidStrategy": {
"type": "string",
"enum": [
"LOWEST_COST_WITHOUT_CAP",
"LOWEST_COST_WITH_BID_CAP",
"COST_CAP",
"LOWEST_COST_WITH_MIN_ROAS"
]
},
"bidAmountMinorUnits": {
"type": "number"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"destinationType": {
"type": "string",
"enum": [
"APP",
"APPLINKS_AUTOMATIC",
"FACEBOOK",
"FACEBOOK_LIVE",
"FACEBOOK_PAGE",
"IMAGINE",
"INSTAGRAM_DIRECT",
"INSTAGRAM_LIVE",
"INSTAGRAM_PROFILE",
"INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE",
"MESSAGING_INSTAGRAM_DIRECT_MESSENGER",
"MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP",
"MESSAGING_INSTAGRAM_DIRECT_WHATSAPP",
"MESSAGING_MESSENGER_WHATSAPP",
"MESSENGER",
"ON_AD",
"ON_EVENT",
"ON_PAGE",
"ON_POST",
"ON_VIDEO",
"PHONE_CALL",
"SHOP_AUTOMATIC",
"WEBSITE",
"WHATSAPP"
],
"description": "Where the ad sends people. `PHONE_CALL` is the call path; the messaging paths use the `MESSENGER` / `WHATSAPP` members. The combination of objective, optimisation goal and destination is NOT validated here -- primary platform documents contradict each other on which triples are legal, so the platform is left to refuse."
},
"rfPredictionId": {
"type": "string",
"description": "Reach-and-frequency prediction id; pairs with `campaign.buyingType`."
},
"promotedObject": {
"$ref": "#/components/schemas/AdChainPromotedObjectDto"
},
"attributionSpec": {
"description": "Attribution windows, forwarded VERBATIM. Which combinations the platform requires could NOT be measured, so nothing is validated here.",
"type": "array",
"items": {
"type": "object"
}
}
},
"required": [
"name",
"billingEvent",
"optimizationGoal",
"targeting"
]
}AdChainPromotedObjectDto
#/components/schemas/AdChainPromotedObjectDto
{
"type": "object",
"properties": {
"pageId": {
"type": "string"
},
"pixelId": {
"type": "string"
},
"customEventType": {
"type": "string"
},
"customEventStr": {
"type": "string"
},
"applicationId": {
"type": "string"
},
"objectStoreUrl": {
"type": "string"
},
"customConversionId": {
"type": "string"
},
"productCatalogId": {
"type": "string"
},
"productSetId": {
"type": "string"
},
"offlineConversionDataSetId": {
"type": "string"
},
"whatsappPhoneNumber": {
"type": "string"
}
}
}AdChainAdDto
#/components/schemas/AdChainAdDto
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255
},
"creative": {
"$ref": "#/components/schemas/AdChainNewPostCreativeDto"
},
"conversionDomain": {
"type": "string",
"maxLength": 253,
"pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$",
"description": "Registrable domain the conversion is attributed to. The platform requires it to create an ad in a campaign that shares data with a pixel, and rejects the create when it is missing there; send it for those campaigns. Host name only -- no scheme, port or path."
}
},
"required": [
"name",
"creative"
]
}AdChainNewPostCreativeDto
#/components/schemas/AdChainNewPostCreativeDto
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255
},
"headline": {
"type": "string"
},
"body": {
"type": "string"
},
"description": {
"type": "string"
},
"callToAction": {
"type": "string",
"enum": [
"LEARN_MORE",
"SHOP_NOW",
"SIGN_UP",
"BOOK_TRAVEL",
"CONTACT_US",
"DOWNLOAD",
"GET_OFFER",
"GET_QUOTE",
"SUBSCRIBE",
"WATCH_MORE",
"ADD_TO_CART",
"APPLY_NOW",
"BOOK_NOW",
"BUY_TICKETS",
"DONATE",
"DONATE_NOW",
"GET_DIRECTIONS",
"GET_SHOWTIMES",
"LISTEN_NOW",
"ORDER_NOW",
"PLAY_GAME",
"REQUEST_TIME",
"SEE_MENU",
"START_ORDER",
"INSTALL_MOBILE_APP",
"USE_APP",
"REGISTER",
"JOIN",
"ATTEND",
"REQUEST_DEMO",
"VIEW_QUOTE",
"APPLY",
"SEE_MORE",
"BUY_NOW",
"WHATSAPP_MESSAGE",
"MESSAGE_PAGE",
"CALL_NOW"
]
},
"linkUrl": {
"type": "string",
"description": "Landing url. Must stay `https://` even on the call path."
},
"imageUrl": {
"type": "string",
"description": "EXACTLY ONE of `imageUrl` / `imageHash` / `cards`."
},
"imageHash": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AdChainCreativeCardDto"
}
},
"urlTags": {
"type": "string"
},
"appDestination": {
"type": "string",
"enum": [
"WHATSAPP",
"MESSENGER"
],
"description": "Required by the `WHATSAPP_MESSAGE` and `MESSAGE_PAGE` call-to-action types, and accepted with others -- the platform treats it as an axis of its own, NOT a value derived from the call-to-action type.\n\n`INSTAGRAM_DIRECT` is NOT a member: the platform publishes no example for it and inventing one would send a valid creative with a field the platform never documented."
},
"welcomeMessage": {
"description": "Messaging creatives only. Maps to Meta page_welcome_message: text is the greeting and prefillText is placed in the user input ready to send.",
"allOf": [
{
"$ref": "#/components/schemas/AdChainWelcomeMessageDto"
}
]
},
"phoneNumber": {
"type": "string",
"description": "E.164 number the `CALL_NOW` button dials -- THE ADVERTISER OWN number, not an end user one. The `tel:` prefix is built by this API; send the bare E.164 value."
}
},
"required": [
"headline",
"body",
"callToAction",
"linkUrl"
]
}AdChainCreativeCardDto
#/components/schemas/AdChainCreativeCardDto
{
"type": "object",
"properties": {
"imageUrl": {
"type": "string"
},
"imageHash": {
"type": "string"
},
"linkUrl": {
"type": "string"
},
"headline": {
"type": "string"
},
"description": {
"type": "string"
},
"callToAction": {
"type": "string",
"enum": [
"LEARN_MORE",
"SHOP_NOW",
"SIGN_UP",
"BOOK_TRAVEL",
"CONTACT_US",
"DOWNLOAD",
"GET_OFFER",
"GET_QUOTE",
"SUBSCRIBE",
"WATCH_MORE",
"ADD_TO_CART",
"APPLY_NOW",
"BOOK_NOW",
"BUY_TICKETS",
"DONATE",
"DONATE_NOW",
"GET_DIRECTIONS",
"GET_SHOWTIMES",
"LISTEN_NOW",
"ORDER_NOW",
"PLAY_GAME",
"REQUEST_TIME",
"SEE_MENU",
"START_ORDER",
"INSTALL_MOBILE_APP",
"USE_APP",
"REGISTER",
"JOIN",
"ATTEND",
"REQUEST_DEMO",
"VIEW_QUOTE",
"APPLY",
"SEE_MORE",
"BUY_NOW",
"WHATSAPP_MESSAGE",
"MESSAGE_PAGE",
"CALL_NOW"
]
}
},
"required": [
"linkUrl"
]
}AdChainWelcomeMessageDto
#/components/schemas/AdChainWelcomeMessageDto
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"prefillText": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
},
"required": [
"text",
"prefillText"
]
}AdChainResponseDto
#/components/schemas/AdChainResponseDto
{
"type": "object",
"properties": {
"adAccountId": {
"type": "string"
},
"campaignId": {
"type": "string",
"description": "Platform id of the created or existing parent campaign."
},
"adSetId": {
"type": "string",
"description": "Platform id of the created or supplied existing ad set."
},
"creativeIds": {
"description": "Same order and same length as the request `ads` array.",
"type": "array",
"items": {
"type": "string"
}
},
"adIds": {
"description": "Same order and same length as the request `ads` array.",
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"PAUSED"
],
"description": "The status the whole hierarchy ended in. Everything is created PAUSED; `ACTIVE` flips the campaign as the LAST step, so a chain that fails part-way has never spent anything."
}
},
"required": [
"adAccountId",
"campaignId",
"adSetId",
"creativeIds",
"adIds",
"status"
]
}ZumpoErrorDto
#/components/schemas/ZumpoErrorDto
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Human-readable message. UNSTABLE — do not branch on it.",
"example": "WhatsApp session window expired; use a template message."
},
"type": {
"type": "string",
"description": "Stable error category (does not change across versions).",
"enum": [
"invalid_request_error",
"authentication_error",
"permission_error",
"not_found",
"conflict",
"rate_limit_error",
"platform_error",
"platform_rejected",
"account_disconnected",
"media_error",
"api_error"
],
"example": "invalid_request_error"
},
"code": {
"type": "string",
"description": "Stable machine-readable code.",
"example": "whatsapp_window_expired"
},
"param": {
"type": "string",
"description": "Offending parameter, present only when relevant.",
"example": "body"
},
"docUrl": {
"type": "string",
"description": "https://docs.zumpo.io/errors/{code}",
"example": "https://docs.zumpo.io/errors/whatsapp_window_expired"
},
"requestId": {
"type": "string",
"description": "Support correlation id: req_ + 16 hex.",
"example": "req_7f3a9c2e1b8d4056"
},
"details": {
"type": "object",
"additionalProperties": true,
"description": "Additional structured context, present only when an error has more to say than a single `param` can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.",
"example": {
"created": [
{
"kind": "campaign",
"platformId": "120210000000000001"
},
{
"kind": "adSet",
"platformId": "120210000000000002"
}
]
}
}
},
"required": [
"error",
"type",
"code",
"docUrl",
"requestId"
]
}