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

Update an ad set

Ad-set-level writes: ABO budget, delivery status, rename and bid strategy. At least one updatable field is required.

MONEY IS TAKEN IN WHOLE CURRENCY UNITS (19.99 = $19.99) and converted to the integer minor-unit value Meta expects using the platform's own published currency offset. More decimal places than the currency supports is a 400, not a silent rounding. If the ad account currency is not in the platform's published table the amount is REFUSED rather than guessed.

Bid strategy rules: LOWEST_COST_WITH_BID_CAP and COST_CAP require bidAmount; LOWEST_COST_WITHOUT_CAP forbids it. LOWEST_COST_WITH_MIN_ROAS requires roasAverageFloor; its decimal multiplier is sent as bid_constraints.roas_average_floor multiplied by 10,000.

platformSpecificData updates Meta optimization/billing, schedule and promoted-object settings through the same real ad-set primitive used at creation. Unknown nested fields are rejected; campaign-objective compatibility remains Meta's live decision and its error is passed through. Phone/SMS delivery settings are intentionally out of scope.

If the parent campaign uses campaign budget optimisation, a budget write is rejected by Meta and its error is passed through: this API stores no campaign row to preflight the budget level from, and guessing would be worse than the platform's own answer.

Nothing is written to stored ad documents here -- budget and bid live per AD in this store, not per ad set, so the correct row set is ambiguous; the next sync pass reads the real values back.

VALUE RULE SETS. valueRuleSetId attaches or replaces the set that adjusts this ad set's bids; sending a different id replaces the previous association, and there is no separate replace call. To DETACH, send valueRulesApplied: false and OMIT valueRuleSetId -- the two together are a 400 mutually_exclusive_fields, because Meta attaches the set whenever value_rule_set_id is present and the detach would silently leave the bid adjustments live. Only ad sets on LOWEST_COST_WITHOUT_CAP or COST_CAP are eligible and Meta enforces that server-side. The sets themselves live at /v1/ads/value-rule-sets.

Authentication

The following security requirement applies to this operation.

  1. bearerhttp

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

Parameters

adSetIdpathrequired

The platform's own ad set id.

adSetIdstringrequired
Original schema
{
  "type": "string"
}
Idempotency-Keyheaderoptional

Client-generated unique key that makes retries safe.

Idempotency-Keystring
maxLength
255
Original schema
{
  "type": "string",
  "maxLength": 255
}

Request body

Required body
application/json
Bodyobjectrequired
#/components/schemas/UpdateAdSetDto
additionalProperties
false
required
[ "platform" ]
platformstringrequired

Platform the ad set lives on. Only Meta (facebook, instagram) is served today.

budgetallOf

Ad-set (ABO) budget. If the parent campaign uses campaign budget optimisation, Meta rejects this and its error is passed through -- this API does not preflight the campaign, because it stores no campaign row to read the budget level from and guessing would be worse than the platform's own answer.

allOf / 1object
#/components/schemas/AdSetBudgetDto
required
[ "amount", "type" ]
amountnumberrequired

Amount in the ad account's WHOLE currency units (USD: 19.99 = $19.99; JPY: 1000 = 1000 yen). It is converted to the integer minor-unit value Meta expects using the platform's own published currency offset. More decimal places than the currency supports is an error, not a rounding: silently rounding would change the number the caller wrote.

typestringrequired
enum
[ "daily", "lifetime" ]
statusstring
enum
[ "active", "paused" ]
namestring
maxLength
255
bidStrategystring

Ad-set bid strategy. LOWEST_COST_WITH_MIN_ROAS requires roasAverageFloor. LOWEST_COST_WITH_BID_CAP and COST_CAP REQUIRE bidAmount; LOWEST_COST_WITHOUT_CAP forbids it.

enum
[ "LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS" ]
bidAmountnumber

Bid cap in WHOLE currency units, converted like budget.amount.

roasAverageFloornumber

Decimal ROAS multiplier (2.0 = 2x). Required with LOWEST_COST_WITH_MIN_ROAS and sent to Meta as bid_constraints.roas_average_floor multiplied by 10,000.

