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

Promote an existing Page post with a new campaign

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.

The creative is built from an EXISTING Page post (objectStoryId), so no headline, body or image is accepted here -- the post already carries them. The post must belong to the Page selected on the account.

The post is NOT resolved for you: this endpoint takes an <pageId>_<postId> value directly. Listing promotable posts and resolving connected Instagram accounts are separate reads that are not wired to this call.

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/BoostPostDto
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; cannot be combined with campaign or adSet.

adsarrayrequired
minItems
1
maxItems
1
Array itemobject
#/components/schemas/AdChainBoostAdDto
required
[ "name", "creative" ]
namestringrequired
maxLength
255
creativeobjectrequired
#/components/schemas/AdChainExistingPostCreativeDto
required
[ "objectStoryId" ]
objectStoryIdstringrequired

Existing Page post, <pageId>_<postId>. It must belong to the Page selected on the account; a post owned by another Page is refused before the request leaves this API.

namestring
maxLength
255
urlTagsstring
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
enum
[ "ACTIVE", "PAUSED" ]
default
PAUSED
Original schema
{
  "$ref": "#/components/schemas/BoostPostDto"
}

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.

BoostPostDto

#/components/schemas/BoostPostDto

{
  "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; cannot be combined with campaign or adSet."
    },
    "ads": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdChainBoostAdDto"
      }
    },
    "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"
    }
  }
}
AdChainBoostAdDto

#/components/schemas/AdChainBoostAdDto

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "creative": {
      "$ref": "#/components/schemas/AdChainExistingPostCreativeDto"
    },
    "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"
  ]
}
AdChainExistingPostCreativeDto

#/components/schemas/AdChainExistingPostCreativeDto

{
  "type": "object",
  "properties": {
    "objectStoryId": {
      "type": "string",
      "description": "Existing Page post, `<pageId>_<postId>`. It must belong to the Page selected on the account; a post owned by another Page is refused before the request leaves this API."
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "urlTags": {
      "type": "string"
    }
  },
  "required": [
    "objectStoryId"
  ]
}
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"
  ]
}