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

Update a tracking tag

Updates a tag and returns its re-fetched canonical state. AT LEAST ONE FIELD IS REQUIRED -- an empty body answers 400.

FOUR OF THE FIVE WRITABLE FIELDS CANNOT BE READ BACK. name shows up on the returned tag; enableAutomaticMatching, automaticMatchingFields, firstPartyCookieStatus and dataUseSetting do NOT, because the contract this API tracks does not publish them on the tag. The platform does store them -- keep your own record of what you set, because this API cannot show it to you.

automaticMatchingFields IS A FULL REPLACE, not an add: send the complete set you want. Combined with the paragraph above, a partial array is a loss you can neither undo nor see.

THERE IS NO DELETE OPERATION IN THIS FAMILY and there will not be one: the platform has no API to delete a tag. Retiring one means removing the snippet from your site.

Authentication

The following security requirement applies to this operation.

  1. bearerhttp

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

Parameters

accountIdpathrequired

Social account id -- a connected Meta account. It is what resolves the platform token; it is NOT the ad account and NOT the tag.

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

The tag id, as a numeric platform (pixel) id. A malformed id answers 400, not 404: the platform reports an unreachable tag with one error that cannot be told apart from "no permission" or "account not enabled for pixel management", and naming one of the three would state a fact this API never observed.

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

Defaults to 'facebook'. Only Meta is served today; anything else is a 501 rather than a silent empty answer. NOT IN THE PUBLISHED CONTRACT for these operations -- it is accepted because every sibling ads operation carries it, so the same query shape works across the vertical.

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

Request body

Required body
application/json
Bodyobjectrequired
#/components/schemas/UpdateTrackingTagDto
additionalProperties
false
namestring

New name for the tag.

minLength
1
maxLength
200
enableAutomaticMatchingboolean

Turn Advanced Matching on or off. When it is off the platform ignores automaticMatchingFields entirely.

automaticMatchingFieldsarray

Customer-information keys the tag may hash and send. THIS REPLACES the stored list, it does not add to it -- send the full set you want. YOU CANNOT READ IT BACK: the tracked contract does not publish this field on the tag, so keep your own record of what you set.

Array itemstring
enum
[ "em", "ph", "fn", "ln", "ge", "db", "ct", "st", "zp", "country", "external_id" ]
firstPartyCookieStatusstring

First-party cookie behaviour. Sent to the platform in ITS OWN spelling (upper case); you always use the lower-case form here. NOT READABLE BACK -- see automaticMatchingFields.

enum
[ "empty", "first_party_cookie_disabled", "first_party_cookie_enabled" ]
dataUseSettingstring

How the platform may use the data this tag collects. Sent to the platform in ITS OWN spelling (upper case). NOT READABLE BACK -- see automaticMatchingFields.

enum
[ "advertising_and_analytics", "analytics_only", "empty" ]
Original schema
{
  "$ref": "#/components/schemas/UpdateTrackingTagDto"
}

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/TrackingTagResponseDto
required
[ "platform", "tag" ]
platformstringrequired

Always metaads. This names the ADVERTISING SURFACE the tag lives on, and it is deliberately not one of the connected-account platform names: there is no separate metaads account, adapter or credential behind it. You connect a Facebook account and manage this surface through it.

enum
[ "metaads" ]
tagobjectrequired
#/components/schemas/TrackingTagDto
required
[ "id", "name", "platform", "kind", "status", "code", "lastFiredTime", "isUnavailable", "installed", "creationTime", "ownerBusinessId", "ownerAdAccountId" ]
idstringrequired

Platform-native tag id -- on Meta a numeric pixel id, as a string. THIS IS THE VALUE THE REST OF THE ADS SURFACE ASKS FOR: it is what getConversionsQuality calls destinationId, what createAdAudience calls pixelId, and what an ad's promotedObject.pixelId needs. No conversion is required -- all three validate the same shape.

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

The tag name as it is stored on the platform.

minLength
1
maxLength
200
platformstringrequired