minimum
0
exclusiveMinimum
true
platformSpecificDataallOf

Meta post-launch delivery settings. Unknown keys are rejected. Phone/SMS delivery fields are intentionally outside this API surface.

allOf / 1object
#/components/schemas/AdSetPlatformSpecificDataDto
optimizationGoalstring
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" ]
billingEventstring
enum
[ "APP_INSTALLS", "CLICKS", "IMPRESSIONS", "LINK_CLICKS", "LISTING_INTERACTION", "NONE", "OFFER_CLAIMS", "PAGE_LIKES", "POST_ENGAGEMENT", "PURCHASE", "THRUPLAY" ]
startDatestring

Meta start_time; ISO 8601 with UTC offset.

endDatestring

Meta end_time; ISO 8601 with UTC offset.

promotedObjectobject
#/components/schemas/AdSetPromotedObjectDto
pageIdstring
pixelIdstring
customEventTypestring
customEventStrstring
applicationIdstring
objectStoreUrlstring
customConversionIdstring
productCatalogIdstring
productSetIdstring
offlineConversionDataSetIdstring
valueRuleSetIdstring

Attaches -- or REPLACES -- the value rule set that adjusts this ad set's bids. Attachment is driven by this id's presence, so valueRulesApplied: true is optional alongside it. Sending a different id replaces the previous association; there is no separate replace call.

Create, read and delete the sets themselves through /v1/ads/value-rule-sets.

ELIGIBILITY IS ENFORCED BY META, not here: only ad sets on LOWEST_COST_WITHOUT_CAP or COST_CAP accept a value rule set. This API stores no ad-set bid strategy to preflight against, and its error is passed through rather than guessed at.

pattern
^[1-9]\d{0,20}$
valueRulesAppliedboolean

DETACH: send false and OMIT valueRuleSetId. Sending false TOGETHER with valueRuleSetId is a 400 mutually_exclusive_fields -- Meta attaches the rule set whenever value_rule_set_id is present, even with value_rules_applied false, so echoing stored state while asking to detach would silently keep the bid adjustments live.

Meta does not document this as a readable ad-set field, so it cannot be read back: updated is the only confirmation this API can give. GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id does read the id back.

Original schema
{
  "$ref": "#/components/schemas/UpdateAdSetDto"
}

Responses

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

200Response schema
application/json
Response 200object
#/components/schemas/UpdateAdSetResponseDto
required
[ "adSetId", "updated" ]
adSetIdstringrequired

The platform's own ad set id.

updatedarrayrequired

The fields this call actually wrote, in the order they were applied. Meta's mutation response is {success:true} and carries no state, so this echoes what was accepted rather than pretending to read anything back.

Array itemstring
budgetallOf

Echo of the budget that was written, converted BACK from minor units. Round-tripping it is what lets a caller confirm the conversion agreed with what they meant.

allOf / 1object
#/components/schemas/AdSetBudgetDto
required
[ "amount", "type" ]
amountnumberrequired

Amount in the ad account's WHOLE currency units (USD: 19.99 = $19.99; JPY: 1000 = 1000 yen). It is converted to the integer minor-unit value Meta expects using the platform's own published currency offset. More decimal places than the currency supports is an error, not a rounding: silently rounding would change the number the caller wrote.

typestringrequired
enum
[ "daily", "lifetime" ]
bidAmountnumber

Echo of the bid cap written.

currencystring

ISO 4217 code the amounts were converted with.

budgetLevelstring

Always adset here. The contract carries it so a caller that also writes campaign-level budgets can tell the two responses apart without tracking which endpoint it called.

enum
[ "adset" ]
statusstring

Echo of the delivery status written, when one was written.

enum
[ "active", "paused" ]
bidStrategystring

Echo of the bid strategy written, when one was written.

enum
[ "LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS" ]
roasAverageFloornumber

Echo of the decimal ROAS floor written.

