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

Replace a value rule set

THIS IS A FULL REPLACE, NOT A PATCH. The body you send BECOMES the rule set. Keep a rule by echoing its id; create one by sending the object WITHOUT an id; DELETE one by OMITTING it from the array. THERE IS NO WARNING AND NO UNDO. name and rules are both required for exactly this reason: a partial body would silently destroy every rule left out. Read the set with GET /v1/ads/value-rule-sets/{valueRuleSetId} FIRST and edit what you get back.

RULE ORDER IS BEHAVIOUR: only the FIRST matching rule adjusts the bid for an overlapping audience, and the order you send is the order that is stored and returned.

adAccountId IS NOT ACCEPTED here -- the rule set id resolves the account. Sending it is a 400.

Ad sets pointing at this rule set are not touched by an update. A bad rule set id answers 400, not 404, for the reason given on the read operation.

Authentication

The following security requirement applies to this operation.

  1. bearerhttp

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

Parameters

valueRuleSetIdpathrequired

The platform's own value rule set id.

valueRuleSetIdstringrequired
pattern
^[1-9]\d{0,19}$
Original schema
{
  "type": "string",
  "pattern": "^[1-9]\\d{0,19}$"
}

Request body

Required body
application/json
Bodyobjectrequired
#/components/schemas/UpdateAdValueRuleSetDto
additionalProperties
false
required
[ "accountId", "name", "rules" ]
accountIdstringrequired

Social account id (posting or ads variant) used to resolve the platform token.

namestringrequired

REQUIRED even when it is unchanged. The update is declarative: the body you send becomes the rule set.

minLength
1
maxLength
255
rulesarrayrequired

THE COMPLETE RULE LIST. THIS IS A FULL REPLACE, NOT A PATCH. Keep a rule by echoing its id; create one by sending the object WITHOUT an id; DELETE one by OMITTING it. There is no warning and no undo. Read the set first and edit what you get back.

minItems
1
maxItems
10
Array itemobject
#/components/schemas/AdValueRuleDto
required
[ "name", "adjustSign", "adjustValue", "criteria" ]
idstring

The rule id, as the platform minted it. THIS FIELD IS THE MECHANISM OF THE FULL REPLACE: on an update, a rule that carries its id is KEPT, a rule without one is CREATED, and a rule you do not send at all is DELETED. Echo it back exactly as this API returned it.

maxLength
256
namestringrequired

Rule name, as it appears in the platform UI.

minLength
1
maxLength
255
adjustSignstringrequired

Which way the bid moves. THE DIRECTION LIVES HERE, not in adjustValue: there is no signed field.

enum
[ "INCREASE", "DECREASE" ]
adjustValuenumberrequired

An UNSIGNED magnitude in percent, and its ceiling DEPENDS ON adjustSign: INCREASE accepts 1-1000, DECREASE accepts 1-90. The schema maximum shown here is the INCREASE one, because a schema field cannot express a cross-field rule; a DECREASE above 90 is rejected by this API with a 400 rather than sent to be rejected by the platform. 0 is out of range in both directions.

minimum
1
maximum
1000
criteriaarrayrequired

The criteria the rule matches on. Multiple criteria within one rule are combined by the platform.

minItems
1
maxItems
4
Array itemobject
#/components/schemas/AdValueRuleCriterionDto
required
[ "criteriaType", "operator", "criteriaValues", "criteriaValueTypes" ]
criteriaTypestringrequired

What the criterion matches on. OMNI_CHANNEL (conversion location: APP, INSTANT_FORM, PHONE_CALL, WEBSITE) is accepted even though the platform's own enum table omits it -- the contract this API tracks declares it, and dropping it would reject a value the target accepts.

enum
[ "AGE", "GENDER", "OS_TYPE", "DEVICE_PLATFORM", "LOCATION", "PLACEMENT", "OMNI_CHANNEL", "AUDIENCE_LABEL" ]
operatorstringrequired