Always metaads. This names the ADVERTISING SURFACE the tag lives on, and it is deliberately not one of the connected-account platform names: there is no separate metaads account, adapter or credential behind it. You connect a Facebook account and manage this surface through it.

enum
[ "metaads" ]
kindstringrequired

What kind of tracking object this is. Always pixel today, because Meta is the only surface served. The contract this API tracks lists other kinds for other platforms; declaring them here would give you branches that can never be reached.

enum
[ "pixel" ]
statusstringrequired

DERIVED, not a platform field: inactive when isUnavailable is true, active otherwise. isUnavailable is published alongside it because the derivation loses WHY the platform cannot reach the tag.

enum
[ "active", "inactive" ]
codestringrequired

The install snippet. IT IS ALWAYS NULL IN THE LIST VIEW -- the list edge does not request it, because the snippet is kilobytes of JavaScript per row. Read one tag by id to get it. A null from the by-id operation means the platform really did not return one.

nullable
true
lastFiredTimenumberrequired

Unix seconds of the last event this tag received, or null if it has NEVER fired. Null and zero are not the same thing.

nullable
true
isUnavailablebooleanrequired

The platform's own is_unavailable flag -- published raw next to the derived status so the derivation can be checked rather than trusted.

installedbooleanrequired

DERIVED from lastFiredTime: true once the tag has fired at least once. CREATING A TAG DOES NOT INSTALL IT -- this stays false until the snippet is actually on the site and an event arrives.

creationTimenumberrequired

Unix seconds the tag was created. NULLABLE HERE although the tracked contract types it as a plain integer: the platform does not always return the field, and inventing a timestamp for the rows where it is missing would be worse than admitting it.

nullable
true
ownerBusinessIdstringrequired

Business Manager that owns the tag, or null for a tag on a personal (non-BM) ad account. A NULL HERE IS WHY SHARING FAILS: the platform requires an owning business on every shared-accounts operation, so a tag with none cannot be shared at all.

nullable
true
ownerAdAccountIdstringrequired

The act_<n> ad account that owns the tag. THIS IS WHAT RESOLVES THE ambiguity getConversionsQuality warns about -- it tells you which ad account each dataset belongs to. Nullable for the same reason as creationTime: the tracked contract types it as a plain string, the platform does not always send it.

nullable
true
pattern
^act_[1-9]\d{0,19}$
Original schema
{
  "$ref": "#/components/schemas/TrackingTagResponseDto"
}
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"
}
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.

UpdateTrackingTagDto

#/components/schemas/UpdateTrackingTagDto

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "New name for the tag."
    },
    "enableAutomaticMatching": {
      "type": "boolean",
      "description": "Turn Advanced Matching on or off. When it is off the platform ignores `automaticMatchingFields` entirely."
    },
    "automaticMatchingFields": {
      "type": "array",
      "description": "Customer-information keys the tag may hash and send. THIS REPLACES the stored list, it does not add to it -- send the full set you want. YOU CANNOT READ IT BACK: the tracked contract does not publish this field on the tag, so keep your own record of what you set.",
      "items": {
        "type": "string",
        "enum": [
          "em",
          "ph",
          "fn",
          "ln",
          "ge",
          "db",
          "ct",
          "st",
          "zp",
          "country",
          "external_id"
        ]
      }
    },
    "firstPartyCookieStatus": {
      "type": "string",
      "enum": [
        "empty",
        "first_party_cookie_disabled",
        "first_party_cookie_enabled"
      ],
      "description": "First-party cookie behaviour. Sent to the platform in ITS OWN spelling (upper case); you always use the lower-case form here. NOT READABLE BACK -- see `automaticMatchingFields`."
    },
    "dataUseSetting": {
      "type": "string",
      "enum": [
        "advertising_and_analytics",
        "analytics_only",
        "empty"
      ],
      "description": "How the platform may use the data this tag collects. Sent to the platform in ITS OWN spelling (upper case). NOT READABLE BACK -- see `automaticMatchingFields`."
    }
  },
  "additionalProperties": false
}
TrackingTagResponseDto

#/components/schemas/TrackingTagResponseDto

