{
  "openapi": "3.0.3",
  "info": {
    "title": "RapidoReach advertiser offers API",
    "version": "1.0.0",
    "description": "## Authentication\n\nThis is the server API for **direct advertiser Offers V2 campaigns**, separate from dashboard sessions and conversion callbacks. Use the advertiser API key and secret from **Advertiser Settings → Security** (the same credential pair used for survey campaigns). The legacy performance-marketing profile `apiKey` and publisher application keys are not accepted. The owning user must be ACTIVE with ADVERTISER access and an ACTIVE offer advertiser profile with the same email. `GET /api/v2/advertiser/offers/account` discovers that profile ID. API credentials never grant administrator rights.\n\nEvery request needs `X-Api-Key`, `X-RR-Timestamp`, `X-RR-Nonce`, and `X-RR-Signature`. Timestamp is current Unix seconds, accepted within 300 seconds of server time. Nonce is a fresh 16–128 character string containing letters, digits, underscore or dash; use `crypto.randomUUID()`. Nonces are consumed atomically in MongoDB across service replicas, even when the operation subsequently fails.\n\nCompute SHA256 of `JSON.stringify(body)` with UTF-8 bytes; use an empty string for no body or `{}`. Preserve JSON property order, and send the same serialized object. Join **uppercase HTTP method**, **exact URL path plus query string** (including `/api/v2/advertiser/offers`, query order and percent encoding), **timestamp**, **nonce**, **hex body digest** with newline bytes and no trailing newline. HMAC-SHA256 this string using the advertiser secret as the UTF-8 key. Send lowercase hex in `X-RR-Signature`. The scheme and host are not part of this signature. Protect credentials on your server and use HTTPS.\n\n```js\nimport { createHash, createHmac, randomUUID } from 'node:crypto';\nconst path = '/api/v2/advertiser/offers/campaigns';\nconst method = 'GET';\nconst timestamp = String(Math.floor(Date.now() / 1000));\nconst nonce = randomUUID();\nconst body = undefined;\nconst json = body && Object.keys(body).length ? JSON.stringify(body) : '';\nconst bodyHash = createHash('sha256').update(json).digest('hex');\nconst signature = createHmac('sha256', process.env.RAPIDOREACH_ADVERTISER_SECRET)\n  .update([method, path, timestamp, nonce, bodyHash].join('\\n')).digest('hex');\nconst result = await fetch('https://www.rapidoreach.com' + path, {\n  method, headers: { 'X-Api-Key': process.env.RAPIDOREACH_ADVERTISER_KEY,\n    'X-RR-Timestamp': timestamp, 'X-RR-Nonce': nonce, 'X-RR-Signature': signature },\n});\nif (!result.ok) throw new Error(`API returned ${result.status}`);\nconsole.log(await result.json());\n```\n\n## Campaign lifecycle\n\n1. Discover your advertiser ID, available providers, and billing balance.\n2. Validate the public advertised web URL or app store listing.\n3. Create a full campaign draft with goals, copy, targeting, budget and valid creative IDs.\n4. Create tracking credentials; store a returned secret immediately (it is returned once).\n5. Fetch readiness, resolve every error, and request MMP verification when applicable.\n6. Submit `IN_REVIEW`; an administrator approves and launches it. API creation never bypasses review or reserves money. A previously approved paused campaign may be resumed by its owner.\n7. Capture real clicks through a released publisher placement and send verified conversion callbacks to the separate callback endpoint. Inspect campaign reports and reconciliation; HTTP acceptance alone is not a credited conversion.\n\nCreative uploads currently require the enabled **development** dashboard upload service; this API exposes validated creative reads, not multipart upload or production creative approval. Fund accounts and edit payment details in the dashboard; finance routes here are read-only. Readiness may therefore block an API-created draft until those prerequisites are met. Provider availability is runtime configured, not promised by an enum. Use a development account and confirmed development API host for tests.\n\n## Errors, retries and limits\n\nErrors use `code`, `message`, `fieldErrors`, `traceId`, `retryable`. `api_nonce_replayed` is 409; bad signatures/timestamps are 401; inactive or unauthorized accounts are 403. Authentication storage failure returns 503 and denies access. Configured advertiser IP allowlists also apply (exact IPs or IPv4 CIDR); an empty list allows any sender. Requests are limited to 120/minute per key and 300/minute per sender IP per backend process; 429 includes `Retry-After`. Always generate a new nonce on retry. Campaign create, clone and revision writes are **not idempotent**: after a timeout, read current state/audit before repeating. Send `expectedVersion` when creating a revision. Money inputs are base currency amounts; internal `Micros` fields are millionths. Unknown/admin/payment routes return 404. Existing dashboard and public callback URLs remain separate.\n"
  },
  "servers": [
    {
      "url": "https://www.rapidoreach.com",
      "description": "Production — use HTTPS; creation does not fund or launch a campaign."
    }
  ],
  "security": [
    {
      "advertiserKey": [],
      "apiTimestamp": [],
      "apiNonce": [],
      "apiSignature": []
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Assets"
    },
    {
      "name": "Campaigns"
    },
    {
      "name": "Tracking"
    },
    {
      "name": "Reporting"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Conversion callbacks"
    }
  ],
  "paths": {
    "/api/v2/advertiser/offers/account": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_account",
        "tags": [
          "Account"
        ],
        "summary": "Discover advertiser profiles",
        "description": "Returns only ACTIVE profiles owned by the API user.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "advertiserId": {
                            "type": "string",
                            "description": ""
                          },
                          "name": {
                            "type": "string",
                            "description": ""
                          }
                        }
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "advertiserId": "ADVERTISER_ID",
                      "name": "Example advertiser"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/providers/capabilities": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_providers_capabilities",
        "tags": [
          "Account"
        ],
        "summary": "List enabled providers",
        "description": "Runtime selectable and certified providers. A missing provider cannot be used.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contractVersion": {
                      "type": "string",
                      "description": ""
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": ""
                          },
                          "capabilities": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": ""
                            },
                            "description": ""
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "contractVersion": "2.0.0",
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/validate-asset": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns_validate_asset",
        "tags": [
          "Assets"
        ],
        "summary": "Validate an advertised property",
        "description": "Validates HTTPS URL, public DNS, platform and identity; rejects private/rebinding destinations. Android requires Google Play; iOS requires App Store. Use returned assetId as advertisedAssetId before staleAfter.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean",
                      "description": ""
                    },
                    "assetId": {
                      "type": "string",
                      "description": ""
                    },
                    "assetUrl": {
                      "type": "string",
                      "description": ""
                    },
                    "assetIdentifier": {
                      "type": "string",
                      "description": ""
                    },
                    "platform": {
                      "type": "string",
                      "description": ""
                    },
                    "validation": {
                      "type": "string",
                      "description": ""
                    },
                    "staleAfter": {
                      "type": "string",
                      "description": "",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "valid": true,
                  "assetId": "ASSET_ID",
                  "assetUrl": "https://advertiser.example",
                  "assetIdentifier": "advertiser.example",
                  "platform": "web",
                  "validation": "URL_AND_IDENTIFIER_VALIDATED",
                  "staleAfter": "2026-10-04T00:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "advertiserId": {
                    "type": "string",
                    "description": "Owned active profile ID from /account."
                  },
                  "assetUrl": {
                    "type": "string",
                    "description": "Public HTTPS website or store listing.",
                    "nullable": true
                  },
                  "assetIdentifier": {
                    "type": "string",
                    "description": "Web hostname, Android package or iOS store ID.",
                    "nullable": true
                  },
                  "platforms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "",
                      "enum": [
                        "web",
                        "android",
                        "ios"
                      ]
                    },
                    "description": "Exactly one advertised platform; defaults to web.",
                    "minItems": 1,
                    "maxItems": 1
                  }
                },
                "required": [
                  "advertiserId",
                  "assetUrl"
                ]
              },
              "example": {
                "advertiserId": "ADVERTISER_ID",
                "assetUrl": "https://advertiser.example",
                "platforms": [
                  "web"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns",
        "tags": [
          "Campaigns"
        ],
        "summary": "List owned campaigns",
        "description": "Returns items and count. No cursor pagination is implemented. Administrator queue filters do not grant additional access.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Campaign"
                      },
                      "description": ""
                    },
                    "count": {
                      "type": "integer",
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "campaignId": "cmp_example",
                      "name": "Verified signup offer",
                      "status": "DRAFT",
                      "budget": 100,
                      "spent": 0,
                      "optimisticVersion": 1,
                      "activeRevision": {
                        "_id": "REVISION_ID",
                        "version": 1,
                        "title": "Verify your signup",
                        "trackingPartner": "CUSTOM_S2S",
                        "goals": [
                          {
                            "goalId": "goal-1",
                            "externalGoalId": "signup_verified",
                            "name": "Verified signup",
                            "grossRevenue": 2,
                            "publisherPayout": 1.5
                          }
                        ]
                      },
                      "revisions": []
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Optional exact status filter.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "providerCode",
            "in": "query",
            "required": false,
            "description": "Optional provider filter.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      },
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns",
        "tags": [
          "Campaigns"
        ],
        "summary": "Create a draft campaign",
        "description": "Full write schema. IDs in the example must be replaced with owned validated asset and creative IDs. The response is a DRAFT; no delivery or accounting is triggered. For mobile use one android/ios platform, a validated store asset and a selectable tracking provider.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignInput"
              },
              "example": {
                "advertiserId": "ADVERTISER_ID",
                "name": "Verified signup offer",
                "objective": "SIGNUP",
                "platforms": [
                  "web"
                ],
                "advertisedAssetId": "ASSET_ID",
                "description": "Create and verify a new account.",
                "requirements": "New users only; verify your email.",
                "disclaimer": "Rewards follow server verification.",
                "userInstructions": "Register and verify your email.",
                "landingUrlTemplate": "https://advertiser.example/join?rr_click_id={click_id}",
                "trackingPartner": "CUSTOM_S2S",
                "creativeAssetIds": [
                  "crv_example123"
                ],
                "countries": [
                  "US"
                ],
                "budget": 100,
                "goals": [
                  {
                    "externalGoalId": "signup_verified",
                    "name": "Verified signup",
                    "grossRevenue": 2,
                    "publisherPayout": 1.5
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns__campaignId_",
        "tags": [
          "Campaigns"
        ],
        "summary": "Get a campaign",
        "description": "Returns active revision, revision history, status, public money fields and redacted tracking configuration. Secrets are not returned here.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/readiness": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns__campaignId__readiness",
        "tags": [
          "Campaigns"
        ],
        "summary": "Check readiness",
        "description": "Resolve all errors before submitting for review. Typical blockers: validated_asset_required, validated_creative_required, positive_budget_required, goal_required, country_target_required, certified_tracking_provider_required, custom_s2s_credential_required.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "ready": false,
                  "errors": [
                    "validated_creative_required"
                  ],
                  "optimisticVersion": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/audit": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns__campaignId__audit",
        "tags": [
          "Campaigns"
        ],
        "summary": "Read campaign audit",
        "description": "Owned status/revision activity, newest first; no pagination contract.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "description": ""
                          },
                          "fromStatus": {
                            "type": "string",
                            "description": "",
                            "nullable": true
                          },
                          "toStatus": {
                            "type": "string",
                            "description": "",
                            "nullable": true
                          },
                          "revisionVersion": {
                            "type": "integer",
                            "description": "",
                            "nullable": true
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": true
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/clone": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__clone",
        "tags": [
          "Campaigns"
        ],
        "summary": "Clone a campaign",
        "description": "Creates a new draft. Review targeting, funds, tracking and creatives before launch; repeated calls create separate drafts.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  }
                }
              },
              "example": {
                "name": "New signup offer"
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/revisions": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__revisions",
        "tags": [
          "Campaigns"
        ],
        "summary": "Create an immutable revision",
        "description": "Send the full CampaignInput, not a partial PATCH. Send latest optimisticVersion as expectedVersion to detect stale edits. Resets status to DRAFT and invalidates revision-bound MMP approval. Previous clicks retain prior terms. Terminal campaigns cannot be edited.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignInput"
              },
              "example": {
                "advertiserId": "ADVERTISER_ID",
                "name": "Verified signup offer",
                "objective": "SIGNUP",
                "platforms": [
                  "web"
                ],
                "advertisedAssetId": "ASSET_ID",
                "description": "Create and verify a new account.",
                "requirements": "New users only; verify your email.",
                "disclaimer": "Rewards follow server verification.",
                "userInstructions": "Register and verify your email.",
                "landingUrlTemplate": "https://advertiser.example/join?rr_click_id={click_id}",
                "trackingPartner": "CUSTOM_S2S",
                "creativeAssetIds": [
                  "crv_example123"
                ],
                "countries": [
                  "US"
                ],
                "budget": 100,
                "goals": [
                  {
                    "externalGoalId": "signup_verified",
                    "name": "Verified signup",
                    "grossRevenue": 2,
                    "publisherPayout": 1.5
                  }
                ],
                "expectedVersion": 1
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/transition": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__transition",
        "tags": [
          "Campaigns"
        ],
        "summary": "Change campaign status",
        "description": "Advertisers can submit ready DRAFT → IN_REVIEW, pause LIVE → PAUSED, and resume a previously approved PAUSED → LIVE campaign if eligible and funded. Approval, initial launch, ending and archiving require an administrator. Resume reserves budget and can fail with insufficient_advertiser_balance.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "",
                    "enum": [
                      "IN_REVIEW",
                      "PAUSED",
                      "LIVE"
                    ]
                  },
                  "reviewNotes": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "status"
                ]
              },
              "example": {
                "status": "IN_REVIEW"
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns__campaignId__tracking",
        "tags": [
          "Tracking"
        ],
        "summary": "Read tracking setup",
        "description": "Returns provider-specific callback URL and signing instructions. Use the returned setup; management key/secret and campaign callback credentials are different.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tracking"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "trackingMode": "S2S",
                  "providerCode": "CUSTOM_S2S",
                  "managed": false,
                  "method": "GET_OR_POST",
                  "callbackEndpoint": "/performance-marketing/v2/postbacks/custom-s2s/cmp_example",
                  "authentication": "HMAC_SHA256",
                  "credential": {
                    "keyId": "KEY_ID",
                    "nextKeyId": null,
                    "nextValidAfter": null,
                    "currentExpiresAt": null,
                    "callbackIpAllowlist": [],
                    "hasCurrentSecret": true,
                    "hasNextSecret": false
                  },
                  "requiredParameters": [
                    "click_id",
                    "transaction_id",
                    "goal_id",
                    "status"
                  ],
                  "secretReturned": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/custom-s2s/credentials": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_custom_s2s_credentials",
        "tags": [
          "Tracking"
        ],
        "summary": "Create or read custom-s2s credentials",
        "description": "Requires matching selected tracking provider. New secret/token is returned once with 201; existing metadata returns 200 with null secret/token. Save the first response securely. Never expose callback credentials in the app.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomS2SCredential"
                },
                "example": {
                  "configuration": {
                    "keyId": "KEY_ID",
                    "nextKeyId": null,
                    "nextValidAfter": null,
                    "currentExpiresAt": null,
                    "callbackIpAllowlist": [],
                    "hasCurrentSecret": true,
                    "hasNextSecret": false
                  },
                  "secret": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "201": {
            "description": "New credential; includes secret/token once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomS2SCredential"
                },
                "example": {
                  "configuration": {
                    "keyId": "KEY_ID",
                    "nextKeyId": null,
                    "nextValidAfter": null,
                    "currentExpiresAt": null,
                    "callbackIpAllowlist": [],
                    "hasCurrentSecret": true,
                    "hasNextSecret": false
                  },
                  "secret": "ONE_TIME_CALLBACK_SECRET"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/custom-s2s/rotate": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_custom_s2s_rotate",
        "tags": [
          "Tracking"
        ],
        "summary": "Rotate custom-s2s credentials",
        "description": "Custom S2S: activateAfter must be five minutes to seven days ahead; old key overlaps for 24 hours. Read configuration.nextKeyId and save the returned secret. MMP: only DRAFT/IN_REVIEW; invalidates live-test approval and requires a new provider test.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomS2SCredential"
                },
                "example": {
                  "configuration": {
                    "keyId": "KEY_ID",
                    "nextKeyId": "NEW_KEY_ID",
                    "nextValidAfter": "2026-10-03T12:00:00.000Z",
                    "currentExpiresAt": "2026-10-04T12:00:00.000Z",
                    "callbackIpAllowlist": [],
                    "hasCurrentSecret": true,
                    "hasNextSecret": true
                  },
                  "secret": "ONE_TIME_CALLBACK_SECRET"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "activateAfter": {
                    "type": "string",
                    "description": "",
                    "format": "date-time"
                  }
                },
                "required": [
                  "activateAfter"
                ]
              },
              "example": {
                "activateAfter": "2026-10-03T12:00:00.000Z"
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/mmp/credentials": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_mmp_credentials",
        "tags": [
          "Tracking"
        ],
        "summary": "Create or read mmp credentials",
        "description": "Requires matching selected tracking provider. New secret/token is returned once with 201; existing metadata returns 200 with null secret/token. Save the first response securely. Never expose callback credentials in the app.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MmpCredential"
                },
                "example": {
                  "configured": true,
                  "token": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "201": {
            "description": "New credential; includes secret/token once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MmpCredential"
                },
                "example": {
                  "configured": true,
                  "token": "ONE_TIME_CALLBACK_SECRET"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/mmp/rotate": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_mmp_rotate",
        "tags": [
          "Tracking"
        ],
        "summary": "Rotate mmp credentials",
        "description": "Custom S2S: activateAfter must be five minutes to seven days ahead; old key overlaps for 24 hours. Read configuration.nextKeyId and save the returned secret. MMP: only DRAFT/IN_REVIEW; invalidates live-test approval and requires a new provider test.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MmpCredential"
                },
                "example": {
                  "configured": true,
                  "token": "ONE_TIME_CALLBACK_SECRET"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/custom-s2s/test": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_custom_s2s_test",
        "tags": [
          "Tracking"
        ],
        "summary": "Check stored Custom S2S credential",
        "description": "In-memory signing test only. No external delivery, launch, conversion or ledger write. Perform a real development click and callback to verify attribution.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "verified": {
                      "type": "boolean",
                      "description": ""
                    },
                    "keyId": {
                      "type": "string",
                      "description": ""
                    },
                    "sandbox": {
                      "type": "boolean",
                      "description": ""
                    },
                    "deliveredExternally": {
                      "type": "boolean",
                      "description": ""
                    },
                    "accountingWrites": {
                      "type": "integer",
                      "description": ""
                    }
                  }
                },
                "example": {
                  "verified": true,
                  "keyId": "KEY_ID",
                  "sandbox": true,
                  "deliveredExternally": false,
                  "accountingWrites": 0
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/mmp/requests": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_mmp_requests",
        "tags": [
          "Tracking"
        ],
        "summary": "Request MMP live-test verification",
        "description": "Provide the current optimisticVersion, active revision _id and a 10–1000 character note describing the test. Operator decision remains private. A new revision/key invalidates this request.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "description": ""
                  },
                  "expectedRevisionId": {
                    "type": "string",
                    "description": ""
                  },
                  "note": {
                    "type": "string",
                    "description": "",
                    "minLength": 10,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "expectedVersion",
                  "expectedRevisionId",
                  "note"
                ]
              },
              "example": {
                "expectedVersion": 1,
                "expectedRevisionId": "REVISION_ID",
                "note": "A real install and callback have been tested."
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/mmp/requests/{requestId}/read": {
      "post": {
        "operationId": "post_api_v2_advertiser_offers_campaigns__campaignId__tracking_mmp_requests__requestId__read",
        "tags": [
          "Tracking"
        ],
        "summary": "Acknowledge MMP decision",
        "description": "Marks an APPROVED/REJECTED decision as read; does not change verification or approval.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "name": "Verified signup offer",
                  "status": "DRAFT",
                  "budget": 100,
                  "spent": 0,
                  "optimisticVersion": 1,
                  "activeRevision": {
                    "_id": "REVISION_ID",
                    "version": 1,
                    "title": "Verify your signup",
                    "trackingPartner": "CUSTOM_S2S",
                    "goals": [
                      {
                        "goalId": "goal-1",
                        "externalGoalId": "signup_verified",
                        "name": "Verified signup",
                        "grossRevenue": 2,
                        "publisherPayout": 1.5
                      }
                    ]
                  },
                  "revisions": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/report": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns__campaignId__report",
        "tags": [
          "Reporting"
        ],
        "summary": "Get delivery and reconciliation report",
        "description": "Requires offer delivery enabled. Accepted callbacks may still be processing. Compare credited states and ledger; differenceMicros=0 and exact=true indicate this report reconciles.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                },
                "example": {
                  "campaignId": "cmp_example",
                  "conversions": {
                    "CREDITED": 3
                  },
                  "ledger": [],
                  "metrics": {
                    "ELIGIBLE_REQUEST": 50
                  },
                  "funnel": {
                    "eligibleRequests": 50,
                    "impressions": 20,
                    "launches": 8,
                    "approvals": 3,
                    "reversals": 0
                  },
                  "freshnessWatermark": "2026-10-03T08:00:00.000Z",
                  "reconciliation": {
                    "campaignSpentMicros": 6000000,
                    "ledgerGrossRevenueMicros": 6000000,
                    "differenceMicros": 0,
                    "exact": true
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": ""
                },
                "example": "\"campaignId\",\"eligibleRequests\"\n\"cmp_example\",\"50\"\n"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string",
              "description": "",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/campaigns/{campaignId}/tracking/web-pixels": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_campaigns__campaignId__tracking_web_pixels",
        "tags": [
          "Reporting"
        ],
        "summary": "List web pixel observations",
        "description": "Requires offer delivery enabled and an eligible web campaign. Telemetry never proves a reward.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Defaults to 50; capped by the service.",
            "schema": {
              "type": "integer",
              "description": "",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/assets/upload-capability": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_assets_upload_capability",
        "tags": [
          "Assets"
        ],
        "summary": "Check creative upload availability",
        "description": "Uploads are development-only and are not offered by this signed JSON API. Read capability before using the dashboard upload service.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": ""
                    },
                    "productionApproved": {
                      "type": "boolean",
                      "description": ""
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "enabled": false,
                  "productionApproved": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/advertiser/offers/assets/{assetId}/creatives": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_assets__assetId__creatives",
        "tags": [
          "Assets"
        ],
        "summary": "List validated creative metadata",
        "description": "Requires advertiserId and ownership of asset/creative. Returned console content URLs require dashboard auth; signed API clients should use this API content route.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "creativeId": {
                            "type": "string",
                            "description": ""
                          },
                          "validationStatus": {
                            "type": "string",
                            "description": ""
                          },
                          "contentUrl": {
                            "type": "string",
                            "description": ""
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/assets/{assetId}/creatives/{creativeId}/content": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_assets__assetId__creatives__creativeId__content",
        "tags": [
          "Assets"
        ],
        "summary": "Download owned creative",
        "description": "Requires advertiserId and ownership of asset/creative. Returned console content URLs require dashboard auth; signed API clients should use this API content route.",
        "responses": {
          "200": {
            "description": "Private creative bytes; Content-Type reflects validated file.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "description": "",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "creativeId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/billing/profile": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_billing_profile",
        "tags": [
          "Billing"
        ],
        "summary": "Read billing profile",
        "description": "Read-only owned account data. Provide advertiserId. Fund or edit payment details in the dashboard. Funding/invoices return up to 100 recent items.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "legalName": {
                      "type": "string",
                      "description": ""
                    },
                    "country": {
                      "type": "string",
                      "description": ""
                    },
                    "billingEmails": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": ""
                      },
                      "description": ""
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "legalName": "Example advertiser",
                  "country": "US",
                  "billingEmails": [
                    "billing@example.com"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/billing/balance": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_billing_balance",
        "tags": [
          "Billing"
        ],
        "summary": "Read billing balance",
        "description": "Read-only owned account data. Provide advertiserId. Fund or edit payment details in the dashboard. Funding/invoices return up to 100 recent items.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                },
                "example": {
                  "available": 100,
                  "reserved": 0,
                  "spent": 0,
                  "currency": "USD"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/billing/funding": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_billing_funding",
        "tags": [
          "Billing"
        ],
        "summary": "Read billing funding",
        "description": "Read-only owned account data. Provide advertiserId. Fund or edit payment details in the dashboard. Funding/invoices return up to 100 recent items.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/billing/invoices": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_billing_invoices",
        "tags": [
          "Billing"
        ],
        "summary": "Read billing invoices",
        "description": "Read-only owned account data. Provide advertiserId. Fund or edit payment details in the dashboard. Funding/invoices return up to 100 recent items.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/api/v2/advertiser/offers/billing/allocations": {
      "get": {
        "operationId": "get_api_v2_advertiser_offers_billing_allocations",
        "tags": [
          "Billing"
        ],
        "summary": "Read billing allocations",
        "description": "Read-only owned account data. Provide advertiserId. Fund or edit payment details in the dashboard. Funding/invoices return up to 100 recent items.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "items": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "advertiserId",
            "in": "query",
            "required": true,
            "description": "Owned profile ID returned by /account.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ]
      }
    },
    "/performance-marketing/v2/postbacks/custom-s2s/{campaignId}": {
      "post": {
        "operationId": "post_performance_marketing_v2_postbacks_custom_s2s__campaignId_",
        "tags": [
          "Conversion callbacks"
        ],
        "summary": "Send a verified conversion",
        "description": "Uses campaign callback credentials, not advertiser API authentication. Obtain key ID/secret from tracking credentials. Join timestamp, click_id, transaction_id, goal_id, status, occurred_at with newline bytes. HMAC-SHA256 using the campaign secret; send hex digest and current Unix seconds in the callback headers. Timestamp tolerance is five minutes. A configured sender IP allowlist also applies.\n\nHTTP 200 means durably accepted into the inbox, not credited. An exact retry returns duplicate=true. Preserve transaction, goal and state on retry; conflicting reuse is rejected. Send reversed for a credited outcome that must be undone. Check campaign reporting for settlement. Delivery must be enabled. Prefer POST so fields do not enter URL logs.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "description": ""
                    },
                    "duplicate": {
                      "type": "boolean",
                      "description": ""
                    },
                    "receiptId": {
                      "type": "string",
                      "description": ""
                    }
                  },
                  "required": [
                    "accepted",
                    "duplicate",
                    "receiptId"
                  ]
                },
                "example": {
                  "accepted": true,
                  "duplicate": false,
                  "receiptId": "INBOX_ID"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversionEvent"
              },
              "example": {
                "click_id": "clk_example",
                "transaction_id": "order_12345",
                "goal_id": "signup_verified",
                "status": "approved",
                "occurred_at": "2026-10-03T08:00:00.000Z"
              }
            }
          }
        },
        "security": [
          {
            "callbackKey": [],
            "callbackTimestamp": [],
            "callbackSignature": []
          }
        ]
      },
      "get": {
        "operationId": "get_performance_marketing_v2_postbacks_custom_s2s__campaignId_",
        "tags": [
          "Conversion callbacks"
        ],
        "summary": "Send a conversion through legacy GET",
        "description": "Uses campaign callback credentials, not advertiser API authentication. Obtain key ID/secret from tracking credentials. Join timestamp, click_id, transaction_id, goal_id, status, occurred_at with newline bytes. HMAC-SHA256 using the campaign secret; send hex digest and current Unix seconds in the callback headers. Timestamp tolerance is five minutes. A configured sender IP allowlist also applies.\n\nHTTP 200 means durably accepted into the inbox, not credited. An exact retry returns duplicate=true. Preserve transaction, goal and state on retry; conflicting reuse is rejected. Send reversed for a credited outcome that must be undone. Check campaign reporting for settlement. Delivery must be enabled. Prefer POST so fields do not enter URL logs.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "description": ""
                    },
                    "duplicate": {
                      "type": "boolean",
                      "description": ""
                    },
                    "receiptId": {
                      "type": "string",
                      "description": ""
                    }
                  },
                  "required": [
                    "accepted",
                    "duplicate",
                    "receiptId"
                  ]
                },
                "example": {
                  "accepted": true,
                  "duplicate": false,
                  "receiptId": "INBOX_ID"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "click_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "Exact value captured from {click_id} at launch."
            }
          },
          {
            "name": "transaction_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "Stable conversion/order ID; unchanged on retry or reversal."
            }
          },
          {
            "name": "goal_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "Exact externalGoalId."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "",
              "enum": [
                "pending",
                "approved",
                "rejected",
                "reversed"
              ]
            }
          },
          {
            "name": "occurred_at",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "",
              "format": "date-time"
            }
          }
        ],
        "security": [
          {
            "callbackKey": [],
            "callbackTimestamp": [],
            "callbackSignature": []
          }
        ]
      }
    },
    "/performance-marketing/v2/postbacks/mmp/{campaignId}/{provider}": {
      "post": {
        "operationId": "post_performance_marketing_v2_postbacks_mmp__campaignId___provider_",
        "tags": [
          "Conversion callbacks"
        ],
        "summary": "Send a verified MMP conversion",
        "description": "Map your selected MMP placeholders to the five conversion fields. provider is adjust, appsflyer, airbridge, singular, branch or kochava and must match the campaign. Use its one-time callback token in X-RapidReach-MMP-Token; token in JSON/query is also supported when the provider cannot set headers, but keep it out of logs. Configured campaign sender IP allowlists apply. occurred_at accepts ISO datetime, Unix seconds or milliseconds. Callback must reference a real clicked session for the same campaign/provider and cannot predate it by more than five minutes. Delivery must be enabled and campaign LIVE, PAUSED or ENDED. A 200 confirms durable inbox acceptance, not reward settlement; inspect reporting. Preserve transaction_id on retries and reversals.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "description": ""
                    },
                    "duplicate": {
                      "type": "boolean",
                      "description": ""
                    },
                    "receiptId": {
                      "type": "string",
                      "description": ""
                    }
                  },
                  "required": [
                    "accepted",
                    "duplicate",
                    "receiptId"
                  ]
                },
                "example": {
                  "accepted": true,
                  "duplicate": false,
                  "receiptId": "INBOX_ID"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": "",
              "enum": [
                "adjust",
                "appsflyer",
                "airbridge",
                "singular",
                "branch",
                "kochava"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversionEvent"
              },
              "example": {
                "click_id": "clk_example",
                "transaction_id": "install_12345",
                "goal_id": "install",
                "status": "approved",
                "occurred_at": "2026-10-03T08:00:00.000Z"
              }
            }
          }
        },
        "security": [
          {
            "mmpToken": []
          }
        ]
      },
      "get": {
        "operationId": "get_performance_marketing_v2_postbacks_mmp__campaignId___provider_",
        "tags": [
          "Conversion callbacks"
        ],
        "summary": "Send an MMP conversion through GET",
        "description": "Map your selected MMP placeholders to the five conversion fields. provider is adjust, appsflyer, airbridge, singular, branch or kochava and must match the campaign. Use its one-time callback token in X-RapidReach-MMP-Token; token in JSON/query is also supported when the provider cannot set headers, but keep it out of logs. Configured campaign sender IP allowlists apply. occurred_at accepts ISO datetime, Unix seconds or milliseconds. Callback must reference a real clicked session for the same campaign/provider and cannot predate it by more than five minutes. Delivery must be enabled and campaign LIVE, PAUSED or ENDED. A 200 confirms durable inbox acceptance, not reward settlement; inspect reporting. Preserve transaction_id on retries and reversals.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "description": ""
                    },
                    "duplicate": {
                      "type": "boolean",
                      "description": ""
                    },
                    "receiptId": {
                      "type": "string",
                      "description": ""
                    }
                  },
                  "required": [
                    "accepted",
                    "duplicate",
                    "receiptId"
                  ]
                },
                "example": {
                  "accepted": true,
                  "duplicate": false,
                  "receiptId": "INBOX_ID"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or feature unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict; inspect state before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit; honor Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "description": "Opaque identifier returned by the API; owned by the authenticated advertiser.",
            "schema": {
              "type": "string",
              "description": "",
              "enum": [
                "adjust",
                "appsflyer",
                "airbridge",
                "singular",
                "branch",
                "kochava"
              ]
            }
          },
          {
            "name": "click_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "Exact value captured from {click_id} at launch."
            }
          },
          {
            "name": "transaction_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "Stable conversion/order ID; unchanged on retry or reversal."
            }
          },
          {
            "name": "goal_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "Exact externalGoalId."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "",
              "enum": [
                "pending",
                "approved",
                "rejected",
                "reversed"
              ]
            }
          },
          {
            "name": "occurred_at",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string",
              "description": "",
              "format": "date-time"
            }
          }
        ],
        "security": [
          {
            "mmpToken": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "advertiserKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Advertiser Settings → Security key; keep private."
      },
      "apiTimestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RR-Timestamp",
        "description": "Current Unix seconds; ±300 seconds."
      },
      "apiNonce": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RR-Nonce",
        "description": "Fresh random nonce for every HTTP attempt."
      },
      "apiSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RR-Signature",
        "description": "Lowercase HMAC-SHA256 digest; see Authentication."
      },
      "callbackKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidReach-Key-Id"
      },
      "callbackTimestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidReach-Timestamp"
      },
      "callbackSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidReach-Signature"
      },
      "mmpToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidReach-MMP-Token",
        "description": "One-time campaign MMP callback token, not advertiser management credentials."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable error code."
          },
          "message": {
            "type": "string",
            "description": ""
          },
          "fieldErrors": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "string",
              "description": ""
            }
          },
          "traceId": {
            "type": "string",
            "description": "Support correlation ID."
          },
          "retryable": {
            "type": "boolean",
            "description": ""
          },
          "retryAfterSeconds": {
            "type": "integer",
            "description": ""
          }
        },
        "required": [
          "code",
          "message",
          "fieldErrors",
          "traceId",
          "retryable"
        ]
      },
      "GoalInput": {
        "type": "object",
        "properties": {
          "externalGoalId": {
            "type": "string",
            "description": "Stable, unique lowercase goal ID used in callbacks. Defaults from eventName or goal order."
          },
          "name": {
            "type": "string",
            "description": "Required public milestone name."
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "eventName": {
            "type": "string",
            "description": "Defaults to externalGoalId."
          },
          "order": {
            "type": "integer",
            "description": "Defaults to array position."
          },
          "grossRevenue": {
            "type": "number",
            "description": "Advertiser cost in base currency units; converted to integer micros."
          },
          "publisherPayout": {
            "type": "number",
            "description": "Must not exceed grossRevenue."
          },
          "pendingMinutes": {
            "type": "number",
            "description": "Nonnegative hold interval."
          },
          "timeToCompleteMinutes": {
            "type": "number",
            "description": "Optional completion deadline.",
            "nullable": true
          },
          "isRepeatable": {
            "type": "boolean",
            "description": ""
          },
          "goalType": {
            "type": "string",
            "description": "",
            "enum": [
              "INSTALL",
              "EVENT",
              "PURCHASE",
              "REVENUE"
            ]
          },
          "dependsOnGoalIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "IDs of earlier goals in this array."
          },
          "availableFromMinutes": {
            "type": "number",
            "description": ""
          },
          "availableUntilMinutes": {
            "type": "number",
            "description": "Must be later than availableFromMinutes.",
            "nullable": true
          }
        },
        "required": [
          "name",
          "grossRevenue",
          "publisherPayout"
        ]
      },
      "CampaignInput": {
        "type": "object",
        "properties": {
          "advertiserId": {
            "type": "string",
            "description": "Owned active profile ID from /account."
          },
          "name": {
            "type": "string",
            "description": "Internal campaign name.",
            "minLength": 3
          },
          "source": {
            "type": "string",
            "description": "Self-service always uses DIRECT.",
            "enum": [
              "DIRECT"
            ]
          },
          "providerCode": {
            "type": "string",
            "description": "Derived from trackingPartner for direct campaigns."
          },
          "objective": {
            "type": "string",
            "description": "",
            "enum": [
              "SIGNUP",
              "PURCHASE",
              "INSTALL",
              "ENGAGEMENT",
              "CUSTOM"
            ]
          },
          "offerType": {
            "type": "string",
            "description": "",
            "enum": [
              "SINGLE_ACTION",
              "MULTI_REWARD"
            ]
          },
          "trackingMode": {
            "type": "string",
            "description": "",
            "enum": [
              "S2S"
            ]
          },
          "launchBehavior": {
            "type": "string",
            "description": "",
            "enum": [
              "TOP",
              "NEW_TAB"
            ]
          },
          "pricingModel": {
            "type": "string",
            "description": "",
            "enum": [
              "CPI",
              "CPA",
              "CPE"
            ]
          },
          "assetUrl": {
            "type": "string",
            "description": "Public HTTPS website or store listing.",
            "nullable": true
          },
          "assetIdentifier": {
            "type": "string",
            "description": "Web hostname, Android package or iOS store ID.",
            "nullable": true
          },
          "advertisedAssetId": {
            "type": "string",
            "description": "Owned VALID asset before staleAfter; required for readiness.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Creation always produces DRAFT. Use transition for subsequent changes."
          },
          "budget": {
            "type": "number",
            "description": "Total budget in base currency units; positive for readiness.",
            "nullable": true
          },
          "bid": {
            "type": "number",
            "description": "",
            "nullable": true
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "",
              "enum": [
                "web",
                "android",
                "ios"
              ]
            },
            "description": "Exactly one advertised platform; defaults to web.",
            "minItems": 1,
            "maxItems": 1
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "",
              "pattern": "^[A-Z]{2}$"
            },
            "description": "ISO alpha-2 codes; at least one for readiness."
          },
          "stateCodes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "",
              "pattern": "^[A-Z]{2}$"
            },
            "description": "US states; requires US or unrestricted country targeting."
          },
          "placements": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "Formats: offerwall, app-inbox, web-landing."
          },
          "trafficSources": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "Sources: android, ios, desktop."
          },
          "deviceTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "manufacturerFilterMode": {
            "type": "string",
            "description": "",
            "enum": [
              "ALL",
              "INCLUDE",
              "EXCLUDE"
            ]
          },
          "deviceManufacturers": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "osVersionMin": {
            "type": "string",
            "description": "Numeric version, mobile only.",
            "nullable": true
          },
          "osVersionMax": {
            "type": "string",
            "description": "Must be >= minimum.",
            "nullable": true
          },
          "browserVersionRanges": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "object",
              "properties": {
                "min": {
                  "type": "string",
                  "description": "",
                  "nullable": true
                },
                "max": {
                  "type": "string",
                  "description": "",
                  "nullable": true
                }
              }
            },
            "description": "Web only; chrome, firefox, safari, opera, yandex, edge or ie."
          },
          "taskType": {
            "type": "string",
            "description": "",
            "enum": [
              "VIEW",
              "CLICK",
              "INSTALL",
              "REGISTRATION",
              "FREE_TRIAL",
              "SURVEY",
              "ENGAGEMENT",
              "MULTI_ENGAGEMENT",
              "SUBSCRIPTION",
              "PURCHASE",
              "QUIZ",
              "SWEEPSTAKE",
              "CREDIT_CARD_SUBMIT",
              "REWARD_PROGRAM",
              "GAMBLING",
              "SENSITIVE_CONTENT"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "Up to 20 normalized category labels."
          },
          "kpis": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "dayParting": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "days": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "description": ""
                },
                "startMinute": {
                  "type": "integer",
                  "description": "",
                  "minimum": 0,
                  "maximum": 1439
                },
                "endMinute": {
                  "type": "integer",
                  "description": "",
                  "minimum": 1,
                  "maximum": 1440
                }
              }
            },
            "description": "UTC windows."
          },
          "priority": {
            "type": "number",
            "description": ""
          },
          "isFeatured": {
            "type": "boolean",
            "description": ""
          },
          "thingsToKnow": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "paymentRequired": {
            "type": "boolean",
            "description": ""
          },
          "landingUrlTemplate": {
            "type": "string",
            "description": "HTTPS destination containing {click_id}. Preserve this value for verified callbacks."
          },
          "creativeAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "Owned validated creative IDs, bound to advertised asset; required for readiness."
          },
          "gallery": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "HTTPS images, up to six.",
            "maxItems": 6
          },
          "trackingPartner": {
            "type": "string",
            "description": "Use /providers/capabilities for enabled/certified choices.",
            "default": "CUSTOM_S2S"
          },
          "callbackIpAllowlist": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": "Exact callback sender IPs; empty means no IP restriction."
          },
          "providerConfig": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Provider-specific configuration; MMP integrationMode MANUAL or PARTNER. Never put campaign secrets here."
          },
          "currency": {
            "type": "string",
            "description": "Three-letter base currency.",
            "default": "USD",
            "pattern": "^[A-Z]{3}$"
          },
          "attributionWindowMinutes": {
            "type": "number",
            "description": "Defaults to 43200; minimum 1."
          },
          "sessionHours": {
            "type": "number",
            "description": "Defaults to 720; minimum 1."
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalInput"
            },
            "description": "",
            "minItems": 1
          },
          "expectedVersion": {
            "type": "integer",
            "description": "Revision concurrency guard; send the latest optimisticVersion."
          },
          "title": {
            "type": "string",
            "description": "Public offer copy."
          },
          "headline": {
            "type": "string",
            "description": "Public offer copy."
          },
          "description": {
            "type": "string",
            "description": "Required nonempty public copy."
          },
          "ctaText": {
            "type": "string",
            "description": "Public offer copy."
          },
          "requirements": {
            "type": "string",
            "description": "Required nonempty public copy."
          },
          "disclaimer": {
            "type": "string",
            "description": "Required nonempty public copy."
          },
          "userInstructions": {
            "type": "string",
            "description": "Required nonempty public copy."
          },
          "rewardDisplayText": {
            "type": "string",
            "description": "Managed campaigns only; direct advertisers must omit."
          },
          "previewUrl": {
            "type": "string",
            "description": "Optional HTTPS URL/template.",
            "nullable": true
          },
          "supportUrlTemplate": {
            "type": "string",
            "description": "Optional HTTPS URL/template.",
            "nullable": true
          },
          "iconUrl": {
            "type": "string",
            "description": "Optional HTTPS URL/template.",
            "nullable": true
          },
          "heroImageUrl": {
            "type": "string",
            "description": "Optional HTTPS URL/template.",
            "nullable": true
          },
          "teaserVideoUrl": {
            "type": "string",
            "description": "Optional HTTPS URL/template.",
            "nullable": true
          },
          "trackingLinkTemplate": {
            "type": "string",
            "description": "Optional HTTPS URL/template.",
            "nullable": true
          },
          "dailyCap": {
            "type": "number",
            "description": "Conversion cap; userCap defaults to 1.",
            "nullable": true
          },
          "monthlyCap": {
            "type": "number",
            "description": "Conversion cap; userCap defaults to 1.",
            "nullable": true
          },
          "nextMonthCap": {
            "type": "number",
            "description": "Conversion cap; userCap defaults to 1.",
            "nullable": true
          },
          "userCap": {
            "type": "number",
            "description": "Conversion cap; userCap defaults to 1.",
            "nullable": true
          },
          "startAt": {
            "type": "string",
            "description": "UTC schedule; end must follow start.",
            "format": "date-time",
            "nullable": true
          },
          "endAt": {
            "type": "string",
            "description": "UTC schedule; end must follow start.",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "advertiserId",
          "name",
          "description",
          "requirements",
          "disclaimer",
          "userInstructions",
          "landingUrlTemplate",
          "goals"
        ]
      },
      "Revision": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": ""
          },
          "version": {
            "type": "integer",
            "description": ""
          },
          "title": {
            "type": "string",
            "description": ""
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "requirements": {
            "type": "string",
            "description": ""
          },
          "disclaimer": {
            "type": "string",
            "description": ""
          },
          "landingUrlTemplate": {
            "type": "string",
            "description": ""
          },
          "trackingPartner": {
            "type": "string",
            "description": ""
          },
          "currency": {
            "type": "string",
            "description": ""
          },
          "creativeAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "goalId": {
                  "type": "string",
                  "description": ""
                },
                "externalGoalId": {
                  "type": "string",
                  "description": ""
                },
                "name": {
                  "type": "string",
                  "description": ""
                },
                "grossRevenue": {
                  "type": "number",
                  "description": ""
                },
                "publisherPayout": {
                  "type": "number",
                  "description": ""
                },
                "grossRevenueMicros": {
                  "type": "integer",
                  "description": ""
                },
                "publisherPayoutMicros": {
                  "type": "integer",
                  "description": ""
                }
              }
            },
            "description": ""
          }
        },
        "additionalProperties": true
      },
      "Campaign": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": ""
          },
          "campaignId": {
            "type": "string",
            "description": ""
          },
          "advertiser": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "status": {
            "type": "string",
            "description": "",
            "enum": [
              "DRAFT",
              "IN_REVIEW",
              "APPROVED",
              "LIVE",
              "PAUSED",
              "ENDED",
              "ARCHIVED"
            ]
          },
          "providerCode": {
            "type": "string",
            "description": ""
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "budget": {
            "type": "number",
            "description": "",
            "nullable": true
          },
          "bid": {
            "type": "number",
            "description": "",
            "nullable": true
          },
          "spent": {
            "type": "number",
            "description": ""
          },
          "budgetMicros": {
            "type": "integer",
            "description": "",
            "nullable": true
          },
          "spentMicros": {
            "type": "integer",
            "description": ""
          },
          "optimisticVersion": {
            "type": "integer",
            "description": ""
          },
          "activeRevision": {
            "$ref": "#/components/schemas/Revision"
          },
          "revisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Revision"
            },
            "description": ""
          },
          "reviewNotes": {
            "type": "string",
            "description": ""
          },
          "approvedAt": {
            "type": "string",
            "description": "",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": true,
        "required": [
          "campaignId",
          "status",
          "optimisticVersion"
        ]
      },
      "Readiness": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": ""
          },
          "ready": {
            "type": "boolean",
            "description": ""
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "optimisticVersion": {
            "type": "integer",
            "description": ""
          }
        },
        "required": [
          "campaignId",
          "ready",
          "errors",
          "optimisticVersion"
        ]
      },
      "CustomS2SConfiguration": {
        "type": "object",
        "properties": {
          "keyId": {
            "type": "string",
            "description": ""
          },
          "nextKeyId": {
            "type": "string",
            "description": "",
            "nullable": true
          },
          "nextValidAfter": {
            "type": "string",
            "description": "",
            "format": "date-time",
            "nullable": true
          },
          "currentExpiresAt": {
            "type": "string",
            "description": "",
            "format": "date-time",
            "nullable": true
          },
          "callbackIpAllowlist": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "hasCurrentSecret": {
            "type": "boolean",
            "description": ""
          },
          "hasNextSecret": {
            "type": "boolean",
            "description": ""
          }
        }
      },
      "CustomS2SCredential": {
        "type": "object",
        "properties": {
          "configuration": {
            "$ref": "#/components/schemas/CustomS2SConfiguration"
          },
          "secret": {
            "type": "string",
            "description": "Returned only on first creation or rotation; store immediately. Null for an existing credential.",
            "nullable": true
          }
        },
        "required": [
          "configuration",
          "secret"
        ]
      },
      "MmpCredential": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "description": ""
          },
          "token": {
            "type": "string",
            "description": "Returned once on creation/rotation. Null for an existing credential.",
            "nullable": true
          }
        },
        "required": [
          "configured",
          "token"
        ]
      },
      "Tracking": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": ""
          },
          "trackingMode": {
            "type": "string",
            "description": ""
          },
          "providerCode": {
            "type": "string",
            "description": ""
          },
          "managed": {
            "type": "boolean",
            "description": ""
          },
          "method": {
            "type": "string",
            "description": ""
          },
          "endpoint": {
            "type": "string",
            "description": ""
          },
          "callbackEndpoint": {
            "type": "string",
            "description": ""
          },
          "authentication": {
            "type": "string",
            "description": ""
          },
          "credential": {
            "$ref": "#/components/schemas/CustomS2SConfiguration",
            "nullable": true
          },
          "requiredParameters": {
            "type": "array",
            "items": {
              "type": "string",
              "description": ""
            },
            "description": ""
          },
          "credentialConfigured": {
            "type": "boolean",
            "description": ""
          },
          "integrationMode": {
            "type": "string",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          },
          "secretReturned": {
            "type": "boolean",
            "description": ""
          },
          "webPixel": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": ""
              },
              "endpoint": {
                "type": "string",
                "description": ""
              },
              "requiredParameters": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": ""
                },
                "description": ""
              },
              "confirmation": {
                "type": "string",
                "description": ""
              }
            }
          }
        },
        "additionalProperties": true
      },
      "Report": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": ""
          },
          "conversions": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "integer",
              "description": ""
            }
          },
          "ledger": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            },
            "description": ""
          },
          "metrics": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "integer",
              "description": ""
            }
          },
          "funnel": {
            "type": "object",
            "properties": {
              "eligibleRequests": {
                "type": "integer",
                "description": ""
              },
              "impressions": {
                "type": "integer",
                "description": ""
              },
              "launches": {
                "type": "integer",
                "description": ""
              },
              "approvals": {
                "type": "integer",
                "description": ""
              },
              "reversals": {
                "type": "integer",
                "description": ""
              }
            }
          },
          "freshnessWatermark": {
            "type": "string",
            "description": "",
            "nullable": true
          },
          "reconciliation": {
            "type": "object",
            "properties": {
              "campaignSpentMicros": {
                "type": "integer",
                "description": ""
              },
              "ledgerGrossRevenueMicros": {
                "type": "integer",
                "description": ""
              },
              "differenceMicros": {
                "type": "integer",
                "description": ""
              },
              "exact": {
                "type": "boolean",
                "description": ""
              }
            }
          }
        }
      },
      "Balance": {
        "type": "object",
        "properties": {
          "available": {
            "type": "number",
            "description": ""
          },
          "reserved": {
            "type": "number",
            "description": ""
          },
          "spent": {
            "type": "number",
            "description": ""
          },
          "availableMicros": {
            "type": "integer",
            "description": ""
          },
          "reservedMicros": {
            "type": "integer",
            "description": ""
          },
          "spentMicros": {
            "type": "integer",
            "description": ""
          },
          "currency": {
            "type": "string",
            "description": ""
          }
        },
        "additionalProperties": true
      },
      "ConversionEvent": {
        "type": "object",
        "properties": {
          "click_id": {
            "type": "string",
            "description": "Exact value captured from {click_id} at launch."
          },
          "transaction_id": {
            "type": "string",
            "description": "Stable conversion/order ID; unchanged on retry or reversal."
          },
          "goal_id": {
            "type": "string",
            "description": "Exact externalGoalId."
          },
          "status": {
            "type": "string",
            "description": "",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "reversed"
            ]
          },
          "occurred_at": {
            "type": "string",
            "description": "",
            "format": "date-time"
          }
        },
        "required": [
          "click_id",
          "transaction_id",
          "goal_id",
          "status",
          "occurred_at"
        ]
      }
    }
  }
}
