zumpo/docs
Dashboard
Skip to content
ads / API reference
POSTcreateStandaloneAd

Create a campaign, ad set and ad in one call

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.

Authentication

The following security requirement applies to this operation.

  1. bearerhttp

    scheme
    bearer
    bearerFormat
    zumpo-api-key
Read the authentication guide

Parameters

Idempotency-Keyheaderoptional

Client-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

Required body
application/json
Bodyobjectrequired
#/components/schemas/CreateStandaloneAdDto
additionalProperties
false
required
[ "accountId", "adAccountId", "ads" ]
accountIdstringrequired

Social account id used to resolve the Meta token.

adAccountIdstringrequired

Meta ad account id (act_<n>).

campaignallOf

Required unless adSetId is supplied.

allOf / 1object
#/components/schemas/AdChainCampaignDto
required
[ "name", "goal" ]
namestringrequired
maxLength
255
goalstringrequired

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.

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" ]
buyingTypestring

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.

enum
[ "AUCTION", "RESERVED" ]
adSetallOf

Required unless adSetId is supplied.

allOf / 1object
#/components/schemas/AdChainAdSetDto
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" ]
targetingobjectrequired

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.

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.

dailyBudgetMinorUnitsnumber

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.

lifetimeBudgetMinorUnitsnumber

EXACTLY 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" ]
bidAmountMinorUnitsnumber
startTimestring
format
date-time
endTimestring
format
date-time
destinationTypestring

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.

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" ]
rfPredictionIdstring

Reach-and-frequency prediction id; pairs with campaign.buyingType.

promotedObjectobject
#/components/schemas/AdChainPromotedObjectDto
pageIdstring
pixelIdstring
customEventTypestring
customEventStrstring
applicationIdstring
objectStoreUrlstring
customConversionIdstring
productCatalogIdstring
productSetIdstring
offlineConversionDataSetIdstring
whatsappPhoneNumberstring
attributionSpecarray

Attribution windows, forwarded VERBATIM. Which combinations the platform requires could NOT be measured, so nothing is validated here.

Array itemobject
adSetIdstring

Existing Meta ad set id. When supplied, campaign and adSet must be omitted; only creatives and ads are created under this parent.

adsarrayrequired
minItems
1
maxItems
1
Array itemobject
#/components/schemas/AdChainAdDto
required
[ "name", "creative" ]
namestringrequired
maxLength
255
creativeobjectrequired
#/components/schemas/AdChainNewPostCreativeDto
required
[ "headline", "body", "callToAction", "linkUrl" ]
namestring
maxLength
255
headlinestringrequired
bodystringrequired
descriptionstring
callToActionstringrequired
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" ]
linkUrlstringrequired

Landing url. Must stay https:// even on the call path.

imageUrlstring

EXACTLY ONE of imageUrl / imageHash / cards.

imageHashstring
cardsarray
Array itemobject
#/components/schemas/AdChainCreativeCardDto
required
[ "linkUrl" ]
imageUrlstring
imageHashstring
linkUrlstringrequired
headlinestring
descriptionstring
callToActionstring
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" ]
urlTagsstring
appDestinationstring

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.

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
#/components/schemas/AdChainWelcomeMessageDto
required
[ "text", "prefillText" ]
textstringrequired
minLength
1
maxLength
4096
prefillTextstringrequired
minLength
1
maxLength
4096
phoneNumberstring

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.

conversionDomainstring

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.

maxLength
253
pattern
^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
statusstring

Created PAUSED unless ACTIVE is requested.

enum
[ "ACTIVE", "PAUSED" ]
default
PAUSED
Original schema
{
  "$ref": "#/components/schemas/CreateStandaloneAdDto"
}

Responses

Status codes and shapes declared for this operation. Read each description for the meaning of that response.

201Response schema
application/json
Response 201object
#/components/schemas/AdChainResponseDto
required
[ "adAccountId", "campaignId", "adSetId", "creativeIds", "adIds", "status" ]
adAccountIdstringrequired
campaignIdstringrequired

Platform id of the created or existing parent campaign.

adSetIdstringrequired

Platform id of the created or supplied existing ad set.

creativeIdsarrayrequired

Same order and same length as the request ads array.

Array itemstring
adIdsarrayrequired

Same order and same length as the request ads array.

Array itemstring
statusstringrequired

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.

enum
[ "ACTIVE", "PAUSED" ]
Original schema
{
  "$ref": "#/components/schemas/AdChainResponseDto"
}
400Response schema
application/json
Response 400object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
401Response schema
application/json
Response 401object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
403Response schema
application/json
Response 403object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
404Response schema
application/json
Response 404object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
409Response schema
application/json
Response 409object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
422Response schema
application/json
Response 422object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
429Response schema
application/json
Response 429object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

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

application/json
Response 500object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
501Response schema
application/json
Response 501object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
502Platform error

Platform error

application/json
Response 502object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
503Service unavailable

Service unavailable

application/json
Response 503object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

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.

CreateStandaloneAdDto

#/components/schemas/CreateStandaloneAdDto

{
  "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. When supplied, campaign and adSet must be omitted; only creatives and ads are created under this parent."
    },
    "ads": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdChainAdDto"
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "PAUSED"
      ],
      "default": "PAUSED",
      "description": "Created PAUSED unless ACTIVE is requested."
    }
  },
  "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"
  ]
}