The only operator the contract declares. It is REQUIRED on every criterion even though it has a single value.

enum
[ "CONTAINS" ]
criteriaValuesarrayrequired

The values matched, in the platform's own vocabulary. AGE takes 18-24, 18+ or a custom 18-26; a range whose upper bound is 65 is invalid (use 18+). GENDER values are passed through UNTOUCHED: the platform returns them lower case on a read while a write requires upper case, so never case-compare a stored rule against a fetched one. AUDIENCE_LABEL strings are not validated anywhere -- there is no API to provision them, so a typo produces a rule that never fires.

minItems
1
Array itemstring
criteriaValueTypesarrayrequired

POSITIONALLY PAIRED with criteriaValues: entry i types value i, so the two arrays must have the SAME LENGTH. A mismatch is rejected here rather than forwarded, because the platform would silently apply its own default to the untyped values and the rule would target a different audience than the one you described.

NONE is valid for every criterion type. LOCATION additionally takes LOCATION_COUNTRY, LOCATION_REGION, LOCATION_CITY, LOCATION_COMSCORE_MARKET and they MAY be mixed inside one criterion. Values outside this set are forwarded verbatim (the platform owns the vocabulary) with ONE exception: LOCATION_DMA is rejected. LOCATION_DMA was replaced by LOCATION_COMSCORE_MARKET on 2026-06-22 and rules using DMAs are no longer active, so this API rejects it rather than storing a rule that would never fire.

minItems
1
Array itemstring
statusstring

The platform's own status text, forwarded verbatim in both directions. NO ENUM IS DECLARED for it -- the platform returns ACTIVE here but documents no value space, so this API neither normalises it nor synthesizes a default. Echo what a read returned.

maxLength
256
platformstring

Defaults to 'facebook'. Only Meta is served today.

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

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/UpdateAdValueRuleSetResponseDto
required
[ "valueRuleSetId", "name", "rules", "message" ]
valueRuleSetIdstringrequired
pattern
^[1-9]\d{0,19}$
namestringrequired
maxLength
255
rulesarrayrequired

The rule set AS IT NOW STANDS, in evaluation order. Anything you did not send is gone.

Array itemobject
#/components/schemas/AdValueRuleDto
required
[ "name", "adjustSign", "adjustValue", "criteria" ]
idstring

The rule id, as the platform minted it. THIS FIELD IS THE MECHANISM OF THE FULL REPLACE: on an update, a rule that carries its id is KEPT, a rule without one is CREATED, and a rule you do not send at all is DELETED. Echo it back exactly as this API returned it.

maxLength
256
namestringrequired

Rule name, as it appears in the platform UI.

minLength
1
maxLength
255
adjustSignstringrequired

Which way the bid moves. THE DIRECTION LIVES HERE, not in adjustValue: there is no signed field.

enum
[ "INCREASE", "DECREASE" ]
adjustValuenumberrequired

An UNSIGNED magnitude in percent, and its ceiling DEPENDS ON adjustSign: INCREASE accepts 1-1000, DECREASE accepts 1-90. The schema maximum shown here is the INCREASE one, because a schema field cannot express a cross-field rule; a DECREASE above 90 is rejected by this API with a 400 rather than sent to be rejected by the platform. 0 is out of range in both directions.

minimum
1
maximum
1000
criteriaarrayrequired

The criteria the rule matches on. Multiple criteria within one rule are combined by the platform.

minItems
1
maxItems
4
Array itemobject
#/components/schemas/AdValueRuleCriterionDto
required
[ "criteriaType", "operator", "criteriaValues", "criteriaValueTypes" ]
criteriaTypestringrequired

What the criterion matches on. OMNI_CHANNEL (conversion location: APP, INSTANT_FORM, PHONE_CALL, WEBSITE) is accepted even though the platform's own enum table omits it -- the contract this API tracks declares it, and dropping it would reject a value the target accepts.

