{"openapi":"3.1.0","jsonSchemaDialect":"https:\/\/json-schema.org\/draft\/2020-12\/schema","info":{"title":"CPAlead Advertiser Campaign API","version":"1.0.0","description":"Create, validate, inspect, edit, start, and pause CPAlead self-serve advertiser campaigns. This schema is designed for direct integrations and AI or MCP agents. All money is USD, schedules use UTC, unknown JSON fields are rejected, and internal campaign status codes are never exposed."},"servers":[{"url":"https:\/\/www.cpalead.com","description":"CPAlead advertiser API server"}],"tags":[{"name":"Advertiser campaigns","description":"Self-serve CPA, CPI, and CPC campaign operations."}],"security":[{"AdvertiserCampaignToken":[]}],"paths":{"\/api\/v1\/advertiser\/openapi.json":{"get":{"operationId":"getAdvertiserCampaignOpenApi","summary":"Get this OpenAPI document","description":"Public, machine-readable description of the advertiser campaign API. Authentication is not required.","tags":["Advertiser campaigns"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application\/json":{"schema":{"type":"object"}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"x-required-abilities":[],"x-rate-limit":"60 requests per minute per IP address","x-mcp-tool":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"\/api\/v1\/advertiser\/requirements":{"get":{"operationId":"getAdvertiserCampaignRequirements","summary":"Get current campaign requirements","description":"Returns the authenticated advertiser\u2019s current campaign-creation allowance, countries, devices, payout or bid limits, daily-cap rules, launch packages, schema version, terms version, currency, and schedule timezone. Call this before constructing a campaign because account-specific limits can change.","tags":["Advertiser campaigns"],"parameters":[{"name":"type","in":"query","required":false,"description":"Limit the result to one campaign type.","schema":{"$ref":"#\/components\/schemas\/CampaignType"}}],"responses":{"200":{"description":"Current campaign requirements.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RequirementsResponse"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:validate"],"x-rate-limit":"120 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"\/api\/v1\/advertiser\/campaigns\/validate":{"post":{"operationId":"validateAdvertiserCampaign","summary":"Validate a campaign without saving it","description":"Normalizes and validates a complete create document using the same rules used to save campaigns, including the account campaign-creation allowance. A valid HTTP response may contain `data.valid: false`; inspect `data.errors` and correct every JSON Pointer path before creating the campaign.","tags":["Advertiser campaigns"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignCreateRequest"}}}},"responses":{"200":{"description":"Validation result. No campaign is created.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationResponse"}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"415":{"$ref":"#\/components\/responses\/UnsupportedMediaType"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:validate"],"x-rate-limit":"60 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"\/api\/v1\/advertiser\/images":{"post":{"operationId":"uploadAdvertiserCampaignImage","summary":"Upload a temporary campaign image","description":"Uploads one image whose width and height are each between 200 and 4096 pixels, crops it to a 200 by 200 square, removes metadata and animation, converts it to WebP, and returns a temporary image ID. Use that ID as `image_upload_id` when creating or updating a campaign. Unused IDs expire after 24 hours and are scoped to the advertiser.","tags":["Advertiser campaigns"],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["image"],"properties":{"image":{"type":"string","format":"binary","description":"JPG, PNG, GIF, BMP, or WebP image, at most 2048 KiB. Source width and height must each be 200 to 4096 pixels. The stored WebP is a non-animated, metadata-free 200 by 200 crop."}}}}}},"responses":{"201":{"description":"Temporary image created.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImageUploadResponse"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["assets:create"],"x-rate-limit":"10 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}}},"\/api\/v1\/advertiser\/campaigns":{"get":{"operationId":"listAdvertiserCampaigns","summary":"List campaigns owned by the advertiser","description":"Returns only CPAlead self-serve CPA, CPI, and CPC campaigns owned by the authenticated advertiser. Archived campaigns are included only when `state=archived`.","tags":["Advertiser campaigns"],"parameters":[{"$ref":"#\/components\/parameters\/CampaignTypeFilter"},{"$ref":"#\/components\/parameters\/CampaignStateFilter"},{"$ref":"#\/components\/parameters\/UpdatedSinceFilter"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Paginated campaigns.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignListResponse"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:read"],"x-rate-limit":"120 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},"post":{"operationId":"createAdvertiserCampaign","summary":"Create a campaign","description":"Creates one campaign after strict validation. Before the first successful advertiser deposit, an account may create up to three total self-serve CPA, CPI, or CPC campaigns; archived and denied campaigns still count. Auto-approved accounts may activate immediately when adequately funded. CPA and CPI activation may charge the selected launch package once. Creation does not guarantee delivery: the returned lifecycle state may indicate pending review, insufficient funding, or an inactive schedule. Repeating the same body and Idempotency-Key returns the original result; reusing the key with different data returns HTTP 409.","tags":["Advertiser campaigns"],"parameters":[{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignCreateRequest"}}}},"responses":{"201":{"description":"Campaign created. The response includes Location and ETag headers.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignResponse"}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"409":{"$ref":"#\/components\/responses\/Conflict"},"415":{"$ref":"#\/components\/responses\/UnsupportedMediaType"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:create"],"x-rate-limit":"30 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-cpalead-confirmation":"Creating an auto-approved CPA or CPI campaign may charge the selected launch package and begin delivery immediately.","x-cpalead-idempotent":true}},"\/api\/v1\/advertiser\/campaigns\/{campaign}":{"parameters":[{"$ref":"#\/components\/parameters\/CampaignId"}],"get":{"operationId":"getAdvertiserCampaign","summary":"Get one campaign","description":"Returns one owned self-serve campaign and a strong ETag. Save the ETag for a later update.","tags":["Advertiser campaigns"],"responses":{"200":{"description":"Campaign and ETag.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignResponse"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:read"],"x-rate-limit":"120 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},"patch":{"operationId":"updateAdvertiserCampaign","summary":"Update one campaign","description":"Applies a partial document after merging it with the current campaign and validating the complete result. Send the exact strong ETag from the latest GET response in If-Match. Review-sensitive changes may return the campaign to review. An active auto-approved CPA or CPI campaign may keep or resume delivery after an edit, and CPAlead may charge an unpaid launch package. Editing a paused campaign does not start delivery; use the explicit start operation after reviewing the updated response.","tags":["Advertiser campaigns"],"parameters":[{"$ref":"#\/components\/parameters\/IfMatch"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignPatchRequest"}}}},"responses":{"200":{"description":"Updated campaign and a new ETag.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignResponse"}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"$ref":"#\/components\/responses\/Conflict"},"412":{"$ref":"#\/components\/responses\/PreconditionFailed"},"415":{"$ref":"#\/components\/responses\/UnsupportedMediaType"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"428":{"$ref":"#\/components\/responses\/PreconditionRequired"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:update"],"x-rate-limit":"30 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"x-cpalead-confirmation":"Updating an active auto-approved CPA or CPI campaign may keep or resume delivery and may charge an unpaid launch package. Review-sensitive fields may send a campaign back to review. A paused campaign remains paused and must be started explicitly."}},"\/api\/v1\/advertiser\/campaigns\/{campaign}\/actions\/start":{"post":{"operationId":"startAdvertiserCampaign","summary":"Start a campaign","description":"Requests delivery for a paused campaign. CPAlead rechecks ownership, account access, review state, postback holds, prior removal rules, funding, launch fees, and the UTC schedule. The resulting campaign may be outside its schedule instead of actively delivering.","tags":["Advertiser campaigns"],"parameters":[{"$ref":"#\/components\/parameters\/CampaignId"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Campaign lifecycle state after the operation.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignResponse"}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"$ref":"#\/components\/responses\/Conflict"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:toggle"],"x-rate-limit":"30 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-cpalead-idempotent":true,"x-cpalead-confirmation":"Starting a CPA or CPI campaign may charge an unpaid launch package and may begin delivery immediately."}},"\/api\/v1\/advertiser\/campaigns\/{campaign}\/actions\/pause":{"post":{"operationId":"pauseAdvertiserCampaign","summary":"Pause a campaign","description":"Requests a paused state without deleting the campaign. Repeating this operation with the same Idempotency-Key is safe and returns the original response.","tags":["Advertiser campaigns"],"parameters":[{"$ref":"#\/components\/parameters\/CampaignId"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Campaign lifecycle state after the operation.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignResponse"}}}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"$ref":"#\/components\/responses\/Conflict"},"422":{"$ref":"#\/components\/responses\/ValidationFailed"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"500":{"description":"Unexpected server error. Use meta.request_id when contacting support.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"503":{"$ref":"#\/components\/responses\/ServiceUnavailable"}},"x-required-abilities":["campaigns:toggle"],"x-rate-limit":"30 requests per minute per advertiser","x-mcp-tool":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-cpalead-idempotent":true}}},"components":{"securitySchemes":{"AdvertiserCampaignToken":{"type":"http","scheme":"bearer","bearerFormat":"CPAlead advertiser campaign API token","description":"Send the token once in the Authorization header as `Bearer TOKEN`. Never place it in a URL, campaign field, or log."}},"parameters":{"CampaignId":{"name":"campaign","in":"path","required":true,"description":"CPAlead campaign ID owned by the authenticated advertiser.","schema":{"type":"integer","minimum":1}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"A caller-generated value containing 8 to 200 visible ASCII characters. Use a new key for each intended mutation and reuse it only when retrying the identical operation and body.","schema":{"type":"string","minLength":8,"maxLength":200,"pattern":"^[!-~]+$","example":"campaign-create-01J5K9PN7X7M5Z6H8T4A"}},"IfMatch":{"name":"If-Match","in":"header","required":true,"description":"The exact strong quoted ETag returned by the latest GET or mutation response.","schema":{"type":"string","pattern":"^\"[^\"\\\\]{1,200}\"$","example":"\"31f38b72a5f87b30\""}},"CampaignTypeFilter":{"name":"type","in":"query","required":false,"schema":{"$ref":"#\/components\/schemas\/CampaignType"}},"CampaignStateFilter":{"name":"state","in":"query","required":false,"description":"Filter by public lifecycle status. Internal CPAlead status codes are not accepted.","schema":{"$ref":"#\/components\/schemas\/FilterableCampaignState"}},"UpdatedSinceFilter":{"name":"updated_since","in":"query","required":false,"description":"Return campaigns updated at or after this ISO 8601 date and time.","schema":{"type":"string","format":"date-time"}},"Page":{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},"PerPage":{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}},"responses":{"BadRequest":{"description":"Malformed JSON, invalid idempotency key, or invalid conditional header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"Unauthorized":{"description":"Bearer token is missing, invalid, expired, or revoked.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"Forbidden":{"description":"The advertiser account or token ability cannot use this operation.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"NotFound":{"description":"The campaign does not exist in this advertiser account.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"Conflict":{"description":"The request conflicts with an existing idempotency record or campaign lifecycle rule.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"PreconditionFailed":{"description":"The campaign ETag is stale.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"UnsupportedMediaType":{"description":"The request must use application\/json.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"ValidationFailed":{"description":"One or more values are invalid. Error details use JSON Pointer paths.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"PreconditionRequired":{"description":"If-Match is required for campaign updates.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"RateLimited":{"description":"The named endpoint rate limit was exceeded. Honor Retry-After.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"ServiceUnavailable":{"description":"Required API storage or a dependent service is temporarily unavailable.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"schemas":{"CampaignType":{"type":"string","enum":["CPA","CPI","CPC"]},"PublicCampaignStatus":{"type":"string","enum":["active","paused","pending_review","paused_for_funding","cap_reached","outside_schedule","denied","archived","unavailable"]},"FilterableCampaignState":{"type":"string","enum":["active","paused","pending_review","paused_for_funding","cap_reached","outside_schedule","denied","archived"]},"Money":{"description":"USD decimal value. String form is recommended to preserve decimal intent.","oneOf":[{"type":"string","pattern":"^\\d+(?:\\.\\d{1,2})?$"},{"type":"number","minimum":0}],"example":"1.25"},"Issue":{"type":"object","additionalProperties":false,"required":["path","code","message"],"properties":{"path":{"type":"string","description":"RFC 6901 JSON Pointer, or a documented pseudo-pointer under \/headers or \/query."},"code":{"type":"string"},"message":{"type":"string"}}},"ResponseMeta":{"type":"object","required":["request_id","schema_version"],"properties":{"request_id":{"type":"string"},"schema_version":{"type":"string","const":"2026-08-17"},"resource_version":{"type":"string"},"current_version":{"type":"string","description":"Latest unquoted campaign version returned with a stale-update error."},"current_etag":{"type":"string","description":"Latest strong quoted ETag returned with a stale-update error. This value is ready to send in If-Match after the campaign is retrieved and reviewed again."},"idempotent_replay":{"type":"boolean"},"required_abilities":{"type":"array","items":{"type":"string"}},"retry_after_seconds":{"type":"integer","minimum":0},"campaign_count":{"type":"integer","minimum":0},"limit_without_deposit":{"type":"integer","const":3},"remaining_without_deposit":{"type":["integer","null"],"minimum":0},"deposit_required_for_more":{"type":"boolean"},"recommended_action":{"type":"string","enum":["make_deposit"]},"warnings":{"type":"array","items":{"$ref":"#\/components\/schemas\/Issue"}},"pagination":{"$ref":"#\/components\/schemas\/Pagination"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#\/components\/schemas\/Issue"}}}},"ErrorResponse":{"type":"object","additionalProperties":false,"required":["error","meta"],"properties":{"error":{"$ref":"#\/components\/schemas\/Error"},"meta":{"$ref":"#\/components\/schemas\/ResponseMeta"}}},"CampaignCreateRequest":{"oneOf":[{"$ref":"#\/components\/schemas\/CpaCampaignCreateRequest"},{"$ref":"#\/components\/schemas\/CpiCampaignCreateRequest"},{"$ref":"#\/components\/schemas\/CpcCampaignCreateRequest"}],"discriminator":{"propertyName":"type","mapping":{"CPA":"#\/components\/schemas\/CpaCampaignCreateRequest","CPI":"#\/components\/schemas\/CpiCampaignCreateRequest","CPC":"#\/components\/schemas\/CpcCampaignCreateRequest"}}},"CpaCampaignCreateRequest":{"type":"object","additionalProperties":false,"required":["schema_version","type","name","creative","tracking","targeting","pricing","image_upload_id","terms","launch_package"],"properties":{"schema_version":{"type":"string","const":"2026-08-17"},"external_id":{"type":["string","null"],"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Optional caller ID, unique per advertiser create operation."},"type":{"type":"string","const":"CPA"},"name":{"type":"string","maxLength":250},"creative":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":3,"maxLength":35},"description":{"type":"string","maxLength":45},"conversion_goal":{"type":"string","minLength":3,"maxLength":35,"description":"Submit a conversion goal listed by getAdvertiserCampaignRequirements, or your own descriptive text of up to 35 characters. The dashboard placeholder \"Custom\" is not accepted as an API value."}},"required":["title","description","conversion_goal"]},"tracking":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":250},"preview_url":{"type":"string","format":"uri","maxLength":250,"description":"Required non-empty public landing-page URL for CPA campaigns."},"gaid_idfa_filler":{"type":"boolean","default":false}},"required":["url","preview_url"]},"targeting":{"type":"object","additionalProperties":false,"properties":{"countries":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{2}$"}},"device":{"type":"string","enum":["all_devices","desktop","mobile","ios","ios_mobile","ios_tablet","android"]},"tools_only":{"type":"boolean","default":false}},"required":["countries","device"]},"pricing":{"type":"object","additionalProperties":false,"properties":{"currency":{"type":"string","const":"USD","default":"USD"},"payout":{"$ref":"#\/components\/schemas\/Money"},"daily_cap":{"type":"integer","minimum":1}},"required":["payout","daily_cap"]},"schedule":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["always","daily"],"default":"always"},"start_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"00:00"},"end_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"23:59"},"timezone":{"type":"string","const":"UTC","default":"UTC"}}},"publisher_access":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["all","whitelist"],"default":"all","description":"The advertiser\u2019s explicit API setting. Use whitelist only for publisher IDs configured manually by this advertiser."},"publisher_ids":{"type":"array","uniqueItems":true,"items":{"type":"integer","minimum":1},"default":[],"description":"Publisher IDs configured manually by this advertiser. CPAlead does not expose IDs from additional placement or safety rules."}}},"image_upload_id":{"type":"string","maxLength":128,"description":"Temporary ID returned by uploadAdvertiserCampaignImage."},"terms":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string","const":"2026-08-17"},"accepted":{"type":"boolean","const":true}},"required":["version","accepted"]},"launch_package":{"type":"object","additionalProperties":false,"properties":{"amount":{"$ref":"#\/components\/schemas\/Money","description":"Choose one amount returned by getAdvertiserCampaignRequirements. CPAlead derives the click quantity."}},"required":["amount"]}}},"CpiCampaignCreateRequest":{"type":"object","additionalProperties":false,"required":["schema_version","type","name","creative","tracking","targeting","pricing","image_upload_id","terms","launch_package"],"properties":{"schema_version":{"type":"string","const":"2026-08-17"},"external_id":{"type":["string","null"],"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Optional caller ID, unique per advertiser create operation."},"type":{"type":"string","const":"CPI"},"name":{"type":"string","maxLength":250},"creative":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":3,"maxLength":35},"description":{"type":"string","maxLength":45},"conversion_goal":{"type":"string","minLength":3,"maxLength":35,"description":"Submit a conversion goal listed by getAdvertiserCampaignRequirements, or your own descriptive text of up to 35 characters. The dashboard placeholder \"Custom\" is not accepted as an API value."}},"required":["title","description","conversion_goal"]},"tracking":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":250},"preview_url":{"type":["string","null"],"format":"uri","maxLength":250,"description":"Optional public app-store or landing-page URL."},"gaid_idfa_filler":{"type":"boolean","default":false},"method":{"type":"string","enum":["appsflyer","other"]}},"required":["url","method"]},"targeting":{"type":"object","additionalProperties":false,"properties":{"countries":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{2}$"}},"device":{"type":"string","enum":["ios","android"]},"tools_only":{"type":"boolean","default":false},"minimum_ios_version":{"type":["integer","null"],"enum":[14,15,16,17,18,null],"description":"Allowed only when device is ios."},"allow_proxy":{"type":"boolean","default":false}},"required":["countries","device"]},"pricing":{"type":"object","additionalProperties":false,"properties":{"currency":{"type":"string","const":"USD","default":"USD"},"payout":{"$ref":"#\/components\/schemas\/Money"},"daily_cap":{"type":"integer","minimum":1}},"required":["payout","daily_cap"]},"schedule":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["always","daily"],"default":"always"},"start_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"00:00"},"end_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"23:59"},"timezone":{"type":"string","const":"UTC","default":"UTC"}}},"publisher_access":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["all","whitelist"],"default":"all","description":"The advertiser\u2019s explicit API setting. Use whitelist only for publisher IDs configured manually by this advertiser."},"publisher_ids":{"type":"array","uniqueItems":true,"items":{"type":"integer","minimum":1},"default":[],"description":"Publisher IDs configured manually by this advertiser. CPAlead does not expose IDs from additional placement or safety rules."}}},"image_upload_id":{"type":"string","maxLength":128,"description":"Temporary ID returned by uploadAdvertiserCampaignImage."},"terms":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string","const":"2026-08-17"},"accepted":{"type":"boolean","const":true}},"required":["version","accepted"]},"launch_package":{"type":"object","additionalProperties":false,"properties":{"amount":{"$ref":"#\/components\/schemas\/Money","description":"Choose one amount returned by getAdvertiserCampaignRequirements. CPAlead derives the click quantity."}},"required":["amount"]}}},"CpcCampaignCreateRequest":{"type":"object","additionalProperties":false,"required":["schema_version","type","name","creative","tracking","targeting","pricing","image_upload_id","terms"],"properties":{"schema_version":{"type":"string","const":"2026-08-17"},"external_id":{"type":["string","null"],"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Optional caller ID, unique per advertiser create operation."},"type":{"type":"string","const":"CPC"},"name":{"type":"string","maxLength":250},"creative":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":3,"maxLength":35},"description":{"type":"string","maxLength":45},"instructions":{"type":["string","null"],"maxLength":45}},"required":["title","description"]},"tracking":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":250}},"required":["url"]},"targeting":{"type":"object","additionalProperties":false,"properties":{"countries":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{2}$"}},"device":{"type":"string","enum":["all_devices","desktop","mobile","ios","ios_mobile","ios_tablet","android"]}},"required":["countries","device"]},"pricing":{"type":"object","additionalProperties":false,"properties":{"currency":{"type":"string","const":"USD","default":"USD"},"bid":{"$ref":"#\/components\/schemas\/Money"},"daily_budget":{"$ref":"#\/components\/schemas\/Money"}},"required":["bid","daily_budget"]},"schedule":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["always","daily"],"default":"always"},"start_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"00:00"},"end_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"23:59"},"timezone":{"type":"string","const":"UTC","default":"UTC"}}},"publisher_access":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["all","whitelist"],"default":"all","description":"The advertiser\u2019s explicit API setting. Use whitelist only for publisher IDs configured manually by this advertiser."},"publisher_ids":{"type":"array","uniqueItems":true,"items":{"type":"integer","minimum":1},"default":[],"description":"Publisher IDs configured manually by this advertiser. CPAlead does not expose IDs from additional placement or safety rules."}}},"image_upload_id":{"type":"string","maxLength":128,"description":"Temporary ID returned by uploadAdvertiserCampaignImage."},"terms":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string","const":"2026-08-17"},"accepted":{"type":"boolean","const":true}},"required":["version","accepted"]}}},"CampaignPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"description":"Partial public write shape. At least one top-level field is required. Omitted values come from the current campaign before full validation. An empty nested object leaves that section unchanged. `type`, when supplied, must match the existing campaign. `external_id` is not editable.","properties":{"schema_version":{"type":"string","const":"2026-08-17"},"type":{"$ref":"#\/components\/schemas\/CampaignType"},"name":{"type":"string","maxLength":250},"creative":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":3,"maxLength":35},"description":{"type":"string","maxLength":45},"conversion_goal":{"type":"string","minLength":3,"maxLength":35,"description":"Submit a conversion goal listed by getAdvertiserCampaignRequirements, or your own descriptive text of up to 35 characters. The dashboard placeholder \"Custom\" is not accepted as an API value."},"instructions":{"type":["string","null"],"maxLength":45}}},"tracking":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":250},"preview_url":{"type":["string","null"],"format":"uri","maxLength":250},"method":{"type":"string","enum":["appsflyer","other"]},"gaid_idfa_filler":{"type":"boolean"}}},"targeting":{"type":"object","additionalProperties":false,"properties":{"countries":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{2}$"}},"device":{"type":"string","enum":["all_devices","desktop","mobile","ios","ios_mobile","ios_tablet","android"]},"tools_only":{"type":"boolean"},"minimum_ios_version":{"type":["integer","null"],"enum":[14,15,16,17,18,null]},"allow_proxy":{"type":"boolean"}}},"pricing":{"type":"object","additionalProperties":false,"properties":{"payout":{"$ref":"#\/components\/schemas\/Money"},"daily_cap":{"type":"integer","minimum":1},"bid":{"$ref":"#\/components\/schemas\/Money"},"daily_budget":{"$ref":"#\/components\/schemas\/Money"},"currency":{"type":"string","const":"USD"}}},"schedule":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["always","daily"],"default":"always"},"start_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"00:00"},"end_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"23:59"},"timezone":{"type":"string","const":"UTC","default":"UTC"}}},"publisher_access":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["all","whitelist"],"default":"all","description":"The advertiser\u2019s explicit API setting. Use whitelist only for publisher IDs configured manually by this advertiser."},"publisher_ids":{"type":"array","uniqueItems":true,"items":{"type":"integer","minimum":1},"default":[],"description":"Publisher IDs configured manually by this advertiser. CPAlead does not expose IDs from additional placement or safety rules."}}},"image_upload_id":{"type":"string","maxLength":128}}},"Campaign":{"type":"object","additionalProperties":false,"required":["schema_version","id","external_id","version","type","name","creative","tracking","targeting","pricing","schedule","publisher_access","image_url","state","created_at","updated_at"],"properties":{"schema_version":{"type":"string","const":"2026-08-17"},"id":{"type":"integer","minimum":1},"external_id":{"type":["string","null"]},"version":{"type":"string","description":"Unquoted opaque resource version. Prefer the quoted ETag response header for If-Match."},"type":{"$ref":"#\/components\/schemas\/CampaignType"},"name":{"type":"string"},"creative":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":3,"maxLength":35},"description":{"type":"string","maxLength":45},"conversion_goal":{"type":"string","minLength":3,"maxLength":35,"description":"Submit a conversion goal listed by getAdvertiserCampaignRequirements, or your own descriptive text of up to 35 characters. The dashboard placeholder \"Custom\" is not accepted as an API value."},"instructions":{"type":["string","null"],"maxLength":45}}},"tracking":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":250},"preview_url":{"type":["string","null"],"format":"uri","maxLength":250},"method":{"type":"string","enum":["appsflyer","other"]},"gaid_idfa_filler":{"type":"boolean"}}},"targeting":{"type":"object","additionalProperties":false,"properties":{"countries":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{2}$"}},"device":{"type":"string","enum":["all_devices","desktop","mobile","ios","ios_mobile","ios_tablet","android"]},"tools_only":{"type":"boolean"},"minimum_ios_version":{"type":["integer","null"],"enum":[14,15,16,17,18,null]},"allow_proxy":{"type":"boolean"}}},"pricing":{"type":"object","additionalProperties":false,"properties":{"payout":{"$ref":"#\/components\/schemas\/Money"},"daily_cap":{"type":"integer","minimum":1},"bid":{"$ref":"#\/components\/schemas\/Money"},"daily_budget":{"$ref":"#\/components\/schemas\/Money"},"currency":{"type":"string","const":"USD"}}},"schedule":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["always","daily"],"default":"always"},"start_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"00:00"},"end_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","default":"23:59"},"timezone":{"type":"string","const":"UTC","default":"UTC"}},"required":["mode","start_time","end_time","timezone"]},"publisher_access":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["all","whitelist"],"description":"The advertiser\u2019s explicit\/manual publisher-access setting."},"effective_mode":{"type":"string","enum":["all","restricted"],"description":"Whether the campaign is effectively unrestricted or subject to one or more access rules."},"additional_rules_applied":{"type":"boolean","description":"True when CPAlead applies placement or safety access rules in addition to the advertiser\u2019s manual setting. Internal rule details and publisher IDs are not exposed."},"publisher_ids":{"type":"array","uniqueItems":true,"items":{"type":"integer","minimum":1},"description":"Only publisher IDs configured manually by this advertiser."}},"required":["mode","effective_mode","additional_rules_applied","publisher_ids"]},"image_url":{"type":"string","format":"uri"},"state":{"type":"object","additionalProperties":false,"properties":{"status":{"$ref":"#\/components\/schemas\/PublicCampaignStatus"},"enabled":{"type":"boolean"},"review_state":{"type":"string","enum":["pending","approved","denied","archived"]},"desired_state":{"type":"string","enum":["active","paused"]},"delivery_state":{"type":"string","enum":["active","paused","pending","denied","archived"]},"delivery_reason":{"type":["string","null"],"enum":["awaiting_review","insufficient_funds","daily_cap_reached","outside_schedule","review_denied","archived","advertiser_paused",null]},"capabilities":{"type":"object","additionalProperties":false,"properties":{"can_edit":{"type":"boolean","description":"State-level hint that an edit may be attempted."},"can_start":{"type":"boolean","description":"State-level hint that a start request may be attempted."},"can_pause":{"type":"boolean","description":"State-level hint that a pause request may be attempted."}},"required":["can_edit","can_start","can_pause"],"description":"Advisory state-level hints, not authorization or a guarantee of success. Real-time account access, review holds, funding, schedules, and other safety checks can still reject an operation. Retrieve the latest campaign and handle the operation response."}},"required":["status","enabled","review_state","desired_state","delivery_state","delivery_reason","capabilities"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"CampaignResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Campaign"},"meta":{"$ref":"#\/components\/schemas\/ResponseMeta"}}},"CampaignListResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Campaign"}},"meta":{"$ref":"#\/components\/schemas\/ResponseMeta"}}},"ValidationResult":{"type":"object","additionalProperties":false,"required":["valid","errors","warnings"],"properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"$ref":"#\/components\/schemas\/Issue"}},"warnings":{"type":"array","items":{"$ref":"#\/components\/schemas\/Issue"}}}},"ValidationResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/ValidationResult"},"meta":{"$ref":"#\/components\/schemas\/ResponseMeta"}}},"RequirementsResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/CampaignRequirements"},"meta":{"$ref":"#\/components\/schemas\/ResponseMeta"}}},"CampaignRequirements":{"type":"object","additionalProperties":false,"properties":{"schema_version":{"type":"string","const":"2026-08-17"},"currency":{"type":"string","const":"USD"},"timezone":{"type":"string","const":"UTC"},"account":{"$ref":"#\/components\/schemas\/CampaignAccountRequirements"},"workflow":{"type":"array","minItems":1,"items":{"type":"string"},"description":"Recommended setup sequence for a person or AI agent."},"activation_notice":{"type":"string","description":"Account-specific notice to show before creation or start."},"terms":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string","const":"2026-08-17"},"url":{"type":"string","format":"uri"},"acceptance_required_for_create":{"type":"boolean","const":true}},"required":["version","url","acceptance_required_for_create"]},"field_limits":{"$ref":"#\/components\/schemas\/CampaignFieldLimits"},"image_upload":{"$ref":"#\/components\/schemas\/CampaignImageRequirements"},"countries":{"type":"array","items":{"$ref":"#\/components\/schemas\/CampaignCountryOption"}},"campaign_types":{"type":"object","additionalProperties":false,"description":"Contains each requested campaign type. A type query may return only one property.","properties":{"CPA":{"$ref":"#\/components\/schemas\/CampaignTypeRequirements"},"CPI":{"$ref":"#\/components\/schemas\/CampaignTypeRequirements"},"CPC":{"$ref":"#\/components\/schemas\/CampaignTypeRequirements"}}}},"required":["schema_version","currency","timezone","account","workflow","activation_notice","terms","field_limits","image_upload","countries","campaign_types"]},"CampaignAccountRequirements":{"type":"object","additionalProperties":false,"properties":{"auto_approval_enabled":{"type":"boolean"},"launch_package_fee_waived":{"type":"boolean"},"minimum_operating_balance":{"$ref":"#\/components\/schemas\/Money"},"campaign_creation":{"type":"object","additionalProperties":false,"properties":{"has_successful_deposit":{"type":"boolean"},"campaign_count":{"type":"integer","minimum":0},"limit_without_deposit":{"type":"integer","const":3},"remaining_without_deposit":{"type":["integer","null"],"minimum":0},"deposit_required_for_more":{"type":"boolean"}},"required":["has_successful_deposit","campaign_count","limit_without_deposit","remaining_without_deposit","deposit_required_for_more"]},"can_create":{"type":"object","additionalProperties":false,"properties":{"CPA":{"type":"boolean"},"CPI":{"type":"boolean"},"CPC":{"type":"boolean"}},"required":["CPA","CPI","CPC"]}},"required":["auto_approval_enabled","launch_package_fee_waived","minimum_operating_balance","campaign_creation","can_create"]},"CampaignFieldLimits":{"type":"object","additionalProperties":false,"properties":{"name_max_length":{"type":"integer","minimum":0},"title_min_length":{"type":"integer","minimum":0},"title_max_length":{"type":"integer","minimum":0},"description_max_length":{"type":"integer","minimum":0},"conversion_goal_value_max_length":{"type":"integer","minimum":0},"custom_conversion_goal_max_length":{"type":"integer","minimum":0},"cpc_instructions_max_length":{"type":"integer","minimum":0},"url_max_length":{"type":"integer","minimum":0},"image_max_bytes":{"type":"integer","minimum":1},"source_image_min_width":{"type":"integer","const":200},"source_image_min_height":{"type":"integer","const":200},"source_image_max_width":{"type":"integer","const":4096},"source_image_max_height":{"type":"integer","const":4096},"processed_image_width":{"type":"integer","const":200},"processed_image_height":{"type":"integer","const":200},"processed_image_animation_preserved":{"type":"boolean","const":false},"processed_image_metadata_preserved":{"type":"boolean","const":false}},"required":["name_max_length","title_min_length","title_max_length","description_max_length","conversion_goal_value_max_length","custom_conversion_goal_max_length","cpc_instructions_max_length","url_max_length","image_max_bytes","source_image_min_width","source_image_min_height","source_image_max_width","source_image_max_height","processed_image_width","processed_image_height","processed_image_animation_preserved","processed_image_metadata_preserved"]},"CampaignImageRequirements":{"type":"object","additionalProperties":false,"properties":{"content_type":{"type":"string","const":"multipart\/form-data"},"field_name":{"type":"string","const":"image"},"expires_after_hours":{"type":"integer","minimum":1},"single_use":{"type":"boolean","const":true},"remote_image_urls_accepted":{"type":"boolean","const":false}},"required":["content_type","field_name","expires_after_hours","single_use","remote_image_urls_accepted"]},"CampaignCountryOption":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","pattern":"^[A-Z]{2}$"},"name":{"type":"string"},"minimum_cpc_bid":{"$ref":"#\/components\/schemas\/Money"}},"required":["code","name","minimum_cpc_bid"]},"CampaignTypeRequirements":{"type":"object","additionalProperties":false,"properties":{"devices":{"type":"array","items":{"$ref":"#\/components\/schemas\/CampaignDeviceOption"}},"schedule_modes":{"type":"array","items":{"type":"string","enum":["always","daily"]}},"publisher_access_modes":{"type":"array","items":{"type":"string","enum":["all","whitelist"]}},"conversion_goals":{"type":"array","description":"Suggested built-in conversion goals for CPA and CPI campaigns. Callers may instead submit their own descriptive text within the documented custom conversion-goal limit.","items":{"type":"string"}},"pricing":{"$ref":"#\/components\/schemas\/CampaignPricingRequirements"},"launch_packages":{"type":"array","description":"CPA and CPI only. Creation must submit one listed amount. Fee-waived accounts receive amount 0.00.","items":{"$ref":"#\/components\/schemas\/CampaignLaunchPackage"}},"tracking":{"$ref":"#\/components\/schemas\/CampaignTrackingRequirements"},"minimum_ios_versions":{"type":"array","items":{"type":"integer","enum":[14,15,16,17,18]}}},"required":["devices","schedule_modes","publisher_access_modes","pricing"]},"CampaignDeviceOption":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"integer","minimum":1,"description":"Informational CPAlead device ID. Do not submit this value in API writes."},"value":{"type":"string","enum":["all_devices","desktop","mobile","ios","ios_mobile","ios_tablet","android"],"description":"Submit this string as targeting.device."},"label":{"type":"string","description":"Human-readable device label."}},"required":["id","value","label"]},"CampaignPricingRequirements":{"type":"object","additionalProperties":false,"properties":{"maximum_bid":{"$ref":"#\/components\/schemas\/Money"},"minimum_daily_budget":{"$ref":"#\/components\/schemas\/Money"},"maximum_daily_budget":{"$ref":"#\/components\/schemas\/Money"},"country_minimums_are_listed_above":{"type":"boolean"},"minimum_payout_without_us":{"$ref":"#\/components\/schemas\/Money"},"minimum_payout_with_us":{"$ref":"#\/components\/schemas\/Money"},"maximum_payout":{"$ref":"#\/components\/schemas\/Money"},"daily_cap_rules":{"type":"array","items":{"$ref":"#\/components\/schemas\/CampaignDailyCapRule"}}}},"CampaignDailyCapRule":{"type":"object","additionalProperties":false,"required":["minimum_daily_cap"],"properties":{"when_payout_at_least":{"$ref":"#\/components\/schemas\/Money"},"when_payout_below":{"$ref":"#\/components\/schemas\/Money"},"minimum_daily_cap":{"type":"integer","minimum":1}},"oneOf":[{"required":["when_payout_at_least"]},{"required":["when_payout_below"]}]},"CampaignLaunchPackage":{"type":"object","additionalProperties":false,"properties":{"amount":{"$ref":"#\/components\/schemas\/Money"},"clicks":{"type":"integer","minimum":0}},"required":["amount","clicks"]},"CampaignTrackingRequirements":{"type":"object","additionalProperties":false,"properties":{"click_id_macro":{"type":"string","const":"{CLICK_ID}"},"click_id_macro_required":{"type":"boolean"},"methods":{"type":"array","items":{"type":"string","enum":["appsflyer","other"]}}},"required":["click_id_macro","click_id_macro_required","methods"]},"ImageUpload":{"type":"object","additionalProperties":false,"required":["id","mime_type","byte_size","width","height","expires_at"],"properties":{"id":{"type":"string","pattern":"^cimg_[a-z0-9]+$"},"mime_type":{"type":"string","const":"image\/webp"},"byte_size":{"type":"integer","minimum":1},"width":{"type":"integer","const":200},"height":{"type":"integer","const":200},"expires_at":{"type":"string","format":"date-time"}}},"ImageUploadResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/ImageUpload"},"meta":{"$ref":"#\/components\/schemas\/ResponseMeta"}}},"Pagination":{"type":"object","additionalProperties":false,"required":["current_page","per_page","total","last_page","has_more_pages"],"properties":{"current_page":{"type":"integer","minimum":1},"per_page":{"type":"integer","minimum":1,"maximum":100},"total":{"type":"integer","minimum":0},"last_page":{"type":"integer","minimum":1},"has_more_pages":{"type":"boolean"}}}}},"x-ai-integration-guidance":{"recommended_sequence":["Call getAdvertiserCampaignRequirements for current account-specific limits and choices.","Upload an image and keep the returned temporary image ID.","Call validateAdvertiserCampaign with the complete create document.","Correct every validation error using its JSON Pointer path.","Call createAdvertiserCampaign with a new Idempotency-Key.","Keep the campaign ID, version, ETag, request ID, and external ID.","Retrieve the campaign again before editing, then send its ETag in If-Match.","Use explicit start or pause operations; never infer or submit internal status codes."],"safety":["Check account.campaign_creation and account.can_create before uploading an image or constructing a new campaign.","Do not send secrets in campaign URLs or text fields.","Do not retry a mutation with a different body under the same Idempotency-Key.","Treat HTTP 409, 412, 422, 428, and 429 as actionable responses rather than blind-retry conditions."]}}