{
  "openapi": "3.1.0",
  "info": {
    "title": "AnyTrack Customer API",
    "description": "Read-only access to properties, reports, conversions, integrations, connections, destinations and webhooks. Requests are limited to 60 per minute per account.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/v1"
    }
  ],
  "tags": [
    {
      "name": "Properties",
      "description": "A property is a website or funnel that AnyTrack tracks. Every report, conversion, connection, destination, and webhook belongs to one property."
    },
    {
      "name": "Reports",
      "description": "Reports return the data of a property for up to 31 days, in the time zone and currency of the property."
    },
    {
      "name": "Conversions",
      "description": "A conversion is one tracked event, such as a `Purchase` or a `Lead`. Find events with the conversions report, then get one event with its `id`."
    },
    {
      "name": "Integrations",
      "description": "An integration is a source of events, such as a store, a form, or an affiliate network. Integrations belong to the account, and each one can also belong to one property."
    },
    {
      "name": "Connections",
      "description": "A connection is an ad platform account authorized for a property. AnyTrack uses it to sync spend and campaign data."
    },
    {
      "name": "Destinations",
      "description": "A destination is a pixel or an ad platform that receives conversions from a property."
    },
    {
      "name": "Webhooks",
      "description": "An outgoing webhook sends the events of a property to a URL."
    }
  ],
  "paths": {
    "/properties": {
      "get": {
        "operationId": "listProperties",
        "summary": "List the account properties",
        "description": "Returns the properties of the account. Start here: every other endpoint of a property needs the `id` of the property.",
        "tags": [
          "Properties"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Number of items on each page.",
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The `nextCursor` from the previous page. Keep the property and query fields unchanged. `limit` may change where supported. Pages are not snapshot-consistent.",
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Properties of the account on this page.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Property"
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor of the next page. Send it as `cursor` with the same query to get the next page. `null` on the last page.",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}": {
      "get": {
        "operationId": "getProperty",
        "summary": "Get a property and its reporting settings",
        "description": "Returns one property with its report settings: the time zone, the currency, the default conversion events, and the attribution window.",
        "tags": [
          "Properties"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The property, with its report settings.",
                      "$ref": "#/components/schemas/PropertyDetail"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/reports/campaigns": {
      "post": {
        "operationId": "campaignReport",
        "summary": "Campaign performance report",
        "description": "Returns the performance of each campaign, ad set, or ad of a property for a date range of up to 31 days. Each row combines ad platform metrics (spend, impressions) with the events that AnyTrack tracked.\n\n## Metrics\n\nAsk for metrics by name in `metrics`. Each row returns a nested `metrics` object, for example `data[0].metrics.spend`. The first page returns requested totals directly in `summary`, for example `summary.spend`. Dynamic names are literal keys, for example `data[0].metrics[\"events.Purchase\"]` and `summary[\"events.Purchase\"]`. Money metrics aggregate stored reporting values; the configured reporting currency belongs to the property.\n\n| Metric | Value | Source |\n| --- | --- | --- |\n| `spend` | Amount spent on the ads. | Ad platform |\n| `impressions` | Number of times the ads were shown. | Ad platform |\n| `reach` | Sum of ad-platform reach across the requested dates; a person may be counted on multiple days. | Ad platform |\n| `linkClicks` | Number of clicks on the ad links. | Ad platform |\n| `results` | Results that the ad platform attributes to the ads, for the campaign objective. | Ad platform |\n| `resultValues` | Value of the results that the ad platform attributes to the ads. | Ad platform |\n| `sessions` | Number of sessions that AnyTrack tracked. | AnyTrack |\n| `clients` | Approximate number of distinct property-scoped client IDs (browsers). | AnyTrack |\n| `eventValues` | Sum of the values of the conversion events. | AnyTrack |\n| `events.<EventName>` | Number of events with this name, for example `events.Purchase`. | AnyTrack |\n| `frequency` | `impressions` ÷ `reach`. | Calculated |\n| `cpm` | 1,000 × `spend` ÷ `impressions`. | Calculated |\n| `cpc` | `spend` ÷ `linkClicks`. | Calculated |\n| `ctr` | `linkClicks` ÷ `impressions`, as a ratio: `0.02` is 2%. | Calculated |\n| `roas` | `eventValues` ÷ `spend`. | Calculated |\n| `cpe.<EventName>` | `spend` ÷ the number of events with this name. | Calculated |\n\nA calculated metric is `null` when its divisor is zero, negative, or unavailable, or another required input is unavailable. Unavailable ad platform metrics are also `null`. AnyTrack gets spend, impressions, reach, link clicks, and results from Meta Ads, Google Ads, TikTok Ads, ChatGPT Ads, and Microsoft Ads. Taboola and Outbrain campaigns have no ad platform metrics.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "description": "First day of the report, included, in the property time zone. The range covers at most 31 days.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "to": {
                    "description": "Last day of the report, included, in the property time zone. `to` must be on or after `from`.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "attribution": {
                    "description": "Attribution model. `last-ad-click` gives the credit to the last ad click before the conversion. `first-ad-click` gives the credit to the first ad click.",
                    "default": "last-ad-click",
                    "type": "string",
                    "enum": [
                      "last-ad-click",
                      "first-ad-click"
                    ]
                  },
                  "groupBy": {
                    "description": "Level of each row: `campaign`, `adset` (ad set), or `ad`.",
                    "default": "campaign",
                    "type": "string",
                    "enum": [
                      "campaign",
                      "adset",
                      "ad"
                    ]
                  },
                  "metrics": {
                    "description": "Metrics to return in each row and in `summary`. Use the metric names in the Metrics section, `events.<EventName>`, or `cpe.<EventName>`. AnyTrack removes duplicate names.",
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "conversionEvents": {
                    "description": "Events that count as conversions for `eventValues` and `roas`. Defaults to the property conversion events, or `Purchase` if none are configured. Other named event metrics are independent of this selection.",
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "filters": {
                    "description": "Filters for the rows. A row must match every filter that you send. A row matches a filter when it matches one of its values.",
                    "type": "object",
                    "properties": {
                      "channel": {
                        "description": "Channels to include. Use the `channel` values of the report rows. With this filter, rows that have spend but no tracked event are not included.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "platform": {
                        "description": "Platforms to include. With this filter, rows that have spend but no tracked event are not included.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "adNetwork": {
                        "description": "Ad networks to include. Use the `adNetwork` values of the report rows.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "campaignIds": {
                        "description": "IDs of the campaigns to include. Use the `id` of rows grouped by `campaign`.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "adsetIds": {
                        "description": "IDs of the ad sets to include. Use the `id` of rows grouped by `adset`.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "adIds": {
                        "description": "IDs of the ads to include. Use the `id` of rows grouped by `ad`.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "sort": {
                    "description": "Sort order of the rows.",
                    "type": "object",
                    "properties": {
                      "metric": {
                        "description": "Metric to sort by. Use one of the fixed metric names. You cannot sort by `events.<EventName>` or `cpe.<EventName>`.",
                        "type": "string",
                        "enum": [
                          "spend",
                          "impressions",
                          "reach",
                          "frequency",
                          "linkClicks",
                          "sessions",
                          "clients",
                          "eventValues",
                          "results",
                          "resultValues",
                          "cpm",
                          "cpc",
                          "ctr",
                          "roas"
                        ]
                      },
                      "direction": {
                        "description": "`desc`: highest value first. `asc`: lowest value first.",
                        "default": "desc",
                        "type": "string",
                        "enum": [
                          "asc",
                          "desc"
                        ]
                      }
                    },
                    "required": [
                      "metric"
                    ],
                    "additionalProperties": false
                  },
                  "limit": {
                    "description": "Number of items on each page.",
                    "default": 50,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "cursor": {
                    "description": "The `nextCursor` from the previous page. Keep the property and query fields unchanged. `limit` may change where supported. Pages are not snapshot-consistent.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Rows of the report on this page. Each row is a campaign, an ad set, or an ad.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CampaignReportRow"
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor of the next page. Send it as `cursor` with the same query to get the next page. `null` on the last page.",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "report": {
                      "description": "Settings that AnyTrack used for the report.",
                      "type": "object",
                      "properties": {
                        "propertyId": {
                          "description": "ID of the property.",
                          "type": "string"
                        },
                        "from": {
                          "description": "First day of the report, as in the request.",
                          "type": "string"
                        },
                        "to": {
                          "description": "Last day of the report, as in the request.",
                          "type": "string"
                        },
                        "timezone": {
                          "description": "Time zone of the report. It is the time zone of the property.",
                          "type": "string"
                        },
                        "currency": {
                          "description": "Configured reporting currency of the property. For individual conversions, use the currency returned on each event for its value.",
                          "type": "string"
                        },
                        "attribution": {
                          "description": "Attribution model of the report.",
                          "type": "string",
                          "enum": [
                            "last-ad-click",
                            "first-ad-click"
                          ]
                        },
                        "groupBy": {
                          "description": "Level of the rows.",
                          "type": "string",
                          "enum": [
                            "campaign",
                            "adset",
                            "ad"
                          ]
                        },
                        "conversionEvents": {
                          "description": "Events that counted as conversions.",
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "propertyId",
                        "from",
                        "to",
                        "timezone",
                        "currency",
                        "attribution",
                        "groupBy",
                        "conversionEvents"
                      ],
                      "additionalProperties": false
                    },
                    "summary": {
                      "description": "Requested metrics for the whole query, keyed directly by metric name (for example `summary.spend` or `summary[\"events.Purchase\"]`). Returned on the first page when available; later pages return `null`. Do not add summary values to page rows.",
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/CampaignReportMetrics"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "report",
                    "summary"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 16 KB. Send a smaller request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`upstream_timeout`: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/reports/campaigns/export": {
      "post": {
        "operationId": "campaignReportExport",
        "summary": "Export campaign performance as CSV",
        "description": "Returns all the matching rows of the campaign report as one CSV file, in the property time zone, with no summary. The CSV columns are `name`, `refType`, `refId`, then the requested metrics. The request body is the same as for the campaign report, without `limit` and `cursor`. The file can be at most 1 MB (1,048,576 bytes). For a larger file, the API returns `500` with the code `response_too_large`: make the date range shorter or add filters.\n\n## Metrics\n\nAsk for metrics by name in `metrics`. Each metric becomes a CSV column after `name`, `refType`, and `refId`; dynamic names such as `events.Purchase` are column names. Unavailable values are empty CSV cells. Money metrics aggregate stored reporting values; the configured reporting currency belongs to the property. Date ranges cover at most 31 days.\n\n| Metric | Value | Source |\n| --- | --- | --- |\n| `spend` | Amount spent on the ads. | Ad platform |\n| `impressions` | Number of times the ads were shown. | Ad platform |\n| `reach` | Sum of ad-platform reach across the requested dates; a person may be counted on multiple days. | Ad platform |\n| `linkClicks` | Number of clicks on the ad links. | Ad platform |\n| `results` | Results that the ad platform attributes to the ads, for the campaign objective. | Ad platform |\n| `resultValues` | Value of the results that the ad platform attributes to the ads. | Ad platform |\n| `sessions` | Number of sessions that AnyTrack tracked. | AnyTrack |\n| `clients` | Approximate number of distinct property-scoped client IDs (browsers). | AnyTrack |\n| `eventValues` | Sum of the values of the conversion events. | AnyTrack |\n| `events.<EventName>` | Number of events with this name, for example `events.Purchase`. | AnyTrack |\n| `frequency` | `impressions` ÷ `reach`. | Calculated |\n| `cpm` | 1,000 × `spend` ÷ `impressions`. | Calculated |\n| `cpc` | `spend` ÷ `linkClicks`. | Calculated |\n| `ctr` | `linkClicks` ÷ `impressions`, as a ratio: `0.02` is 2%. | Calculated |\n| `roas` | `eventValues` ÷ `spend`. | Calculated |\n| `cpe.<EventName>` | `spend` ÷ the number of events with this name. | Calculated |\n\nA calculated metric is `null` when its divisor is zero, negative, or unavailable, or another required input is unavailable. Unavailable ad platform metrics are also `null`. AnyTrack gets spend, impressions, reach, link clicks, and results from Meta Ads, Google Ads, TikTok Ads, ChatGPT Ads, and Microsoft Ads. Taboola and Outbrain campaigns have no ad platform metrics.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "description": "First day of the report, included, in the property time zone. The range covers at most 31 days.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "to": {
                    "description": "Last day of the report, included, in the property time zone. `to` must be on or after `from`.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "attribution": {
                    "description": "Attribution model. `last-ad-click` gives the credit to the last ad click before the conversion. `first-ad-click` gives the credit to the first ad click.",
                    "default": "last-ad-click",
                    "type": "string",
                    "enum": [
                      "last-ad-click",
                      "first-ad-click"
                    ]
                  },
                  "groupBy": {
                    "description": "Level of each row: `campaign`, `adset` (ad set), or `ad`.",
                    "default": "campaign",
                    "type": "string",
                    "enum": [
                      "campaign",
                      "adset",
                      "ad"
                    ]
                  },
                  "metrics": {
                    "description": "Metrics to return as CSV columns. Use the metric names in the Metrics section, `events.<EventName>`, or `cpe.<EventName>`. AnyTrack removes duplicate names.",
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "conversionEvents": {
                    "description": "Events that count as conversions for `eventValues` and `roas`. Defaults to the property conversion events, or `Purchase` if none are configured. Other named event metrics are independent of this selection.",
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "filters": {
                    "description": "Filters for the rows. A row must match every filter that you send. A row matches a filter when it matches one of its values.",
                    "type": "object",
                    "properties": {
                      "channel": {
                        "description": "Channels to include. Use the `channel` values of the report rows. With this filter, rows that have spend but no tracked event are not included.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "platform": {
                        "description": "Platforms to include. With this filter, rows that have spend but no tracked event are not included.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "adNetwork": {
                        "description": "Ad networks to include. Use the `adNetwork` values of the report rows.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "campaignIds": {
                        "description": "IDs of the campaigns to include. Use the `id` of rows grouped by `campaign`.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "adsetIds": {
                        "description": "IDs of the ad sets to include. Use the `id` of rows grouped by `adset`.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "adIds": {
                        "description": "IDs of the ads to include. Use the `id` of rows grouped by `ad`.",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "sort": {
                    "description": "Sort order of the rows.",
                    "type": "object",
                    "properties": {
                      "metric": {
                        "description": "Metric to sort by. Use one of the fixed metric names. You cannot sort by `events.<EventName>` or `cpe.<EventName>`.",
                        "type": "string",
                        "enum": [
                          "spend",
                          "impressions",
                          "reach",
                          "frequency",
                          "linkClicks",
                          "sessions",
                          "clients",
                          "eventValues",
                          "results",
                          "resultValues",
                          "cpm",
                          "cpc",
                          "ctr",
                          "roas"
                        ]
                      },
                      "direction": {
                        "description": "`desc`: highest value first. `asc`: lowest value first.",
                        "default": "desc",
                        "type": "string",
                        "enum": [
                          "asc",
                          "desc"
                        ]
                      }
                    },
                    "required": [
                      "metric"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 16 KB. Send a smaller request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`upstream_timeout`: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/reports/events": {
      "post": {
        "operationId": "eventsReport",
        "summary": "Daily event counts report",
        "description": "Returns the number of events for each event name and each day of a date range of up to 31 days.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "description": "First day of the report, included, in the property time zone. The range covers at most 31 days.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "to": {
                    "description": "Last day of the report, included, in the property time zone. `to` must be on or after `from`.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "eventNames": {
                    "description": "Event names to include, for example `Purchase` or `Lead`. Without this field, the report includes every event.",
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "limit": {
                    "description": "Number of items on each page.",
                    "default": 50,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "cursor": {
                    "description": "The `nextCursor` from the previous page. Keep the property and query fields unchanged. `limit` may change where supported. Pages are not snapshot-consistent.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Rows of the report on this page. Each row is one event name on one day.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventsReportRow"
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor of the next page. Send it as `cursor` with the same query to get the next page. `null` on the last page.",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "report": {
                      "description": "Settings that AnyTrack used for the report.",
                      "type": "object",
                      "properties": {
                        "propertyId": {
                          "description": "ID of the property.",
                          "type": "string"
                        },
                        "from": {
                          "description": "First day of the report, as in the request.",
                          "type": "string"
                        },
                        "to": {
                          "description": "Last day of the report, as in the request.",
                          "type": "string"
                        },
                        "timezone": {
                          "description": "Time zone of the report. It is the time zone of the property.",
                          "type": "string"
                        },
                        "currency": {
                          "description": "Configured reporting currency of the property. For individual conversions, use the currency returned on each event for its value.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "propertyId",
                        "from",
                        "to",
                        "timezone",
                        "currency"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "report"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 16 KB. Send a smaller request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`upstream_timeout`: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/reports/conversions": {
      "post": {
        "operationId": "conversionsReport",
        "summary": "Tracked conversion events, newest first",
        "description": "Returns every tracked event of a property, newest first, for a date range of up to 31 days. Each event has its value, customer details, and attribution. Filter by event name, or by a click ID or client ID to follow one visitor.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "description": "First day of the report, included, in the property time zone. The range covers at most 31 days.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "to": {
                    "description": "Last day of the report, included, in the property time zone. `to` must be on or after `from`.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "eventNames": {
                    "description": "Event names to include, for example `Purchase` or `Lead`. Without this field, the report includes every event.",
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "clickId": {
                    "description": "AnyTrack click ID or property-scoped client ID. Modern click IDs and bare client IDs filter by browser, within the requested dates and event names. Legacy reference IDs filter by the stored reference ID. Undecodable IDs return `400` with `invalid_request`; valid unknown IDs return no rows.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "limit": {
                    "description": "Number of items on each page.",
                    "default": 50,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  },
                  "cursor": {
                    "description": "The `nextCursor` from the previous page. Keep the property and query fields unchanged. `limit` may change where supported. Pages are not snapshot-consistent.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Events on this page, newest first.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Conversion"
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor of the next page. Send it as `cursor` with the same query to get the next page. `null` on the last page.",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "report": {
                      "description": "Settings that AnyTrack used for the report.",
                      "type": "object",
                      "properties": {
                        "propertyId": {
                          "description": "ID of the property.",
                          "type": "string"
                        },
                        "from": {
                          "description": "First day of the report, as in the request.",
                          "type": "string"
                        },
                        "to": {
                          "description": "Last day of the report, as in the request.",
                          "type": "string"
                        },
                        "timezone": {
                          "description": "Time zone of the report. It is the time zone of the property.",
                          "type": "string"
                        },
                        "currency": {
                          "description": "Configured reporting currency of the property. For individual conversions, use the currency returned on each event for its value.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "propertyId",
                        "from",
                        "to",
                        "timezone",
                        "currency"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "report"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 16 KB. Send a smaller request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`upstream_timeout`: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/conversions/{conversionId}": {
      "get": {
        "operationId": "getConversion",
        "summary": "Get a conversion event",
        "description": "Returns one tracked event. Get the `conversionId` from the `id` field of an event in the conversions report.",
        "tags": [
          "Conversions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          },
          {
            "in": "path",
            "name": "conversionId",
            "schema": {
              "description": "ID of the conversion event. Get it from `conversionsReport` (`id`). Treat it as opaque; do not parse it.",
              "type": "string"
            },
            "required": true,
            "description": "ID of the conversion event. Get it from `conversionsReport` (`id`). Treat it as opaque; do not parse it."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The conversion event.",
                      "$ref": "#/components/schemas/Conversion"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations": {
      "get": {
        "operationId": "listIntegrations",
        "summary": "List the account integrations",
        "description": "Returns the integrations of the account: the stores, forms, affiliate networks, and other platforms that send events to AnyTrack. Integrations belong to the account. Add `propertyId` to get only the integrations of one property.",
        "tags": [
          "Integrations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "propertyId",
            "schema": {
              "description": "Return only the integrations of this property. Without it, the response includes every integration of the account.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Integrations of the account, sorted by `id`. This list has no pages.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Integration"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/{integrationId}": {
      "get": {
        "operationId": "getIntegration",
        "summary": "Get an integration",
        "description": "Returns one integration with its event mapping and configured settings. Settings marked secret by their field definitions are omitted; other returned values may still be sensitive.",
        "tags": [
          "Integrations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "schema": {
              "description": "ID of the integration. Get it from `listIntegrations` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the integration. Get it from `listIntegrations` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The integration.",
                      "$ref": "#/components/schemas/Integration"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/{integrationId}/logs": {
      "get": {
        "operationId": "listIntegrationLogs",
        "summary": "Requests received by an integration, newest first",
        "description": "Returns the requests that an integration received, newest first, up to 20 per page. Each log shows the parameters that AnyTrack received and the event that it made. Use the logs to troubleshoot a postback or a webhook. Received parameters may contain personal or sensitive data and are not redacted by this API.",
        "tags": [
          "Integrations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "schema": {
              "description": "ID of the integration. Get it from `listIntegrations` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the integration. Get it from `listIntegrations` (`id`)."
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "description": "First day of the logs, included, in UTC.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "description": "Last day of the logs, included, in UTC.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The `nextCursor` from the previous page. Keep the property and query fields unchanged. `limit` may change where supported. Pages are not snapshot-consistent.",
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Requests that the integration received, newest first. Each page has up to 20 requests.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrationLog"
                      }
                    },
                    "nextCursor": {
                      "description": "Cursor of the next page. Send it as `cursor` with the same query to get the next page. `null` on the last page.",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`upstream_timeout`: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/connections": {
      "get": {
        "operationId": "listConnections",
        "summary": "List the ad platform connections of a property",
        "description": "Returns the ad platform connections of a property. A connection is an ad platform account that a user authorized for the property. AnyTrack uses it to sync spend and campaign data. The API never returns tokens or credentials.",
        "tags": [
          "Connections"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Ad platform connections of the property. This list has no pages.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Connection"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/connections/{connectionId}": {
      "get": {
        "operationId": "getConnection",
        "summary": "Get an ad platform connection",
        "description": "Returns one ad platform connection with its account, setup status, last sync time, and the destinations that use it.",
        "tags": [
          "Connections"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          },
          {
            "in": "path",
            "name": "connectionId",
            "schema": {
              "description": "ID of the ad platform connection. Get it from `listConnections` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the ad platform connection. Get it from `listConnections` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The ad platform connection.",
                      "$ref": "#/components/schemas/Connection"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/destinations": {
      "get": {
        "operationId": "listDestinations",
        "summary": "List the pixels and ad destinations of a property",
        "description": "Returns the pixels and ad destinations of a property: the platforms that receive conversions from AnyTrack, such as Google Ads, GA4, Meta, TikTok, Microsoft Advertising, OpenAI Ads, Taboola, and Outbrain. The API never returns tokens.",
        "tags": [
          "Destinations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Pixels and ad destinations of the property. This list has no pages.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Destination"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/destinations/{destinationId}": {
      "get": {
        "operationId": "getDestination",
        "summary": "Get a pixel or ad destination",
        "description": "Returns one pixel or ad destination with its status and its event mapping.",
        "tags": [
          "Destinations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          },
          {
            "in": "path",
            "name": "destinationId",
            "schema": {
              "description": "ID of the pixel or ad destination. Get it from `listDestinations` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the pixel or ad destination. Get it from `listDestinations` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The pixel or ad destination.",
                      "$ref": "#/components/schemas/Destination"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "summary": "List the webhooks of a property",
        "description": "Returns the outgoing webhooks of a property. The API returns only the scheme and host of each webhook URL, because the path and the query string can contain secrets.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Webhooks of the property. This list has no pages.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/properties/{propertyId}/webhooks/{webhookId}": {
      "get": {
        "operationId": "getWebhook",
        "summary": "Get a webhook",
        "description": "Returns one outgoing webhook with its events and its status.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "propertyId",
            "schema": {
              "description": "ID of the property. Get it from `listProperties` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the property. Get it from `listProperties` (`id`)."
          },
          {
            "in": "path",
            "name": "webhookId",
            "schema": {
              "description": "ID of the webhook. Get it from `listWebhooks` (`id`).",
              "type": "string"
            },
            "required": true,
            "description": "ID of the webhook. Get it from `listWebhooks` (`id`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The webhook.",
                      "$ref": "#/components/schemas/Webhook"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_cursor`: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. `error.details`, when present, names invalid fields. Do not reuse a cursor with a different query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`unauthenticated`: Missing, invalid or deleted API key. Send a valid key in `Authorization: Bearer`. MCP uses an OAuth access token, which may also expire or be revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_unavailable`: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the `anytrack:read` scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: The account sent more than 60 requests in one minute. Wait for the number of seconds in the `Retry-After` header, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`response_too_large`, `internal_error`: The response is larger than 1 MB, or the API has an internal error. For `response_too_large`, ask for fewer rows or metrics. For `internal_error`, contact AnyTrack support with the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable`: The service is not available for a short time. Retry later, and wait longer after each failed retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Property": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the property. Send it as `propertyId` to every endpoint of the property.",
            "type": "string"
          },
          "name": {
            "description": "Name of the property in AnyTrack.",
            "type": "string"
          },
          "websiteOrigin": {
            "description": "Scheme and host of the property website, for example `https://example.com`. `null` when neither its website URL nor domain yields a valid HTTP(S) origin.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "description": "Time zone used for property report dates. Defaults to UTC when the property has no configured time zone.",
            "type": "string"
          },
          "currency": {
            "description": "Reporting currency of the property. Defaults to USD when no currency is configured.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "websiteOrigin",
          "timezone",
          "currency"
        ],
        "additionalProperties": false
      },
      "PropertyDetail": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the property. Send it as `propertyId` to every endpoint of the property.",
            "type": "string"
          },
          "name": {
            "description": "Name of the property in AnyTrack.",
            "type": "string"
          },
          "websiteOrigin": {
            "description": "Scheme and host of the property website, for example `https://example.com`. `null` when neither its website URL nor domain yields a valid HTTP(S) origin.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "description": "Time zone used for property report dates. Defaults to UTC when the property has no configured time zone.",
            "type": "string"
          },
          "currency": {
            "description": "Reporting currency of the property. Defaults to USD when no currency is configured.",
            "type": "string"
          },
          "reporting": {
            "description": "Report settings of the property.",
            "type": "object",
            "properties": {
              "conversionEvents": {
                "description": "Configured default conversion events. When the campaign request omits `conversionEvents`, it uses this list, or `Purchase` if the list is empty.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "clickThroughWindowDays": {
                "description": "Configured click-through attribution window in days. `null` means the Maximum available window or no configured window.",
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "conversionEvents",
              "clickThroughWindowDays"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "websiteOrigin",
          "timezone",
          "currency",
          "reporting"
        ],
        "additionalProperties": false
      },
      "CampaignReportRow": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the campaign, ad set, or ad. Send it in `filters.campaignIds`, `filters.adsetIds`, or `filters.adIds` to filter a report.",
            "type": "string"
          },
          "type": {
            "description": "Level of the row. It is the same as the `groupBy` value of the request.",
            "type": "string",
            "enum": [
              "campaign",
              "adset",
              "ad"
            ]
          },
          "name": {
            "description": "Name of the campaign, ad set, or ad.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "channel": {
            "description": "Channel of the traffic. Send these values in `filters.channel`.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "adNetwork": {
            "description": "Ad network of the row. Send these values in `filters.adNetwork`.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "description": "Delivery status on the ad platform. `null` when the ad platform does not give a status.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "terminated"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "metrics": {
            "description": "Values of the requested metrics, keyed by metric name (including literal keys such as `events.Purchase`). A value is `null` when its inputs are unavailable or its divisor is not positive. See the operation Metrics section for formulas.",
            "$ref": "#/components/schemas/CampaignReportMetrics"
          }
        },
        "required": [
          "id",
          "type",
          "name",
          "channel",
          "adNetwork",
          "status",
          "metrics"
        ],
        "additionalProperties": false
      },
      "CampaignReportMetrics": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "EventsReportRow": {
        "type": "object",
        "properties": {
          "date": {
            "description": "Day of the events, in the property time zone.",
            "type": "string"
          },
          "eventName": {
            "description": "AnyTrack event name, for example `Purchase` or `Lead`.",
            "type": "string"
          },
          "count": {
            "description": "Number of events with this name on this day.",
            "type": "number"
          }
        },
        "required": [
          "date",
          "eventName",
          "count"
        ],
        "additionalProperties": false
      },
      "Conversion": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the conversion. Send it as `conversionId` to Get a conversion event. Do not parse the ID: its format can change.",
            "type": "string"
          },
          "time": {
            "description": "Time of the event, in ISO 8601 format and in UTC.",
            "type": "string"
          },
          "eventName": {
            "description": "AnyTrack event name, for example `Purchase` or `Lead`.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "value": {
            "description": "Reported event value in `currency`, or `null` when unavailable. Usually converted to the property currency during ingestion; the original currency can be retained if conversion fails.",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "description": "Currency of `value`.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "originalValue": {
            "description": "Original event value in `originalCurrency`, retained when currency conversion occurred. `null` when no separate original value was stored.",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "originalCurrency": {
            "description": "Currency of the separately stored original event value. `null` when no separate original currency was stored.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "transactionId": {
            "description": "Transaction ID that the conversion source sent, for example an order ID.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clientId": {
            "description": "AnyTrack client ID of the visitor browser, scoped to this property. Send it as `clickId` in the conversions report to find this browser's events within the requested date range.",
            "type": "string"
          },
          "clickId": {
            "description": "AnyTrack click ID recorded on the event. `null` when the event has no click ID. Modern click IDs identify the browser when used as a conversions-report filter.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "newSession": {
            "description": "`true` when the event started a new session.",
            "type": "boolean"
          },
          "integrationId": {
            "description": "ID of the integration that sent the event. Send it as `integrationId` to Get an integration. `null` when no integration sent the event.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand": {
            "description": "Brand name linked to the event.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pageUrl": {
            "description": "URL of the page where the event happened.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "link": {
            "description": "Link linked to the event. `null` when the event has no link.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "ID of the link.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "label": {
                    "description": "Label of the link.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "description": "URL of the link.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "label",
                  "url"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "description": "Customer details of the event. They contain personal data: keep them secure. `null` when the event has no customer details.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "Email address of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "description": "Phone number of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "firstName": {
                    "description": "First name of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lastName": {
                    "description": "Last name of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "description": "City of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "description": "State or region of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "zipcode": {
                    "description": "Postal code of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "country": {
                    "description": "Country of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "countryCode": {
                    "description": "Country code of the customer.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "email",
                  "phone",
                  "firstName",
                  "lastName",
                  "city",
                  "state",
                  "zipcode",
                  "country",
                  "countryCode"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "attribution": {
            "description": "Reported main attribution touchpoint: channel, traffic source, campaign, ad set, and ad. `null` when no attribution details are available.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "channel": {
                    "description": "Channel of the touchpoint.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "adNetwork": {
                    "description": "Ad network of the touchpoint.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "description": "Traffic source of the touchpoint, as in `utm_source`.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "medium": {
                    "description": "Traffic medium of the touchpoint, as in `utm_medium`.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "referrer": {
                    "description": "Referrer of the visit.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pageVariant": {
                    "description": "Page variant of the visit.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "content": {
                    "description": "Ad content of the touchpoint, as in `utm_content`.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "term": {
                    "description": "Keyword of the touchpoint, as in `utm_term`.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clickIdParam": {
                    "description": "Name of the ad click ID parameter in the landing page URL, for example `gclid` or `fbclid`.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clickIdValue": {
                    "description": "Value of the ad click ID parameter.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "campaign": {
                    "description": "Campaign of the touchpoint.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "ID of the campaign on the ad platform.",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "description": "Name of the campaign.",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "adset": {
                    "description": "Ad set of the touchpoint.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "ID of the ad set on the ad platform.",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "description": "Name of the ad set.",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ad": {
                    "description": "Ad of the touchpoint.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "ID of the ad on the ad platform.",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "description": "Name of the ad.",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "channel",
                  "adNetwork",
                  "source",
                  "medium",
                  "referrer",
                  "pageVariant",
                  "content",
                  "term",
                  "clickIdParam",
                  "clickIdValue",
                  "campaign",
                  "adset",
                  "ad"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "time",
          "eventName",
          "value",
          "currency",
          "originalValue",
          "originalCurrency",
          "transactionId",
          "clientId",
          "clickId",
          "newSession",
          "integrationId",
          "brand",
          "pageUrl",
          "link",
          "customer",
          "attribution"
        ],
        "additionalProperties": false
      },
      "Integration": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the integration. Send it as `integrationId` to Get an integration and to its logs.",
            "type": "string"
          },
          "name": {
            "description": "Name of the integration in AnyTrack.",
            "type": "string"
          },
          "status": {
            "description": "Status of the integration in AnyTrack. Deleted integrations do not appear in the API.",
            "type": "string",
            "enum": [
              "added",
              "active",
              "disabled"
            ]
          },
          "provider": {
            "description": "Platform of the integration, for example a store, a form tool, or an affiliate network.",
            "type": "object",
            "properties": {
              "id": {
                "description": "ID of the platform in the AnyTrack integration catalog.",
                "type": "string"
              },
              "name": {
                "description": "Name of the platform.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "propertyId": {
            "description": "ID of the property that the integration belongs to. `null` when the integration belongs to no property.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "panelUrl": {
            "description": "Panel URL saved in the integration settings. `null` when the integration has no panel URL.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "live": {
            "description": "`true` when the integration received events recently.",
            "type": "boolean"
          },
          "eventMapping": {
            "description": "Event mapping of the integration. Each key is an event of the platform. Each value is the AnyTrack event name, or `null` when the platform event has no AnyTrack event.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "customFields": {
            "description": "Configured integration settings whose field definitions are not marked secret. Empty or undefined settings are omitted. Treat returned values as potentially sensitive.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "provider",
          "propertyId",
          "panelUrl",
          "live",
          "eventMapping",
          "customFields"
        ],
        "additionalProperties": false
      },
      "IntegrationLog": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the log entry.",
            "type": "string"
          },
          "receivedAt": {
            "description": "Time when AnyTrack received the request, in ISO 8601 format and in UTC.",
            "type": "string"
          },
          "status": {
            "description": "Result of the request. `parsed`: AnyTrack read the request and made an event. `ignored`: AnyTrack did not use the request. `duplicated`: AnyTrack received the same request before. `error`: AnyTrack could not process the request. Read `message` for the reason. `unknown`: the stored status is not recognized.",
            "type": "string",
            "enum": [
              "parsed",
              "ignored",
              "duplicated",
              "error",
              "unknown"
            ]
          },
          "message": {
            "description": "Reason for the status. `null` when AnyTrack gives no reason.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "propertyId": {
            "description": "ID of the property of the request. `null` when AnyTrack did not link the request to a property.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "event": {
            "description": "Event that AnyTrack made from the request. `null` when the request made no event.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "eventName": {
                    "description": "AnyTrack event name.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "value": {
                    "description": "Value of the event as the platform sent it.",
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientId": {
                    "description": "AnyTrack client ID of the event.",
                    "type": "string"
                  },
                  "clickId": {
                    "description": "AnyTrack click ID of the event. `null` when the request had no click ID.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "eventName",
                  "value",
                  "clientId",
                  "clickId"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "params": {
            "description": "Received parser parameters and query parameters, merged with body fields and selected Shopify headers. Conflicting body keys have a `Body` suffix. Values may contain personal or sensitive data; they are not redacted by this API.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "receivedAt",
          "status",
          "message",
          "propertyId",
          "event",
          "params"
        ],
        "additionalProperties": false
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the connection. Send it as `connectionId` to Get an ad platform connection.",
            "type": "string"
          },
          "platform": {
            "description": "Ad platform of the connection.",
            "type": "string"
          },
          "account": {
            "description": "Ad platform account that the connection gives access to.",
            "type": "object",
            "properties": {
              "id": {
                "description": "ID of the account on the ad platform.",
                "type": "string"
              },
              "name": {
                "description": "Name of the account on the ad platform.",
                "type": "string"
              },
              "kind": {
                "description": "Type of the account resource, as the ad platform names it.",
                "type": "string"
              },
              "currency": {
                "description": "Currency of the account on the ad platform.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timezone": {
                "description": "Time zone of the account on the ad platform.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "description": "Status of the account, as the ad platform gives it.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "parent": {
                "description": "Parent of the account on the ad platform. `null` when the account has no parent.",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "ID of the parent on the ad platform.",
                        "type": "string"
                      },
                      "name": {
                        "description": "Name of the parent.",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "kind",
              "currency",
              "timezone",
              "status",
              "parent"
            ],
            "additionalProperties": false
          },
          "setup": {
            "description": "Setup state of the connection.",
            "type": "object",
            "properties": {
              "status": {
                "description": "`provisioning`: AnyTrack is setting up the connection. `ready`: the setup is complete. `error`: the setup failed. Read `errorCode`.",
                "type": "string",
                "enum": [
                  "provisioning",
                  "ready",
                  "error"
                ]
              },
              "errorCode": {
                "description": "Error code of the setup. `null` when the setup has no error.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "status",
              "errorCode"
            ],
            "additionalProperties": false
          },
          "authorizedAt": {
            "description": "Time when a user authorized the connection, in ISO 8601 format and in UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "authorizedBy": {
            "description": "Name of the user who authorized the connection.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSyncedAt": {
            "description": "Time of the last sync of spend and campaign data from the ad platform, in ISO 8601 format and in UTC. `null` before the first sync.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "destinationIds": {
            "description": "IDs of the destinations that use this connection. Send one as `destinationId` to Get a pixel or ad destination.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "description": "Creation time of the connection, in ISO 8601 format and in UTC.",
            "type": "string"
          },
          "updatedAt": {
            "description": "Time of the last change to the connection, in ISO 8601 format and in UTC.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "platform",
          "account",
          "setup",
          "authorizedAt",
          "authorizedBy",
          "lastSyncedAt",
          "destinationIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Destination": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the destination. Send it as `destinationId` to Get a pixel or ad destination.",
            "type": "string"
          },
          "type": {
            "description": "Type of the pixel or ad platform.",
            "type": "string"
          },
          "name": {
            "description": "Name of the destination. `null` when the destination has no name.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "account": {
            "description": "Account of the destination on the ad platform. `null` when AnyTrack has no account for the destination.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "ID of the account on the ad platform.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name of the account.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "description": "`false` when a user turned off the destination.",
            "type": "boolean"
          },
          "authorized": {
            "description": "`true` when a user authorized AnyTrack on the ad platform for this destination.",
            "type": "boolean"
          },
          "healthy": {
            "description": "`false` when AnyTrack marks the destination as unhealthy.",
            "type": "boolean"
          },
          "serverEvents": {
            "description": "Whether server-side event sending is configured for this destination; this flag alone does not guarantee delivery.",
            "type": "boolean"
          },
          "serverOnly": {
            "description": "Server-only flag stored on the destination; used for Meta Pixel to suppress browser pixel events. This flag alone does not enable server events; see `serverEvents`.",
            "type": "boolean"
          },
          "eventMapping": {
            "description": "Event mapping of the destination. Each key is an AnyTrack event name. Each value is the event name that the destination receives.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "authorizedAt": {
            "description": "Time when a user authorized the destination, in ISO 8601 format and in UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "description": "Creation time of the destination, in ISO 8601 format and in UTC.",
            "type": "string"
          },
          "updatedAt": {
            "description": "Time of the last change to the destination, in ISO 8601 format and in UTC.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "name",
          "account",
          "enabled",
          "authorized",
          "healthy",
          "serverEvents",
          "serverOnly",
          "eventMapping",
          "authorizedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the webhook. Send it as `webhookId` to Get a webhook.",
            "type": "string"
          },
          "name": {
            "description": "Name of the webhook.",
            "type": "string"
          },
          "urlOrigin": {
            "description": "Scheme and host of the webhook URL, for example `https://example.com`. The API does not return the path or the query string, because they can contain secrets. `null` when the saved URL has no valid HTTP(S) origin.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "eventNames": {
            "description": "AnyTrack events that the webhook sends.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "description": "Payload version of the webhook.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "enabled": {
            "description": "`false` when a user turned off the webhook.",
            "type": "boolean"
          },
          "healthy": {
            "description": "`false` when AnyTrack marks the webhook as unhealthy.",
            "type": "boolean"
          },
          "crossDomainPropertyId": {
            "description": "ID of the cross-domain property that filters the events of this webhook. `null` when the webhook has no cross-domain filter.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "urlOrigin",
          "eventNames",
          "version",
          "enabled",
          "healthy",
          "crossDomainPropertyId"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "description": "The error.",
            "type": "object",
            "properties": {
              "code": {
                "description": "Error code. Your code can test this value. See the table of error codes.",
                "type": "string",
                "enum": [
                  "invalid_request",
                  "invalid_cursor",
                  "unauthenticated",
                  "insufficient_scope",
                  "api_access_unavailable",
                  "not_found",
                  "payload_too_large",
                  "rate_limited",
                  "response_too_large",
                  "upstream_timeout",
                  "service_unavailable",
                  "internal_error"
                ]
              },
              "message": {
                "description": "Description of the error for people.",
                "type": "string"
              },
              "requestId": {
                "description": "ID of the request. Give it to AnyTrack support when you report a problem.",
                "type": "string"
              },
              "retryable": {
                "description": "`true` when a retry of the same request can succeed. Retry only when this value is `true`.",
                "type": "boolean"
              },
              "details": {
                "description": "Problems in the request, one item for each field. Validation errors use it.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "description": "Request field that has the problem.",
                      "type": "string"
                    },
                    "message": {
                      "description": "Description of the problem.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "code",
              "message",
              "requestId",
              "retryable"
            ],
            "additionalProperties": false
          },
          "message": {
            "description": "Added to some errors by the API framework. Use `error.message` instead.",
            "type": "string"
          },
          "code": {
            "description": "Added to some errors by the API framework. Use `error.code` instead.",
            "type": "string"
          },
          "issues": {
            "description": "Added to some validation errors by the API framework. Use `error.details` instead.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "description": "Description of the problem.",
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": {}
            }
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key created in the dashboard (`atk_...`)"
      }
    }
  }
}