enum
[ "AGE", "GENDER", "OS_TYPE", "DEVICE_PLATFORM", "LOCATION", "PLACEMENT", "OMNI_CHANNEL", "AUDIENCE_LABEL" ]
operatorstringrequired

The only operator the contract declares. It is REQUIRED on every criterion even though it has a single value.

enum
[ "CONTAINS" ]
criteriaValuesarrayrequired

The values matched, in the platform's own vocabulary. AGE takes 18-24, 18+ or a custom 18-26; a range whose upper bound is 65 is invalid (use 18+). GENDER values are passed through UNTOUCHED: the platform returns them lower case on a read while a write requires upper case, so never case-compare a stored rule against a fetched one. AUDIENCE_LABEL strings are not validated anywhere -- there is no API to provision them, so a typo produces a rule that never fires.

minItems
1
Array itemstring
criteriaValueTypesarrayrequired

POSITIONALLY PAIRED with criteriaValues: entry i types value i, so the two arrays must have the SAME LENGTH. A mismatch is rejected here rather than forwarded, because the platform would silently apply its own default to the untyped values and the rule would target a different audience than the one you described.

NONE is valid for every criterion type. LOCATION additionally takes LOCATION_COUNTRY, LOCATION_REGION, LOCATION_CITY, LOCATION_COMSCORE_MARKET and they MAY be mixed inside one criterion. Values outside this set are forwarded verbatim (the platform owns the vocabulary) with ONE exception: LOCATION_DMA is rejected. LOCATION_DMA was replaced by LOCATION_COMSCORE_MARKET on 2026-06-22 and rules using DMAs are no longer active, so this API rejects it rather than storing a rule that would never fire.

minItems
1
Array itemstring
statusstring

The platform's own status text, forwarded verbatim in both directions. NO ENUM IS DECLARED for it -- the platform returns ACTIVE here but documents no value space, so this API neither normalises it nor synthesizes a default. Echo what a read returned.

maxLength
256
messagestringrequired

Human-readable confirmation of what was done.

Original schema
{
  "$ref": "#/components/schemas/UpdateAdValueRuleSetResponseDto"
}
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"
}
404Resource not found

Resource not found

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"
}
409Conflict

Conflict

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"
}
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.

UpdateAdValueRuleSetDto

#/components/schemas/UpdateAdValueRuleSetDto

{
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "Social account id (posting or ads variant) used to resolve the platform token."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "REQUIRED even when it is unchanged. The update is declarative: the body you send becomes the rule set."
    },
    "rules": {
      "minItems": 1,
      "maxItems": 10,
      "description": "THE COMPLETE RULE LIST. THIS IS A FULL REPLACE, NOT A PATCH. Keep a rule by echoing its `id`; create one by sending the object WITHOUT an `id`; DELETE one by OMITTING it. There is no warning and no undo. Read the set first and edit what you get back.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdValueRuleDto"
      }
    },
    "platform": {
      "type": "string",
      "description": "Defaults to 'facebook'. Only Meta is served today."
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "name",
    "rules"
  ]
}
AdValueRuleDto