nullable
true
platformSpecificDataobject
#/components/schemas/AdSetPlatformSpecificDataDto
optimizationGoalstring
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" ]
billingEventstring
enum
[ "APP_INSTALLS", "CLICKS", "IMPRESSIONS", "LINK_CLICKS", "LISTING_INTERACTION", "NONE", "OFFER_CLAIMS", "PAGE_LIKES", "POST_ENGAGEMENT", "PURCHASE", "THRUPLAY" ]
startDatestring

Meta start_time; ISO 8601 with UTC offset.

endDatestring

Meta end_time; ISO 8601 with UTC offset.

promotedObjectobject
#/components/schemas/AdSetPromotedObjectDto
pageIdstring
pixelIdstring
customEventTypestring
customEventStrstring
applicationIdstring
objectStoreUrlstring
customConversionIdstring
productCatalogIdstring
productSetIdstring
offlineConversionDataSetIdstring
statusUpdatednumber

Ads the status change applies to, present only when status was written. Same meaning as on the dedicated status endpoint: a claim about the platform cascade, NOT about rows in this API's store.

statusSkippednumber

Ads left alone because their status is terminal.

Original schema
{
  "$ref": "#/components/schemas/UpdateAdSetResponseDto"
}
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.

UpdateAdSetDto

#/components/schemas/UpdateAdSetDto

{
  "type": "object",
  "properties": {
    "platform": {
      "type": "string",
      "description": "Platform the ad set lives on. Only Meta (facebook, instagram) is served today."
    },
    "budget": {
      "description": "Ad-set (ABO) budget. If the parent campaign uses campaign budget optimisation, Meta rejects this and its error is passed through -- this API does not preflight the campaign, because it stores no campaign row to read the budget level from and guessing would be worse than the platform's own answer.",
      "allOf": [
        {
          "$ref": "#/components/schemas/AdSetBudgetDto"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ]
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "bidStrategy": {
      "type": "string",
      "enum": [
        "LOWEST_COST_WITHOUT_CAP",
        "LOWEST_COST_WITH_BID_CAP",
        "COST_CAP",
        "LOWEST_COST_WITH_MIN_ROAS"
      ],
      "description": "Ad-set bid strategy. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` REQUIRE `bidAmount`; `LOWEST_COST_WITHOUT_CAP` forbids it."
    },
    "bidAmount": {
      "type": "number",
      "description": "Bid cap in WHOLE currency units, converted like `budget.amount`."
    },
    "roasAverageFloor": {
      "type": "number",
      "minimum": 0,
      "exclusiveMinimum": true,
      "description": "Decimal ROAS multiplier (2.0 = 2x). Required with LOWEST_COST_WITH_MIN_ROAS and sent to Meta as `bid_constraints.roas_average_floor` multiplied by 10,000."
    },
    "platformSpecificData": {
      "description": "Meta post-launch delivery settings. Unknown keys are rejected. Phone/SMS delivery fields are intentionally outside this API surface.",
      "allOf": [
        {
          "$ref": "#/components/schemas/AdSetPlatformSpecificDataDto"
        }
      ]
    },
    "valueRuleSetId": {
      "type": "string",
      "pattern": "^[1-9]\\d{0,20}$",
      "description": "Attaches -- or REPLACES -- the value rule set that adjusts this ad set's bids. Attachment is driven by this id's presence, so `valueRulesApplied: true` is optional alongside it. Sending a different id replaces the previous association; there is no separate replace call.\n\nCreate, read and delete the sets themselves through `/v1/ads/value-rule-sets`.\n\nELIGIBILITY IS ENFORCED BY META, not here: only ad sets on `LOWEST_COST_WITHOUT_CAP` or `COST_CAP` accept a value rule set. This API stores no ad-set bid strategy to preflight against, and its error is passed through rather than guessed at."
    },
    "valueRulesApplied": {
      "type": "boolean",
      "description": "DETACH: send `false` and OMIT `valueRuleSetId`. Sending `false` TOGETHER with `valueRuleSetId` is a 400 `mutually_exclusive_fields` -- Meta attaches the rule set whenever `value_rule_set_id` is present, even with `value_rules_applied` false, so echoing stored state while asking to detach would silently keep the bid adjustments live.\n\nMeta does not document this as a readable ad-set field, so it cannot be read back: `updated` is the only confirmation this API can give. `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id` does read the id back."
    }
  },
  "additionalProperties": false,
  "required": [
    "platform"
  ]
}
AdSetBudgetDto

#/components/schemas/AdSetBudgetDto

{
  "type": "object",
  "properties": {
    "amount": {
      "type": "number",
      "description": "Amount in the ad account's WHOLE currency units (USD: 19.99 = $19.99; JPY: 1000 = 1000 yen). It is converted to the integer minor-unit value Meta expects using the platform's own published currency offset. More decimal places than the currency supports is an error, not a rounding: silently rounding would change the number the caller wrote."
    },
    "type": {
      "type": "string",
      "enum": [
        "daily",
        "lifetime"
      ]
    }
  },
  "required": [
    "amount",
    "type"
  ]
}
AdSetPlatformSpecificDataDto

#/components/schemas/AdSetPlatformSpecificDataDto

{
  "type": "object",
  "properties": {
    "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"
      ]
    },
    "billingEvent": {
      "type": "string",
      "enum": [
        "APP_INSTALLS",
        "CLICKS",
        "IMPRESSIONS",
        "LINK_CLICKS",
        "LISTING_INTERACTION",
        "NONE",
        "OFFER_CLAIMS",
        "PAGE_LIKES",
        "POST_ENGAGEMENT",
        "PURCHASE",
        "THRUPLAY"
      ]
    },
    "startDate": {
      "type": "string",
      "description": "Meta start_time; ISO 8601 with UTC offset."
    },
    "endDate": {
      "type": "string",
      "description": "Meta end_time; ISO 8601 with UTC offset."
    },
    "promotedObject": {
      "$ref": "#/components/schemas/AdSetPromotedObjectDto"
    }
  }
}
AdSetPromotedObjectDto

