{"openapi":"3.1.0","info":{"title":"Admux API","version":"v1","description":"Admux advertiser API. All money is integer USD cents unless a field says otherwise. LOCAL BUILD: every external service (payments, ad providers, screening, model) is a local stub."},"servers":[{"url":"https://api.admux.ai"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Workspace API key (amx_...). Shown once at creation."}},"responses":{"Error":{"description":"Structured error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"e.g. OFFER_EXPIRED, VERSION_CONFLICT, INSUFFICIENT_FUNDS, KEY_ALLOWANCE_EXCEEDED, AUTHORITY_DENIED, HOLD_ACTIVE"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"paths":{"/v1/scopes":{"get":{"summary":"API key scope registry and presets","tags":["Keys"],"x-admux-auth":"public","parameters":[],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/workspace/readiness":{"get":{"summary":"Per-channel provider readiness checklist (stubbed in local build)","tags":["Channels"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/channels":{"get":{"summary":"Channel capabilities, creative rules, targeting support and current customer pricing","tags":["Channels"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets":{"get":{"summary":"List the creative library","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:read"],"security":[{"apiKey":["creatives:read"]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["image","copy"]}},{"name":"includeArchived","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets/{id}":{"get":{"summary":"Asset with all versions and campaign references","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:read"],"security":[{"apiKey":["creatives:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets/images":{"post":{"summary":"Upload a supplied image (base64 PNG/JPEG/WebP, max 5 MB)","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:write"],"security":[{"apiKey":["creatives:write"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"contentBase64":{"type":"string"}},"required":["name","contentBase64"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets/copy":{"post":{"summary":"Save supplied copy","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:write"],"security":[{"apiKey":["creatives:write"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"headline":{"type":"string"},"body":{"type":"string"},"brandName":{"type":"string"},"cta":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets/{id}/versions":{"post":{"summary":"Create a new immutable version","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:write"],"security":[{"apiKey":["creatives:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contentBase64":{"type":"string"},"headline":{"type":"string"},"body":{"type":"string"},"brandName":{"type":"string"},"cta":{"type":"string"}}}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets/{id}/archive":{"post":{"summary":"Remove from library browsing (versions stay addressable)","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:write"],"security":[{"apiKey":["creatives:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/assets/versions/{vid}/content":{"get":{"summary":"Authorized image content for a version","tags":["Creatives"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["creatives:read"],"security":[{"apiKey":["creatives:read"]}],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns":{"get":{"summary":"List campaigns (search, tag, status, archived, cursor pagination)","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"schema":{"type":"string","enum":["exclude","only","all"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}},{"name":"attention","in":"query","required":false,"schema":{"description":"Only campaigns needing advertiser action","type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"lifecycle":{"type":"string","enum":["draft","open","cancel_requested","cancelled","completed"]},"archived":{"type":"boolean"},"launchMode":{"type":"string","enum":["review","auto"]},"budgetCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channels":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"statusParts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["neutral","good","warn","bad"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","tone","count"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","tags","lifecycle","archived","launchMode","budgetCents","channels","status","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["campaigns","nextCursor"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create an unfunded draft","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"launchMode":{"type":"string","enum":["review","auto"]},"draft":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}":{"get":{"summary":"Campaign with per-leg review, delivery, funding and settlement state","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Rename or retag (internal metadata; never triggers review)","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"expectedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["expectedVersion"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/draft":{"patch":{"summary":"Save draft fields (version-checked)","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"draft":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"expectedDraftVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"launchMode":{"type":"string","enum":["review","auto"]}},"required":["draft","expectedDraftVersion"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/validate":{"post":{"summary":"Validate the draft (no money, no delivery)","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:validate"],"security":[{"apiKey":["campaigns:validate"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/duplicate":{"post":{"summary":"Duplicate into a new unfunded draft (fresh dates, quote and review)","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/archive":{"post":{"summary":"Archive (finished, cancelled or draft only)","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"archived":{"type":"boolean"}},"required":["archived"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/discard":{"post":{"summary":"Discard an unfunded draft","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/offers":{"post":{"summary":"Issue a 15-minute price offer for the current draft (reserves nothing)","tags":["Funding"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["initial","change"]},"campaignId":{"type":"string"},"currency":{"type":"string","const":"USD"},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"additionalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"issuedAt":{"type":"string"},"expiresAt":{"type":"string","description":"Server-enforced; acceptance after this fails with OFFER_EXPIRED"},"accepted":{"type":"boolean"},"acceptedOperationId":{"type":["string","null"]},"draftVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"legs":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"channelLabel":{"type":"string"},"allocationCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"markupPercent":{"type":"string"},"rate":{"type":"string"},"providerMediaAllowanceUsd":{"type":"string"}},"required":["channel","channelLabel","allocationCents","remainingCents","markupPercent","rate","providerMediaAllowanceUsd"],"additionalProperties":false}},"disclosures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","kind","campaignId","currency","totalCents","additionalCents","issuedAt","expiresAt","accepted","acceptedOperationId","draftVersion","legs","disclosures"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/offers/{id}":{"get":{"summary":"Read an offer","tags":["Funding"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["initial","change"]},"campaignId":{"type":"string"},"currency":{"type":"string","const":"USD"},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"additionalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"issuedAt":{"type":"string"},"expiresAt":{"type":"string","description":"Server-enforced; acceptance after this fails with OFFER_EXPIRED"},"accepted":{"type":"boolean"},"acceptedOperationId":{"type":["string","null"]},"draftVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"legs":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"channelLabel":{"type":"string"},"allocationCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"markupPercent":{"type":"string"},"rate":{"type":"string"},"providerMediaAllowanceUsd":{"type":"string"}},"required":["channel","channelLabel","allocationCents","remainingCents","markupPercent","rate","providerMediaAllowanceUsd"],"additionalProperties":false}},"disclosures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","kind","campaignId","currency","totalCents","additionalCents","issuedAt","expiresAt","accepted","acceptedOperationId","draftVersion","legs","disclosures"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/submit":{"post":{"summary":"Reserve the full budget and submit for review. launchMode \"auto\" additionally requires campaigns:launch.","tags":["Funding"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:reserve"],"security":[{"apiKey":["campaigns:reserve"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"offerId":{"type":"string"},"launchMode":{"type":"string","enum":["review","auto"]},"expectedDraftVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["offerId","expectedDraftVersion"]}}}},"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/launch":{"post":{"summary":"Launch selected approved legs","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:launch"],"security":[{"apiKey":["campaigns:launch"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"legIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["legIds"]}}}},"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/pause":{"post":{"summary":"Pause legs (request; not confirmation of cessation)","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:pause"],"security":[{"apiKey":["campaigns:pause"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"legIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["legIds"]}}}},"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/resume":{"post":{"summary":"Resume paused legs","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:resume"],"security":[{"apiKey":["campaigns:resume"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"legIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["legIds"]}}}},"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/remove-legs":{"post":{"summary":"Remove legs (allocation stays reserved to the campaign)","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:cancel"],"security":[{"apiKey":["campaigns:cancel"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"legIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["legIds"]}}}},"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/cancel":{"post":{"summary":"Cancel the campaign: stop, settle, release unused funds after evidence","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:cancel"],"security":[{"apiKey":["campaigns:cancel"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/changes":{"get":{"summary":"Diff of pending draft changes against running revisions","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/change-offers":{"post":{"summary":"Quote pending changes (reprices all remaining delivery)","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:read"],"security":[{"apiKey":["campaigns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/apply-change":{"post":{"summary":"Apply pending changes under an accepted change offer (increases also need campaigns:reserve)","tags":["Delivery"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:modify_live"],"security":[{"apiKey":["campaigns:modify_live"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"offerId":{"type":"string"},"expectedDraftVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["offerId","expectedDraftVersion"]}}}},"responses":{"202":{"description":"Accepted: durable operation recorded; poll the operation URL","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string","description":"GET this to follow progress"},"campaign":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operationId","status","pollUrl","campaign"],"additionalProperties":false,"description":"Durably accepted. Acceptance is not provider approval or serving; poll the operation."}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/legs/{legId}/review-note":{"post":{"summary":"Add an explanation or evidence note for the policy reviewer of an open case","tags":["Campaigns"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["campaigns:draft"],"security":[{"apiKey":["campaigns:draft"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"legId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}}},"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/campaigns/{id}/operations":{"get":{"summary":"Recent operations on a campaign with per-leg steps","tags":["Operations"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["operations:read","campaigns:read"],"security":[{"apiKey":["operations:read","campaigns:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/operations/{id}":{"get":{"summary":"Operation status with per-leg steps","tags":["Operations"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["operations:read"],"security":[{"apiKey":["operations:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"targetType":{"type":["string","null"]},"targetId":{"type":["string","null"]},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","failed","waiting","skipped"]},"detail":{"type":"string"},"legId":{"type":"string"},"at":{"type":"string"}},"required":["key","label","status"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","status","targetType","targetId","steps","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/balance":{"get":{"summary":"Operational available/reserved funds (no billing data)","tags":["Funding"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["balance:read"],"security":[{"apiKey":["balance:read"]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","const":"USD"},"availableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reservedCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fundingRestricted":{"type":"boolean"},"note":{"type":"string"}},"required":["currency","availableCents","reservedCents","fundingRestricted","note"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/reports":{"get":{"summary":"Performance report (delivery-dated, UTC)","tags":["Reports"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["reports:read"],"security":[{"apiKey":["reports:read"]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","enum":["day","campaign","channel","leg"]}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/reports.csv":{"get":{"summary":"CSV export of all filtered rows","tags":["Reports"],"x-admux-auth":"api_key_or_session","x-admux-scopes":["reports:read"],"security":[{"apiKey":["reports:read"]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","enum":["day","campaign","channel","leg"]}}],"responses":{"200":{"description":"Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}}}}