#/components/schemas/AdValueRuleDto

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 256,
      "description": "The rule id, as the platform minted it. THIS FIELD IS THE MECHANISM OF THE FULL REPLACE: on an update, a rule that carries its `id` is KEPT, a rule without one is CREATED, and a rule you do not send at all is DELETED. Echo it back exactly as this API returned it."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Rule name, as it appears in the platform UI."
    },
    "adjustSign": {
      "type": "string",
      "enum": [
        "INCREASE",
        "DECREASE"
      ],
      "description": "Which way the bid moves. THE DIRECTION LIVES HERE, not in `adjustValue`: there is no signed field."
    },
    "adjustValue": {
      "type": "number",
      "minimum": 1,
      "maximum": 1000,
      "description": "An UNSIGNED magnitude in percent, and its ceiling DEPENDS ON `adjustSign`: INCREASE accepts 1-1000, DECREASE accepts 1-90. The schema maximum shown here is the INCREASE one, because a schema field cannot express a cross-field rule; a DECREASE above 90 is rejected by this API with a 400 rather than sent to be rejected by the platform. 0 is out of range in both directions."
    },
    "criteria": {
      "minItems": 1,
      "maxItems": 4,
      "description": "The criteria the rule matches on. Multiple criteria within one rule are combined by the platform.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdValueRuleCriterionDto"
      }
    },
    "status": {
      "type": "string",
      "maxLength": 256,
      "description": "The platform's own status text, forwarded verbatim in both directions. NO ENUM IS DECLARED for it -- the platform returns ACTIVE here but documents no value space, so this API neither normalises it nor synthesizes a default. Echo what a read returned."
    }
  },
  "required": [
    "name",
    "adjustSign",
    "adjustValue",
    "criteria"
  ]
}
AdValueRuleCriterionDto

#/components/schemas/AdValueRuleCriterionDto

{
  "type": "object",
  "properties": {
    "criteriaType": {
      "type": "string",
      "enum": [
        "AGE",
        "GENDER",
        "OS_TYPE",
        "DEVICE_PLATFORM",
        "LOCATION",
        "PLACEMENT",
        "OMNI_CHANNEL",
        "AUDIENCE_LABEL"
      ],
      "description": "What the criterion matches on. `OMNI_CHANNEL` (conversion location: APP, INSTANT_FORM, PHONE_CALL, WEBSITE) is accepted even though the platform's own enum table omits it -- the contract this API tracks declares it, and dropping it would reject a value the target accepts."
    },
    "operator": {
      "type": "string",
      "enum": [
        "CONTAINS"
      ],
      "description": "The only operator the contract declares. It is REQUIRED on every criterion even though it has a single value."
    },
    "criteriaValues": {
      "minItems": 1,
      "description": "The values matched, in the platform's own vocabulary. AGE takes `18-24`, `18+` or a custom `18-26`; a range whose upper bound is 65 is invalid (use `18+`). GENDER values are passed through UNTOUCHED: the platform returns them lower case on a read while a write requires upper case, so never case-compare a stored rule against a fetched one. AUDIENCE_LABEL strings are not validated anywhere -- there is no API to provision them, so a typo produces a rule that never fires.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "criteriaValueTypes": {
      "minItems": 1,
      "description": "POSITIONALLY PAIRED with `criteriaValues`: entry i types value i, so the two arrays must have the SAME LENGTH. A mismatch is rejected here rather than forwarded, because the platform would silently apply its own default to the untyped values and the rule would target a different audience than the one you described.\n\n`NONE` is valid for every criterion type. LOCATION additionally takes LOCATION_COUNTRY, LOCATION_REGION, LOCATION_CITY, LOCATION_COMSCORE_MARKET and they MAY be mixed inside one criterion. Values outside this set are forwarded verbatim (the platform owns the vocabulary) with ONE exception: LOCATION_DMA is rejected. LOCATION_DMA was replaced by LOCATION_COMSCORE_MARKET on 2026-06-22 and rules using DMAs are no longer active, so this API rejects it rather than storing a rule that would never fire.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "criteriaType",
    "operator",
    "criteriaValues",
    "criteriaValueTypes"
  ]
}
UpdateAdValueRuleSetResponseDto

#/components/schemas/UpdateAdValueRuleSetResponseDto

{
  "type": "object",
  "properties": {
    "valueRuleSetId": {
      "type": "string",
      "pattern": "^[1-9]\\d{0,19}$"
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "rules": {
      "description": "The rule set AS IT NOW STANDS, in evaluation order. Anything you did not send is gone.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdValueRuleDto"
      }
    },
    "message": {
      "type": "string",
      "description": "Human-readable confirmation of what was done."
    }
  },
  "required": [
    "valueRuleSetId",
    "name",
    "rules",
    "message"
  ]
}
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"
  ]
}