#/components/schemas/AdSetPromotedObjectDto

{
  "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"
    }
  }
}
UpdateAdSetResponseDto

#/components/schemas/UpdateAdSetResponseDto

{
  "type": "object",
  "properties": {
    "adSetId": {
      "type": "string",
      "description": "The platform's own ad set id."
    },
    "updated": {
      "description": "The fields this call actually wrote, in the order they were applied. Meta's mutation response is `{success:true}` and carries no state, so this echoes what was accepted rather than pretending to read anything back.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "budget": {
      "description": "Echo of the budget that was written, converted BACK from minor units. Round-tripping it is what lets a caller confirm the conversion agreed with what they meant.",
      "allOf": [
        {
          "$ref": "#/components/schemas/AdSetBudgetDto"
        }
      ]
    },
    "bidAmount": {
      "type": "number",
      "description": "Echo of the bid cap written."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 code the amounts were converted with."
    },
    "budgetLevel": {
      "type": "string",
      "enum": [
        "adset"
      ],
      "description": "Always `adset` here. The contract carries it so a caller that also writes campaign-level budgets can tell the two responses apart without tracking which endpoint it called."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ],
      "description": "Echo of the delivery status written, when one was written."
    },
    "bidStrategy": {
      "type": "string",
      "enum": [
        "LOWEST_COST_WITHOUT_CAP",
        "LOWEST_COST_WITH_BID_CAP",
        "COST_CAP",
        "LOWEST_COST_WITH_MIN_ROAS"
      ],
      "description": "Echo of the bid strategy written, when one was written."
    },
    "roasAverageFloor": {
      "type": "number",
      "nullable": true,
      "description": "Echo of the decimal ROAS floor written."
    },
    "platformSpecificData": {
      "$ref": "#/components/schemas/AdSetPlatformSpecificDataDto"
    },
    "statusUpdated": {
      "type": "number",
      "description": "Ads the status change applies to, present only when `status` was written. Same meaning as on the dedicated status endpoint: a claim about the platform cascade, NOT about rows in this API's store."
    },
    "statusSkipped": {
      "type": "number",
      "description": "Ads left alone because their status is terminal."
    }
  },
  "required": [
    "adSetId",
    "updated"
  ]
}
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"
  ]
}