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

List value rule sets in an ad account

Lists the ad account's value rule sets, read live from the platform. Nothing is stored locally, so valueRuleSetId here is the id every other operation on this resource takes in its path.

A value rule set raises or lowers the bid by a percentage for specific audiences. RULES ARE EVALUATED IN ARRAY ORDER and only the FIRST matching rule adjusts the bid for an audience several rules would match, so the order returned here is behaviour, not presentation.

The platform does not document paging on this edge: paging.after comes back null when it omits cursors, which is also what an exhausted page looks like.

Value rule sets only apply to LOWEST_COST_WITHOUT_CAP and COST_CAP ad sets; the platform rejects the rest server-side and this API does not pre-check it.

Authentication

The following security requirement applies to this operation.

  1. bearerhttp

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

Parameters

afterqueryoptional

Cursor from paging.after of the previous page.

afterstring
pattern
^[\x21-\x7e]{1,2048}$
maxLength
2048
Original schema
{
  "type": "string",
  "pattern": "^[\\x21-\\x7e]{1,2048}$",
  "maxLength": 2048
}
limitqueryoptional
limitinteger
minimum
1
maximum
100
default
25
Original schema
{
  "type": "integer",
  "minimum": 1,
  "maximum": 100,
  "default": 25
}
platformqueryoptional

Defaults to 'facebook'. Only Meta is served today; anything else is a 501 rather than a silent empty list.

platformstring
Original schema
{
  "type": "string"
}
adAccountIdqueryrequired

Platform ad account id (act_<n>) whose value rule sets are listed. It is REQUIRED here and on create, and NOT accepted on read, update or delete -- those resolve from the rule set id alone.

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

Social account id used to resolve the platform token.

accountIdstringrequired
Original schema
{
  "type": "string"
}

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/ListAdValueRuleSetsResponseDto
required
[ "adAccountId", "data", "paging" ]
adAccountIdstringrequired

The ad account the page was read from, echoed back.

pattern
^act_[1-9]\d{0,19}$
dataarrayrequired
Array itemobject
#/components/schemas/AdValueRuleSetDto
required
[ "valueRuleSetId", "name", "rules" ]
valueRuleSetIdstringrequired

The platform's own value rule set id. It is ALSO the {valueRuleSetId} path segment of every other operation on this resource -- this API keeps no local record, so there is no second id space to translate between.

pattern
^[1-9]\d{0,19}$
namestringrequired
minLength
1
maxLength
255
rulesarrayrequired

The rules, IN EVALUATION ORDER. Order is behaviour, not presentation: only the FIRST matching rule adjusts the bid for an audience that several rules would match. The order you send is the order that is stored and returned, and nothing in this API reorders the array.

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
pagingobjectrequired
#/components/schemas/AdValueRuleSetsPagingDto
required
[ "after" ]
afterstringrequired

Cursor for the next page; null when exhausted. The platform does not document paging on this edge, so null is also what comes back when it omits cursors entirely. It is the platform's own cursor forwarded OPAQUELY -- never decoded, never re-encoded.

nullable
true
pattern
^[\x21-\x7e]{1,2048}$
minLength
1
maxLength
2048
Original schema
{
  "$ref": "#/components/schemas/ListAdValueRuleSetsResponseDto"
}
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.

ListAdValueRuleSetsResponseDto

#/components/schemas/ListAdValueRuleSetsResponseDto

{
  "type": "object",
  "properties": {
    "adAccountId": {
      "type": "string",
      "pattern": "^act_[1-9]\\d{0,19}$",
      "description": "The ad account the page was read from, echoed back."
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdValueRuleSetDto"
      }
    },
    "paging": {
      "$ref": "#/components/schemas/AdValueRuleSetsPagingDto"
    }
  },
  "required": [
    "adAccountId",
    "data",
    "paging"
  ]
}
AdValueRuleSetDto

#/components/schemas/AdValueRuleSetDto

{
  "type": "object",
  "properties": {
    "valueRuleSetId": {
      "type": "string",
      "pattern": "^[1-9]\\d{0,19}$",
      "description": "The platform's own value rule set id. It is ALSO the `{valueRuleSetId}` path segment of every other operation on this resource -- this API keeps no local record, so there is no second id space to translate between."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "rules": {
      "minItems": 1,
      "maxItems": 10,
      "description": "The rules, IN EVALUATION ORDER. Order is behaviour, not presentation: only the FIRST matching rule adjusts the bid for an audience that several rules would match. The order you send is the order that is stored and returned, and nothing in this API reorders the array.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AdValueRuleDto"
      }
    }
  },
  "required": [
    "valueRuleSetId",
    "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"
  ]
}
AdValueRuleSetsPagingDto

#/components/schemas/AdValueRuleSetsPagingDto

{
  "type": "object",
  "properties": {
    "after": {
      "type": "string",
      "nullable": true,
      "pattern": "^[\\x21-\\x7e]{1,2048}$",
      "minLength": 1,
      "maxLength": 2048,
      "description": "Cursor for the next page; null when exhausted. The platform does not document paging on this edge, so null is also what comes back when it omits cursors entirely. It is the platform's own cursor forwarded OPAQUELY -- never decoded, never re-encoded."
    }
  },
  "required": [
    "after"
  ]
}
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"
  ]
}