{
  "type": "object",
  "properties": {
    "platform": {
      "type": "string",
      "enum": [
        "metaads"
      ],
      "description": "Always `metaads`. This names the ADVERTISING SURFACE the tag lives on, and it is deliberately not one of the connected-account platform names: there is no separate `metaads` account, adapter or credential behind it. You connect a Facebook account and manage this surface through it."
    },
    "tag": {
      "$ref": "#/components/schemas/TrackingTagDto"
    }
  },
  "required": [
    "platform",
    "tag"
  ]
}
TrackingTagDto

#/components/schemas/TrackingTagDto

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[1-9]\\d{0,19}$",
      "description": "Platform-native tag id -- on Meta a numeric pixel id, as a string. THIS IS THE VALUE THE REST OF THE ADS SURFACE ASKS FOR: it is what `getConversionsQuality` calls `destinationId`, what `createAdAudience` calls `pixelId`, and what an ad's `promotedObject.pixelId` needs. No conversion is required -- all three validate the same shape."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "The tag name as it is stored on the platform."
    },
    "platform": {
      "type": "string",
      "enum": [
        "metaads"
      ],
      "description": "Always `metaads`. This names the ADVERTISING SURFACE the tag lives on, and it is deliberately not one of the connected-account platform names: there is no separate `metaads` account, adapter or credential behind it. You connect a Facebook account and manage this surface through it."
    },
    "kind": {
      "type": "string",
      "enum": [
        "pixel"
      ],
      "description": "What kind of tracking object this is. Always `pixel` today, because Meta is the only surface served. The contract this API tracks lists other kinds for other platforms; declaring them here would give you branches that can never be reached."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ],
      "description": "DERIVED, not a platform field: `inactive` when `isUnavailable` is true, `active` otherwise. `isUnavailable` is published alongside it because the derivation loses WHY the platform cannot reach the tag."
    },
    "code": {
      "type": "string",
      "nullable": true,
      "description": "The install snippet. IT IS ALWAYS NULL IN THE LIST VIEW -- the list edge does not request it, because the snippet is kilobytes of JavaScript per row. Read one tag by id to get it. A null from the by-id operation means the platform really did not return one."
    },
    "lastFiredTime": {
      "type": "number",
      "nullable": true,
      "description": "Unix seconds of the last event this tag received, or null if it has NEVER fired. Null and zero are not the same thing."
    },
    "isUnavailable": {
      "type": "boolean",
      "description": "The platform's own `is_unavailable` flag -- published raw next to the derived `status` so the derivation can be checked rather than trusted."
    },
    "installed": {
      "type": "boolean",
      "description": "DERIVED from `lastFiredTime`: true once the tag has fired at least once. CREATING A TAG DOES NOT INSTALL IT -- this stays false until the snippet is actually on the site and an event arrives."
    },
    "creationTime": {
      "type": "number",
      "nullable": true,
      "description": "Unix seconds the tag was created. NULLABLE HERE although the tracked contract types it as a plain integer: the platform does not always return the field, and inventing a timestamp for the rows where it is missing would be worse than admitting it."
    },
    "ownerBusinessId": {
      "type": "string",
      "nullable": true,
      "description": "Business Manager that owns the tag, or null for a tag on a personal (non-BM) ad account. A NULL HERE IS WHY SHARING FAILS: the platform requires an owning business on every shared-accounts operation, so a tag with none cannot be shared at all."
    },
    "ownerAdAccountId": {
      "type": "string",
      "nullable": true,
      "pattern": "^act_[1-9]\\d{0,19}$",
      "description": "The `act_<n>` ad account that owns the tag. THIS IS WHAT RESOLVES THE ambiguity `getConversionsQuality` warns about -- it tells you which ad account each dataset belongs to. Nullable for the same reason as `creationTime`: the tracked contract types it as a plain string, the platform does not always send it."
    }
  },
  "required": [
    "id",
    "name",
    "platform",
    "kind",
    "status",
    "code",
    "lastFiredTime",
    "isUnavailable",
    "installed",
    "creationTime",
    "ownerBusinessId",
    "ownerAdAccountId"
  ]
}
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"
  ]
}