diff --git a/.changeset/auto-generated-sdk.md b/.changeset/auto-generated-sdk.md new file mode 100644 index 0000000..a85a8ca --- /dev/null +++ b/.changeset/auto-generated-sdk.md @@ -0,0 +1,29 @@ +--- +"scope3": major +--- + +Generate SDK from OpenAPI specifications + +Major refactor to automatically generate TypeScript SDK from OpenAPI specs: + +**New Features:** +- Separate `PlatformClient` and `PartnerClient` for different user types +- Full code generation from OpenAPI YAML files (platform-api, partner-api, outcome-agent) +- Automated schema updates from agentic-api repository with GitHub Actions +- Custom SDK generator script that creates MCP-compatible resource classes + +**Breaking Changes:** +- Removed manual resource files (now auto-generated) +- Removed SimpleMediaAgent (not in use) +- `Scope3AgenticClient` now extends `PlatformClient` (backwards compatible) + +**Infrastructure:** +- Added `scripts/generate-sdk.ts` for SDK generation +- Added `scripts/update-schemas.sh` for automated OpenAPI spec updates +- GitHub workflow for daily automated type updates and PR creation +- Updated build process to use generated types + +**Testing:** +- All 84 tests passing +- Verified with real API calls to production environment +- Both PlatformClient and PartnerClient confirmed working diff --git a/.changeset/remove-legacy-client.md b/.changeset/remove-legacy-client.md new file mode 100644 index 0000000..24483e1 --- /dev/null +++ b/.changeset/remove-legacy-client.md @@ -0,0 +1,28 @@ +--- +"scope3": major +--- + +BREAKING CHANGE: Remove legacy Scope3AgenticClient + +The legacy `Scope3AgenticClient` class has been completely removed. Users must now explicitly choose between: + +- `PlatformClient` - for brand advertisers/buyers managing campaigns and creatives +- `PartnerClient` - for DSPs/publishers/partners managing media buys and products + +**Migration Guide:** + +```typescript +// Before: +import { Scope3AgenticClient } from 'scope3'; +const client = new Scope3AgenticClient({ apiKey: '...' }); + +// After (for brand advertisers): +import { PlatformClient } from 'scope3'; +const client = new PlatformClient({ apiKey: '...' }); + +// After (for media partners): +import { PartnerClient } from 'scope3'; +const client = new PartnerClient({ apiKey: '...' }); +``` + +Both clients have the same configuration options and provide access to the appropriate API resources for their use case. diff --git a/.eslintrc.json b/.eslintrc.json index 1e53a1d..d834af6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "parser": "@typescript-eslint/parser", "extends": [ "eslint:recommended", diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 79c3be2..23dc771 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -30,6 +30,8 @@ jobs: - name: Fetch latest OpenAPI schemas run: npm run update-schemas + env: + GITHUB_TOKEN: ${{ secrets.AGENTIC_API_TOKEN || secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} - name: Check for changes id: git-check diff --git a/README.md b/README.md index bd6a8bc..8beb33f 100644 --- a/README.md +++ b/README.md @@ -23,27 +23,64 @@ npm install scope3 ## Quick Start +The SDK provides two separate clients for different use cases: + +### PlatformClient (for Brand Advertisers/Buyers) + +Use this client if you're a brand advertiser managing campaigns, creatives, and discovering media products. + ```typescript -import { Scope3AgenticClient } from 'scope3'; +import { PlatformClient } from 'scope3'; -const client = new Scope3AgenticClient({ +const platform = new PlatformClient({ apiKey: process.env.SCOPE3_API_KEY, - // Optional: specify environment (defaults to 'production') environment: 'production', // or 'staging' }); // List brand agents -const brandAgents = await client.brandAgents.list(); +const brandAgents = await platform.brandAgents.list(); // Create a campaign -const campaign = await client.campaigns.create({ +const campaign = await platform.campaigns.create({ prompt: 'Create a video campaign targeting tech enthusiasts', - budget: { - amount: 5000000, // $50,000 in cents - currency: 'USD', - pacing: 'even', - }, + brandAgentId: '123', +}); + +// Discover media products +const products = await platform.mediaProducts.discover({ + channels: ['DIGITAL-DISPLAY'], + budget: { min: 10000, max: 50000 }, +}); +``` + +### PartnerClient (for DSPs/Publishers/Sales Agents) + +Use this client if you're a media partner managing tactics, media buys, and products. + +```typescript +import { PartnerClient } from 'scope3'; + +const partner = new PartnerClient({ + apiKey: process.env.SCOPE3_API_KEY, + environment: 'production', // or 'staging' +}); + +// Register a sales agent +const agent = await partner.agents.register({ + name: 'My DSP', + type: 'SALES', + endpointUrl: 'https://my-dsp.com/mcp', }); + +// Create a media buy +const mediaBuy = await partner.mediaBuys.create({ + tacticId: 'tactic_123', + name: 'Q1 Campaign Buy', + budget: { amount: 100000, currency: 'USD' }, +}); + +// Execute media buy +await partner.mediaBuys.execute({ mediaBuyId: mediaBuy.id }); ``` ## CLI Usage @@ -90,8 +127,10 @@ scope3 --environment staging campaign list ## SDK Configuration +Both `PlatformClient` and `PartnerClient` accept the same configuration options: + ```typescript -const client = new Scope3AgenticClient({ +const client = new PlatformClient({ apiKey: 'your-api-key', // Option 1: Use environment (recommended) @@ -102,6 +141,7 @@ const client = new Scope3AgenticClient({ // Optional settings timeout: 30000, // request timeout in ms + debug: false, // enable debug logging }); ``` @@ -112,95 +152,78 @@ const client = new Scope3AgenticClient({ ## API Resources -The client provides access to all Scope3 API resources: - -### Assets -```typescript -await client.assets.upload({ brandAgentId, assets: [...] }); -await client.assets.list({ brandAgentId }); -``` - -### Brand Agents -```typescript -await client.brandAgents.list(); -await client.brandAgents.create({ name: 'My Brand' }); -await client.brandAgents.get({ brandAgentId }); -await client.brandAgents.update({ brandAgentId, name: 'Updated Name' }); -await client.brandAgents.delete({ brandAgentId }); -``` +### PlatformClient Resources -### Campaigns ```typescript -await client.campaigns.list({ status: 'ACTIVE' }); -await client.campaigns.create({ prompt: '...', budget: {...} }); -await client.campaigns.update({ campaignId, status: 'PAUSED' }); -await client.campaigns.getSummary({ campaignId }); -await client.campaigns.listTactics({ campaignId }); -await client.campaigns.delete({ campaignId }); +// Assets +await platform.assets.upload({ brandAgentId, assets: [...] }); +await platform.assets.list({ brandAgentId }); + +// Brand Agents +await platform.brandAgents.list(); +await platform.brandAgents.create({ name: 'My Brand' }); +await platform.brandAgents.get({ brandAgentId }); +await platform.brandAgents.update({ brandAgentId, name: 'Updated Name' }); +await platform.brandAgents.delete({ brandAgentId }); + +// Campaigns +await platform.campaigns.list({ status: 'ACTIVE' }); +await platform.campaigns.create({ prompt: '...', budget: {...} }); +await platform.campaigns.update({ campaignId, status: 'PAUSED' }); +await platform.campaigns.getSummary({ campaignId }); +await platform.campaigns.listTactics({ campaignId }); +await platform.campaigns.delete({ campaignId }); + +// Creatives +await platform.creatives.list({ brandAgentId }); +await platform.creatives.create({ brandAgentId, name: '...' }); +await platform.creatives.assign({ creativeId, campaignId }); + +// Tactics +await platform.tactics.list({ campaignId }); +await platform.tactics.create({ name: '...', campaignId }); +await platform.tactics.update({ tacticId, channelCodes: ['DIGITAL-AUDIO'] }); + +// Other Resources +// - platform.brandStandards - Brand safety standards +// - platform.brandStories - AI-powered audience definitions +// - platform.channels - Advertising channels +// - platform.mediaProducts - Media product discovery +// - platform.targeting - Geographic and demographic targeting ``` -### Creatives -```typescript -await client.creatives.list({ brandAgentId }); -await client.creatives.create({ brandAgentId, name: '...' }); -await client.creatives.assign({ creativeId, campaignId }); -``` +### PartnerClient Resources -### Tactics ```typescript -await client.tactics.list({ campaignId }); -await client.tactics.create({ name: '...', campaignId }); -await client.tactics.update({ tacticId, channelCodes: ['DIGITAL-AUDIO'] }); -``` - -### Media Buys -```typescript -await client.mediaBuys.list({ tacticId }); -await client.mediaBuys.create({ +// Media Buys +await partner.mediaBuys.list({ tacticId }); +await partner.mediaBuys.create({ tacticId, name: '...', products: [{ mediaProductId, salesAgentId }], budget: { amount: 1000000 }, }); -await client.mediaBuys.execute({ mediaBuyId }); -``` - -### Agents -```typescript -// List all agents (sales and outcome) -await client.agents.list(); -await client.agents.list({ type: 'SALES' }); -await client.agents.list({ type: 'OUTCOME' }); +await partner.mediaBuys.execute({ mediaBuyId }); -// Register a new agent -await client.agents.register({ +// Agents (Sales & Outcome) +await partner.agents.list(); +await partner.agents.list({ type: 'SALES' }); +await partner.agents.register({ type: 'SALES', name: '...', endpointUrl: '...', protocol: 'MCP', authenticationType: 'API_KEY', }); +await partner.agents.get({ agentId: '...' }); +await partner.agents.update({ agentId: '...', name: 'Updated Name' }); +await partner.agents.unregister({ agentId: '...' }); -// Get agent details -await client.agents.get({ agentId: '...' }); - -// Update agent -await client.agents.update({ - agentId: '...', - name: 'Updated Name', -}); - -// Unregister agent -await client.agents.unregister({ agentId: '...' }); +// Other Resources +// - partner.products - Media product management +// - partner.webhooks - Webhook configuration ``` -### Other Resources -- `client.brandStandards` - Brand safety standards -- `client.brandStories` - AI-powered audience definitions -- `client.channels` - Advertising channels -- `client.notifications` - System notifications -- `client.products` - Media product management - ## Webhook Server The client includes an optional webhook server for handling AdCP events: diff --git a/examples/basic-usage.ts b/examples/basic-usage.ts index 4aeced4..23b93d6 100644 --- a/examples/basic-usage.ts +++ b/examples/basic-usage.ts @@ -1,7 +1,7 @@ -import { Scope3AgenticClient } from '../src'; +import { PlatformClient } from '../src'; async function main() { - const client = new Scope3AgenticClient({ + const client = new PlatformClient({ apiKey: process.env.SCOPE3_API_KEY || 'your-api-key', }); diff --git a/examples/create-campaign.ts b/examples/create-campaign.ts index d0f3049..0f1f658 100644 --- a/examples/create-campaign.ts +++ b/examples/create-campaign.ts @@ -1,7 +1,7 @@ -import { Scope3AgenticClient } from '../src'; +import { PlatformClient } from '../src'; async function main() { - const client = new Scope3AgenticClient({ + const client = new PlatformClient({ apiKey: process.env.SCOPE3_API_KEY || 'your-api-key', }); diff --git a/outcome-agent-openapi.yaml b/outcome-agent-openapi.yaml new file mode 100644 index 0000000..2bfd1b0 --- /dev/null +++ b/outcome-agent-openapi.yaml @@ -0,0 +1,375 @@ +openapi: 3.0.0 +info: + title: Outcome Agent Protocol + version: 1.0.0 + description: | + Protocol specification for outcome agents to implement on their own infrastructure. + + Outcome agents are autonomous systems that manage tactics and optimize media buying to achieve + campaign outcomes on behalf of advertisers. When you build an outcome agent, you implement + these endpoints on YOUR servers, and Scope3's platform will call them to get proposals, + assign tactics, and send updates. + + This is similar to how sales agents work - you implement the protocol on your infrastructure, + not in Scope3's codebase. + +servers: + - url: https://outcome-agent.yourcompany.com + description: Your outcome agent server (you implement this) + +tags: + - name: Proposals + description: Endpoints Scope3 calls to get your proposals + - name: Tactic Management + description: Endpoints for managing assigned tactics + +paths: + /get-proposals: + post: + tags: [Proposals] + summary: Get proposals from your agent + operationId: get_proposed_tactics + description: | + Scope3 calls this endpoint when setting up a campaign to ask for proposals + from your agent on how you would approach execution. + + Analyze the campaign and respond with proposals, budget capacity, + and your pricing model. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/GetProposalsRequest' + responses: + '200': + description: Proposals from your agent + content: + application/json: + schema: + $ref: '#/components/schemas/GetProposalsResponse' + '400': + description: Invalid request + '500': + description: Internal error + + /accept-proposal: + post: + tags: [Tactic Management] + summary: Accept or decline proposal assignment + operationId: accept_proposal + description: | + Scope3 calls this when your proposal is accepted and you are assigned to manage a tactic. + You should acknowledge and begin setup, or decline if you can't fulfill it. + + The campaign context contains everything you need: budget, schedule, + targeting constraints, creatives, and any custom fields. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AcceptProposalRequest' + responses: + '200': + description: Acknowledgment of tactic assignment + content: + application/json: + schema: + $ref: '#/components/schemas/AcceptProposalResponse' + '400': + description: Invalid request + +components: + securitySchemes: + apiKey: + type: apiKey + in: header + name: X-API-Key + description: API key for authenticating Scope3's requests to your server + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: JWT bearer token for OAuth-based authentication + basic: + type: http + scheme: basic + description: Basic authentication with username/password + + schemas: + BudgetRange: + type: object + description: Budget range for campaign planning (buyer typically won't reveal full budget) + properties: + min: + type: number + description: Minimum budget available + example: 50000 + max: + type: number + description: Maximum budget available + example: 150000 + currency: + type: string + description: Currency for budget (ISO 4217 code) + default: USD + example: USD + + TacticPricing: + type: object + required: + - method + - rate + properties: + method: + type: string + enum: [revshare, cost_per_unit] + description: How the outcome agent charges for this tactic (revshare or cost_per_unit) + example: revshare + rate: + type: number + description: Rate for the pricing method (e.g., 0.15 for 15% revshare, 2.50 for $2.50 CPM) + example: 0.15 + unit: + type: string + enum: [cpm, cpc, cpa, cpv, cpcv] + description: Pricing unit (required when method is cost_per_unit) + example: cpm + currency: + type: string + description: Currency for pricing (ISO 4217 code) + default: USD + example: USD + + CustomField: + type: object + properties: + fieldName: + type: string + description: Name of the custom field + example: targetVCPM + fieldType: + type: string + enum: [string, number, boolean, array, object] + description: Data type of the field + example: number + description: + type: string + description: Help text explaining what this field does + example: Target vCPM in USD + + Product: + type: object + description: Product reference from sales agent + required: + - sales_agent_url + - product_ref + - pricing_option_id + properties: + sales_agent_url: + type: string + description: URL of the sales agent offering this product + example: https://sales-agent.example.com + product_ref: + type: string + description: Product reference ID from the sales agent + example: prod_premium_display + pricing_option_id: + type: string + description: Pricing option ID for this product + example: pricing_opt_123 + + GetProposalsRequest: + type: object + required: + - campaignId + - seatId + properties: + campaignId: + type: string + description: Campaign ID + example: camp_123 + budgetRange: + $ref: '#/components/schemas/BudgetRange' + startDate: + type: string + format: date-time + description: Campaign start date in UTC (ISO 8601 format) + example: '2025-01-01T00:00:00Z' + endDate: + type: string + format: date-time + description: Campaign end date in UTC (ISO 8601 format) + example: '2025-01-31T23:59:59Z' + channels: + type: array + items: + type: string + enum: [display, video, native, audio, connected_tv] + description: Advertising channels (from ADCP specification) + example: [display, video] + countries: + type: array + items: + type: string + description: ISO 3166-1 alpha-2 country codes + example: [US, CA] + brief: + type: string + description: Campaign brief text + example: Launch campaign for new product... + products: + type: array + items: + $ref: '#/components/schemas/Product' + description: Optional product objects to include in proposals (full product details, not just IDs) + propertyListIds: + type: array + items: + type: integer + format: int64 + description: Optional property list IDs for targeting (references Scope3 property lists) + example: [123, 456] + seatId: + type: string + description: Seat/account ID for this request + example: seat_456 + + Proposal: + type: object + required: + - proposalId + - execution + - budgetCapacity + - pricing + properties: + proposalId: + type: string + description: Unique identifier for this proposal (you generate this). The tactic ID will be assigned when the proposal is accepted. + example: premium-vcpm-display + execution: + type: string + description: How you would execute this proposal + example: Target premium inventory at $2.50 vCPM with 85% viewability + budgetCapacity: + type: number + description: Maximum budget you can effectively manage + example: 50000 + pricing: + $ref: '#/components/schemas/TacticPricing' + sku: + type: string + description: Identifier for this tactic type + example: premium-vcpm + customFieldsRequired: + type: array + items: + $ref: '#/components/schemas/CustomField' + description: Custom fields needed to execute this proposal + additional_info: + type: object + description: Generic blob to store additional information about the proposal that will be passed back when accepted + example: { "property_list": ["prop1", "prop2"], "custom_data": "value" } + + GetProposalsResponse: + type: object + properties: + proposals: + type: array + items: + $ref: '#/components/schemas/Proposal' + description: List of proposals you can provide (empty array if none) + + CampaignContext: + type: object + properties: + budget: + type: number + description: Budget allocated + example: 50000 + budgetCurrency: + type: string + description: Currency for budget (ISO 4217 code) + default: USD + example: USD + startDate: + type: string + format: date-time + description: Campaign start date in UTC (ISO 8601 format) + example: '2025-01-01T00:00:00Z' + endDate: + type: string + format: date-time + description: Campaign end date in UTC (ISO 8601 format) + example: '2025-01-31T23:59:59Z' + channel: + type: string + enum: [display, video, native, audio, connected_tv] + description: Advertising channel (from ADCP specification) + example: display + countries: + type: array + items: + type: string + description: Target countries + example: [US] + creatives: + type: array + items: + $ref: '#/components/schemas/Creative' + description: Creative assets to use (uses Creative from main schema) + brandStandards: + type: array + items: + $ref: '#/components/schemas/BrandStandard' + description: Brand safety and suitability requirements (uses BrandStandard from main schema) + + AcceptProposalRequest: + type: object + required: + - tacticId + - campaignContext + - brandAgentId + - seatId + properties: + tacticId: + type: string + description: ID of the tactic from the strategy table (assigned when user accepts your proposal) + example: "12345" + proposalId: + type: string + description: ID of the proposal that was accepted (matches proposalId from GetProposalsResponse) + example: premium-vcpm-display + campaignContext: + $ref: '#/components/schemas/CampaignContext' + brandAgentId: + type: string + description: Brand agent (advertiser) for this campaign + example: ba_123 + seatId: + type: string + description: Seat/account ID + example: seat_456 + customFields: + type: object + description: Custom fields provided by advertiser + example: { targetVCPM: 2.5 } + additional_info: + type: object + description: The additional_info blob that was returned in the proposal response + example: { "property_list": ["prop1", "prop2"], "custom_data": "value" } + + AcceptProposalResponse: + type: object + required: + - acknowledged + properties: + acknowledged: + type: boolean + description: true to accept assignment, false to decline + example: true + reason: + type: string + description: Optional reason if declining + example: Insufficient budget for effective optimization diff --git a/package-lock.json b/package-lock.json index 940ed96..6363644 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,13 @@ { - "name": "@scope3/agentic-client", - "version": "1.0.5", + "name": "scope3", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@scope3/agentic-client", - "version": "1.0.5", + "name": "scope3", + "version": "1.1.0", "license": "MIT", - "workspaces": [ - "packages/*" - ], "dependencies": { "@modelcontextprotocol/sdk": "^1.20.1", "chalk": "^4.1.2", @@ -29,16 +26,19 @@ "@changesets/cli": "^2.29.7", "@types/express": "^4.17.0", "@types/jest": "^29.5.0", + "@types/js-yaml": "^4.0.9", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.0", "husky": "^9.0.0", "jest": "^29.5.0", + "js-yaml": "^4.1.0", "lint-staged": "^15.0.0", "openapi-typescript": "^6.7.0", "prettier": "^3.0.0", "ts-jest": "^29.1.0", + "ts-node": "^10.9.2", "typescript": "^5.3.0" } }, @@ -946,6 +946,30 @@ "node": ">=0.1.90" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", @@ -2074,10 +2098,6 @@ "node": ">= 8" } }, - "node_modules/@scope3/agentic-client": { - "resolved": "", - "link": true - }, "node_modules/@sec-ant/readable-stream": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", @@ -2153,6 +2173,34 @@ "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", "license": "MIT" }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -2300,6 +2348,13 @@ "pretty-format": "^29.0.0" } }, + "node_modules/@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -2643,6 +2698,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2736,6 +2804,13 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -3430,6 +3505,13 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3539,6 +3621,16 @@ "node": ">=8" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -7740,10 +7832,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, - "node_modules/scope3": { - "resolved": "packages/scope3-cli", - "link": true - }, "node_modules/semver": { "version": "7.7.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", @@ -8392,6 +8480,50 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -8587,6 +8719,13 @@ "node": ">= 0.4.0" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -8801,6 +8940,16 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -8847,6 +8996,7 @@ "packages/scope3-cli": { "name": "scope3", "version": "1.0.5", + "extraneous": true, "license": "MIT", "dependencies": { "@scope3/agentic-client": "file:../.." diff --git a/package.json b/package.json index 6516019..dfe801a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "types": "dist/index.d.ts", "files": [ "dist", + "scripts", "README.md", "LICENSE", ".env.example" @@ -14,7 +15,6 @@ "access": "public" }, "bin": { - "simple-media-agent": "dist/simple-media-agent-server.js", "scope3": "dist/cli.js" }, "scripts": { @@ -27,7 +27,9 @@ "generate-outcome-agent-types": "openapi-typescript outcome-agent-openapi.yaml -o src/types/outcome-agent-api.ts", "generate-partner-api-types": "openapi-typescript partner-api.yaml -o src/types/partner-api.ts", "generate-platform-api-types": "openapi-typescript platform-api.yaml -o src/types/platform-api.ts", - "update-schemas": "curl -f -o outcome-agent-openapi.yaml https://raw.githubusercontent.com/scope3data/agentic-api/main/mintlify/outcome-agent-openapi.yaml && curl -f -o partner-api.yaml https://raw.githubusercontent.com/scope3data/agentic-api/main/mintlify/partner-api.yaml && curl -f -o platform-api.yaml https://raw.githubusercontent.com/scope3data/agentic-api/main/mintlify/platform-api.yaml && npm run generate-outcome-agent-types && npm run generate-partner-api-types && npm run generate-platform-api-types", + "generate-sdk": "ts-node scripts/generate-sdk.ts", + "generate-all": "npm run generate-outcome-agent-types && npm run generate-partner-api-types && npm run generate-platform-api-types && npm run generate-sdk", + "update-schemas": "bash scripts/update-schemas.sh", "prepare": "husky", "prepublishOnly": "npm run build", "pretest": "npm run type-check", @@ -67,16 +69,19 @@ "@changesets/cli": "^2.29.7", "@types/express": "^4.17.0", "@types/jest": "^29.5.0", + "@types/js-yaml": "^4.0.9", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.0", "husky": "^9.0.0", "jest": "^29.5.0", + "js-yaml": "^4.1.0", "lint-staged": "^15.0.0", "openapi-typescript": "^6.7.0", "prettier": "^3.0.0", "ts-jest": "^29.1.0", + "ts-node": "^10.9.2", "typescript": "^5.3.0" }, "lint-staged": { diff --git a/partner-api.yaml b/partner-api.yaml new file mode 100644 index 0000000..f74929f --- /dev/null +++ b/partner-api.yaml @@ -0,0 +1,6964 @@ +# This OpenAPI specification is auto-generated from TypeScript Schemas +# DO NOT EDIT THIS FILE MANUALLY +# API Type: PARTNER + +openapi: 3.0.0 +info: + title: Scope3 Partner API + version: 1.0.0 + description: |- + API for partners to register agents, manage tactics and media buys, and configure webhooks. + + This API provides partners with tools to: + - Register and manage sales agents (DSPs, publisher platforms) + - Full CRUD operations for tactics and media buys + - Link tactics to buyer campaigns (read-only campaign access) + - Manage media products and product discovery + - Configure webhooks for event notifications + - Execute media buys and manage placements +servers: + - url: https://api.agentic.scope3.com/mcp + description: Production server + - url: https://api.agentic.staging.scope3.com/mcp + description: Staging server +paths: + /mcp-initialize: + post: + operationId: mcp_initialize + summary: Initialize MCP session + description: >- + Initialize a new MCP session. This must be called before using any tools. The session ID should be generated as + a UUID and included in the mcp-session-id header for all subsequent requests. + tags: + - MCP + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: MCP session identifier (UUID). Generate a new UUID for session initialization. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + jsonrpc: + type: string + enum: + - '2.0' + id: + oneOf: + - type: string + - type: number + method: + type: string + enum: + - initialize + params: + type: object + properties: + protocolVersion: + type: string + example: '2024-11-05' + capabilities: + type: object + clientInfo: + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + required: + - protocolVersion + - capabilities + - clientInfo + required: + - jsonrpc + - id + - method + - params + responses: + '200': + description: Session initialized successfully + content: + application/json: + schema: + type: object + properties: + jsonrpc: + type: string + enum: + - '2.0' + id: + oneOf: + - type: string + - type: number + result: + type: object + properties: + protocolVersion: + type: string + capabilities: + type: object + serverInfo: + type: object + properties: + name: + type: string + version: + type: string + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + /channel-list: + post: + operationId: channel_list + summary: List channels + description: List all available advertising channels and platforms. + tags: + - Channels + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for channel_list + required: true + content: + application/json: + example: + tool: channel_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - channel_list + arguments: + $ref: '#/components/schemas/ListChannelsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/ChannelList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /country-list: + post: + operationId: country_list + summary: List countries + description: Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + tags: + - Targeting + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for country_list + required: true + content: + application/json: + example: + tool: country_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - country_list + arguments: + $ref: '#/components/schemas/ListCountriesInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CountryList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /language-list: + post: + operationId: language_list + summary: List languages + description: Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + tags: + - Targeting + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for language_list + required: true + content: + application/json: + example: + tool: language_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - language_list + arguments: + $ref: '#/components/schemas/ListLanguagesInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/LanguageList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-sync-sales-agents: + post: + operationId: creative_sync_sales_agents + summary: Sync creatives to sales agents + description: Synchronize creatives to connected sales agents (DSPs, publisher platforms). + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_sync_sales_agents + required: true + content: + application/json: + example: + tool: creative_sync_sales_agents + arguments: + creativeId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - creative_sync_sales_agents + arguments: + $ref: '#/components/schemas/SyncSalesAgentsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeSyncSalesAgents' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-create: + post: + operationId: media_buy_create + summary: Create media buy + description: Create a new media buy with budget, targeting, and creative specifications. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_create + required: true + content: + application/json: + example: + tool: media_buy_create + arguments: + tacticId: 100 + agentId: example_id_123 + name: Example Name + products: [] + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_create + arguments: + $ref: '#/components/schemas/CreateMediaBuyInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-update: + post: + operationId: media_buy_update + summary: Update media buy + description: Update an existing media buy with new budget, targeting, or creative assignments. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_update + required: true + content: + application/json: + example: + tool: media_buy_update + arguments: + mediaBuyId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_update + arguments: + $ref: '#/components/schemas/UpdateMediaBuyInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-delete: + post: + operationId: media_buy_delete + summary: Delete media buy + description: Delete a media buy and cancel any active placements. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_delete + required: true + content: + application/json: + example: + tool: media_buy_delete + arguments: + mediaBuyId: example_id_123 + confirm: true + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_delete + arguments: + $ref: '#/components/schemas/DeleteMediaBuyInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-execute: + post: + operationId: media_buy_execute + summary: Execute media buy + description: Execute a media buy, sending it to the configured sales agents for placement. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_execute + required: true + content: + application/json: + example: + tool: media_buy_execute + arguments: + mediaBuyId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_execute + arguments: + $ref: '#/components/schemas/ExecuteMediaBuyInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyExecute' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-get: + post: + operationId: media_buy_get + summary: Get media buy + description: Get detailed information about a specific media buy. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_get + required: true + content: + application/json: + example: + tool: media_buy_get + arguments: + mediaBuyId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_get + arguments: + $ref: '#/components/schemas/GetMediaBuyInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-list: + post: + operationId: media_buy_list + summary: List media buys + description: List all media buys with optional filtering by brand agent, campaign, or status. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_list + required: true + content: + application/json: + example: + tool: media_buy_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_list + arguments: + $ref: '#/components/schemas/ListMediaBuysInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-validate-budget: + post: + operationId: media_buy_validate_budget + summary: Validate media buy budget + description: Validate a media buy budget against campaign constraints and available funds. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_validate_budget + required: true + content: + application/json: + example: + tool: media_buy_validate_budget + arguments: + tacticId: 100 + newBudgetAmount: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_validate_budget + arguments: + $ref: '#/components/schemas/ValidateMediaBuyBudgetInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyValidateBudget' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /notifications-list: + post: + operationId: notifications_list + summary: List notifications + description: List notifications for the authenticated user with optional filtering by status. + tags: + - Notifications + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for notifications_list + required: true + content: + application/json: + example: + tool: notifications_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - notifications_list + arguments: + $ref: '#/components/schemas/ListNotificationsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/NotificationsList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /notifications-mark-read: + post: + operationId: notifications_mark_read + summary: Mark notification as read + description: Mark a specific notification as read. + tags: + - Notifications + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for notifications_mark_read + required: true + content: + application/json: + example: + tool: notifications_mark_read + arguments: + notificationId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - notifications_mark_read + arguments: + $ref: '#/components/schemas/MarkNotificationReadInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/NotificationsMarkRead' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /notifications-mark-acknowledged: + post: + operationId: notifications_mark_acknowledged + summary: Mark notification as acknowledged + description: Mark a specific notification as acknowledged. + tags: + - Notifications + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for notifications_mark_acknowledged + required: true + content: + application/json: + example: + tool: notifications_mark_acknowledged + arguments: + notificationId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - notifications_mark_acknowledged + arguments: + $ref: '#/components/schemas/MarkNotificationAcknowledgedInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/NotificationsMarkAcknowledged' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /notifications-mark-all-read: + post: + operationId: notifications_mark_all_read + summary: Mark all notifications as read + description: Mark all notifications for the authenticated user as read. + tags: + - Notifications + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for notifications_mark_all_read + required: true + content: + application/json: + example: + tool: notifications_mark_all_read + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - notifications_mark_all_read + arguments: + $ref: '#/components/schemas/MarkAllNotificationsReadInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/NotificationsMarkAllRead' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-product-discover: + post: + operationId: media_product_discover + summary: Discover media products + description: Discover available media products from connected sales agents based on targeting criteria. + tags: + - Media Products + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_product_discover + required: true + content: + application/json: + example: + tool: media_product_discover + arguments: + brief: string + brandManifestUrl: https://example.com + schema: + type: object + properties: + tool: + type: string + enum: + - media_product_discover + arguments: + $ref: '#/components/schemas/DiscoverProductsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaProductDiscover' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-product-save: + post: + operationId: media_product_save + summary: Save media product + description: Save a discovered media product for future use in media buys. + tags: + - Media Products + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_product_save + required: true + content: + application/json: + example: + tool: media_product_save + arguments: + productId: example_id_123 + name: Example Name + description: string + publisherId: example_id_123 + publisherName: Example Name + deliveryType: guaranteed + inventoryType: premium + pricingModel: auction + schema: + type: object + properties: + tool: + type: string + enum: + - media_product_save + arguments: + $ref: '#/components/schemas/SaveProductInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaProductSave' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-product-list: + post: + operationId: media_product_list + summary: List media products + description: List saved media products with optional filtering. + tags: + - Media Products + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_product_list + required: true + content: + application/json: + example: + tool: media_product_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - media_product_list + arguments: + $ref: '#/components/schemas/ListProductsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaProductList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-product-sync: + post: + operationId: media_product_sync + summary: Sync media products + description: Synchronize media product catalog from connected sales agents. + tags: + - Media Products + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_product_sync + required: true + content: + application/json: + example: + tool: media_product_sync + arguments: + sourceId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - media_product_sync + arguments: + $ref: '#/components/schemas/SyncProductsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaProductSync' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-get: + post: + operationId: agent_get + summary: Get agent + description: >- + Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the + agent ID. + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_get + required: true + content: + application/json: + example: + tool: agent_get + arguments: + agentId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - agent_get + arguments: + $ref: '#/components/schemas/GetAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentGet' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-list: + post: + operationId: agent_list + summary: List agents + description: >- + List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, + organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_list + required: true + content: + application/json: + example: + tool: agent_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - agent_list + arguments: + $ref: '#/components/schemas/ListAgentsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-register: + post: + operationId: agent_register + summary: Register agent + description: Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_register + required: true + content: + application/json: + example: + tool: agent_register + arguments: + type: SALES + name: Example Name + endpointUrl: https://example.com + protocol: MCP + schema: + type: object + properties: + tool: + type: string + enum: + - agent_register + arguments: + $ref: '#/components/schemas/RegisterAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentRegister' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-unregister: + post: + operationId: agent_unregister + summary: Unregister agent + description: Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_unregister + required: true + content: + application/json: + example: + tool: agent_unregister + arguments: + agentId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - agent_unregister + arguments: + $ref: '#/components/schemas/UnregisterAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentUnregister' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-update: + post: + operationId: agent_update + summary: Update agent + description: Update agent configuration and credentials. Type is automatically inferred from the agent ID. + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_update + required: true + content: + application/json: + example: + tool: agent_update + arguments: + agentId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - agent_update + arguments: + $ref: '#/components/schemas/UpdateAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentUpdate' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-create: + post: + operationId: tactic_create + summary: Create tactic + description: Create a new tactic defining how to achieve campaign objectives. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_create + required: true + content: + application/json: + example: + tool: tactic_create + arguments: + campaignId: example_id_123 + name: Example Name + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_create + arguments: + $ref: '#/components/schemas/CreateTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticCreate' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-update: + post: + operationId: tactic_update + summary: Update tactic + description: Update an existing tactic with new targeting, budget, or creative requirements. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_update + required: true + content: + application/json: + example: + tool: tactic_update + arguments: + tacticId: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_update + arguments: + $ref: '#/components/schemas/UpdateTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-delete: + post: + operationId: tactic_delete + summary: Delete tactic + description: Delete a tactic and all associated media buys. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_delete + required: true + content: + application/json: + example: + tool: tactic_delete + arguments: + tacticId: 100 + confirm: true + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_delete + arguments: + $ref: '#/components/schemas/DeleteTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-get: + post: + operationId: tactic_get + summary: Get tactic + description: Get detailed information about a specific tactic. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_get + required: true + content: + application/json: + example: + tool: tactic_get + arguments: + tacticId: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_get + arguments: + $ref: '#/components/schemas/GetTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-list: + post: + operationId: tactic_list + summary: List tactics + description: List all tactics with optional filtering by brand agent or campaign. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_list + required: true + content: + application/json: + example: + tool: tactic_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_list + arguments: + $ref: '#/components/schemas/ListTacticsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-link-campaign: + post: + operationId: tactic_link_campaign + summary: Link tactic to campaign + description: Link a tactic to a campaign. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_link_campaign + required: true + content: + application/json: + example: + tool: tactic_link_campaign + arguments: + tacticId: 100 + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_link_campaign + arguments: + $ref: '#/components/schemas/LinkCampaignToTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticLinkCampaign' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-unlink-campaign: + post: + operationId: tactic_unlink_campaign + summary: Unlink tactic from campaign + description: Unlink a tactic from a campaign. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_unlink_campaign + required: true + content: + application/json: + example: + tool: tactic_unlink_campaign + arguments: + tacticId: 100 + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_unlink_campaign + arguments: + $ref: '#/components/schemas/UnlinkCampaignFromTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticUnlinkCampaign' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /webhook-register: + post: + operationId: webhook_register + summary: Register webhook + description: Register a webhook to receive real-time notifications about events. + tags: + - Webhooks + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for webhook_register + required: true + content: + application/json: + example: + tool: webhook_register + arguments: + endpoint: + url: https://example.com + method: POST + eventTypes: [] + schema: + type: object + properties: + tool: + type: string + enum: + - webhook_register + arguments: + $ref: '#/components/schemas/RegisterWebhookInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/WebhookRegister' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /webhook-list: + post: + operationId: webhook_list + summary: List webhooks + description: List all registered webhooks. + tags: + - Webhooks + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for webhook_list + required: true + content: + application/json: + example: + tool: webhook_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - webhook_list + arguments: + $ref: '#/components/schemas/ListWebhooksInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/WebhookList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /webhook-delete: + post: + operationId: webhook_delete + summary: Delete webhook + description: Delete a registered webhook. + tags: + - Webhooks + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for webhook_delete + required: true + content: + application/json: + example: + tool: webhook_delete + arguments: + webhookId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - webhook_delete + arguments: + $ref: '#/components/schemas/DeleteWebhookInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/WebhookDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-create: + post: + operationId: service_token_create + summary: Create service token + description: >- + Create a new service token for API authentication. Returns the full token which should be stored securely as it + cannot be retrieved later. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_create + required: true + content: + application/json: + example: + tool: service_token_create + arguments: + name: Example Name + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_create + arguments: + $ref: '#/components/schemas/CreateServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreateServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-list: + post: + operationId: service_token_list + summary: List service tokens + description: List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_list + required: true + content: + application/json: + example: + tool: service_token_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_list + arguments: + $ref: '#/components/schemas/ListServiceTokensInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/ListServiceTokensOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-get: + post: + operationId: service_token_get + summary: Get service token + description: Get detailed information about a specific service token. The secret is never returned. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_get + required: true + content: + application/json: + example: + tool: service_token_get + arguments: + id: '1234567890' + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_get + arguments: + $ref: '#/components/schemas/GetServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/GetServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-update: + post: + operationId: service_token_update + summary: Update service token + description: Update a service token. Only name, description, and expiration can be modified. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_update + required: true + content: + application/json: + example: + tool: service_token_update + arguments: + id: '1234567890' + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_update + arguments: + $ref: '#/components/schemas/UpdateServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/UpdateServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-archive: + post: + operationId: service_token_archive + summary: Archive service token + description: Archive (soft delete) a service token. This immediately invalidates the token for authentication. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_archive + required: true + content: + application/json: + example: + tool: service_token_archive + arguments: + id: '1234567890' + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_archive + arguments: + $ref: '#/components/schemas/ArchiveServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/ArchiveServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /customer-get: + post: + operationId: customer_get + summary: Get customer info + description: Get detailed information about a customer from the core database. + tags: + - Customers + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for customer_get + required: true + content: + application/json: + example: + tool: customer_get + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - customer_get + arguments: + $ref: '#/components/schemas/GetCustomerInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/GetCustomerOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /customer-get-seats: + post: + operationId: customer_get_seats + summary: Get customer seats + description: Get all seats associated with a customer from the core database. + tags: + - Customers + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for customer_get_seats + required: true + content: + application/json: + example: + tool: customer_get_seats + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - customer_get_seats + arguments: + $ref: '#/components/schemas/GetCustomerSeatsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/GetCustomerSeatsOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' +components: + schemas: + ListChannelsInput: + type: object + properties: {} + GetCustomerInput: + type: object + properties: + customerId: + description: >- + The unique identifier of the customer to retrieve. If not provided, uses the authenticated users customer + ID. + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + GetCustomerSeatsInput: + type: object + properties: + customerId: + description: >- + The unique identifier of the customer whose seats to retrieve. If not provided, uses the authenticated users + customer ID. + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + SyncSalesAgentsInput: + type: object + properties: + creativeId: + type: string + example: example_id_123 + required: + - creativeId + ListCountriesInput: + type: object + properties: {} + ListLanguagesInput: + type: object + properties: {} + CreateMediaBuyInput: + type: object + properties: + tacticId: + type: number + example: 100 + agentId: + type: string + example: example_id_123 + name: + type: string + minLength: 1 + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + budgetAmount: + type: number + minimum: 0 + exclusiveMinimum: true + budgetCurrency: + type: string + pricingCpm: + type: number + minimum: 0 + exclusiveMinimum: true + pricingSignalCost: + type: number + displayOrder: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + creatives: + type: array + items: + type: object + properties: + creative_id: + type: string + name: + type: string + format_id: + anyOf: + - type: string + - type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + assets: + type: object + additionalProperties: + type: object + properties: + url: + type: string + width: + type: number + height: + type: number + required: + - url + click_url: + type: string + required: + - creative_id + - name + - format_id + required: + - mediaProductId + - budgetAmount + example: [] + creatives: + type: array + items: + type: object + properties: + creative_id: + type: string + name: + type: string + format_id: + anyOf: + - type: string + - type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + assets: + type: object + additionalProperties: + type: object + properties: + url: + type: string + width: + type: number + height: + type: number + required: + - url + click_url: + type: string + required: + - creative_id + - name + - format_id + example: [] + required: + - tacticId + - agentId + - name + - products + UpdateMediaBuyInput: + type: object + properties: + mediaBuyId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + description: + type: string + example: string + status: + type: string + enum: + - DRAFT + - PENDING_APPROVAL + - ACTIVE + - PAUSED + - COMPLETED + - FAILED + - REJECTED + example: DRAFT + creativeIds: + type: array + items: + type: string + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + creativeIds: + type: array + items: + type: string + required: + - packageId + - creativeIds + example: [] + required: + - mediaBuyId + DeleteMediaBuyInput: + type: object + properties: + mediaBuyId: + type: string + example: example_id_123 + confirm: + type: boolean + example: true + required: + - mediaBuyId + - confirm + ExecuteMediaBuyInput: + type: object + properties: + mediaBuyId: + type: string + example: example_id_123 + required: + - mediaBuyId + GetMediaBuyInput: + type: object + properties: + mediaBuyId: + type: string + example: example_id_123 + required: + - mediaBuyId + ListMediaBuysInput: + type: object + properties: + tacticId: + type: number + example: 100 + status: + type: string + enum: + - DRAFT + - PENDING_APPROVAL + - ACTIVE + - PAUSED + - COMPLETED + - FAILED + - REJECTED + example: DRAFT + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + ValidateMediaBuyBudgetInput: + type: object + properties: + tacticId: + type: number + example: 100 + newBudgetAmount: + type: number + minimum: 0 + exclusiveMinimum: true + example: 100 + required: + - tacticId + - newBudgetAmount + ListNotificationsInput: + type: object + properties: + brandAgentId: + type: number + example: 100 + campaignId: + type: string + example: example_id_123 + creativeId: + type: string + example: example_id_123 + tacticId: + type: string + example: example_id_123 + types: + type: array + items: + type: string + example: [] + unreadOnly: + type: boolean + example: true + limit: + type: number + example: 100 + offset: + type: number + example: 100 + MarkNotificationReadInput: + type: object + properties: + notificationId: + type: string + example: example_id_123 + required: + - notificationId + MarkNotificationAcknowledgedInput: + type: object + properties: + notificationId: + type: string + example: example_id_123 + required: + - notificationId + MarkAllNotificationsReadInput: + type: object + properties: {} + DiscoverProductsInput: + type: object + properties: + brief: + description: >- + Natural language description of campaign requirements (e.g., "Launch $50k luxury electric vehicle awareness + campaign targeting 10M affluent buyers, 60 days, max CPM $15") + type: string + minLength: 1 + example: string + brandManifestUrl: + description: Valid URL for the brand (e.g., company website https://example.com or hosted brand manifest JSON) + type: string + format: uri + example: https://example.com + filters: + description: Structured filters for product discovery + type: object + properties: + deliveryType: + type: string + enum: + - guaranteed + - non_guaranteed + isFixedPrice: + description: Filter for fixed price vs auction products + type: boolean + formatTypes: + description: Filter by format types + type: array + items: + type: string + enum: + - video + - display + - audio + standardFormatsOnly: + description: Only return products accepting IAB standard formats + type: boolean + minExposures: + description: Minimum exposures/impressions needed for measurement validity + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + agentId: + description: 'Optional: Query a specific sales agent by ID. If not provided, queries all active sales agents.' + type: string + example: example_id_123 + saveToDatabase: + description: 'Whether to save discovered products for future use (default: true)' + type: boolean + example: true + required: + - brief + - brandManifestUrl + SaveProductInput: + type: object + properties: + productId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + description: + type: string + example: string + publisherId: + type: string + example: example_id_123 + publisherName: + type: string + example: Example Name + deliveryType: + type: string + enum: + - guaranteed + - non_guaranteed + example: guaranteed + inventoryType: + type: string + enum: + - premium + - run_of_site + - targeted_package + example: premium + creativeFormats: + anyOf: + - type: array + items: + type: string + - type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + pricingModel: + type: string + enum: + - auction + - fixed_cpm + example: auction + fixedCpm: + type: number + minimum: 0 + exclusiveMinimum: true + example: 100 + floorCpm: + type: number + minimum: 0 + exclusiveMinimum: true + example: 100 + targetCpm: + type: number + minimum: 0 + exclusiveMinimum: true + example: 100 + pricingOptions: + type: array + items: + type: object + additionalProperties: {} + example: [] + supportedTargeting: + type: array + items: + type: string + example: [] + adcpAgentId: + type: string + example: example_id_123 + required: + - productId + - name + - description + - publisherId + - publisherName + - deliveryType + - inventoryType + - pricingModel + ListProductsInput: + type: object + properties: + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + SyncProductsInput: + type: object + properties: + sourceId: + type: string + example: example_id_123 + required: + - sourceId + GetAgentInput: + type: object + properties: + agentId: + description: The agent ID to retrieve + type: string + example: example_id_123 + required: + - agentId + ListAgentsInput: + type: object + properties: + type: + description: Filter by agent type (SALES or OUTCOME) + type: string + enum: + - SALES + - OUTCOME + example: SALES + status: + description: Filter by status (PENDING, ACTIVE, DISABLED) + type: string + enum: + - PENDING + - ACTIVE + - DISABLED + example: PENDING + organizationId: + description: Filter by organization ID + type: string + example: example_id_123 + relationship: + description: >- + Filter by relationship (SELF = owned by you, SCOPE3 = Scope3-provided, MARKETPLACE = third-party marketplace + agents) + type: string + enum: + - SELF + - SCOPE3 + - MARKETPLACE + example: SELF + name: + description: Filter by agent name (partial match) + type: string + example: Example Name + RegisterAgentInput: + type: object + properties: + type: + description: The type of agent to register + type: string + enum: + - SALES + - OUTCOME + example: SALES + name: + description: Agent name + type: string + minLength: 1 + example: Example Name + description: + description: Agent description + type: string + example: string + endpointUrl: + description: Agent endpoint URL + type: string + format: uri + example: https://example.com + protocol: + description: Protocol used by the agent (MCP or A2A) + type: string + enum: + - MCP + - A2A + example: MCP + authenticationType: + description: Authentication type + type: string + enum: + - API_KEY + - OAUTH + - NO_AUTH + - JWT + example: API_KEY + organizationId: + description: Organization ID + type: string + example: example_id_123 + auth: + description: Authentication configuration object + anyOf: + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + - type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + - type: object + properties: {} + required: + - type + - name + - endpointUrl + - protocol + UnregisterAgentInput: + type: object + properties: + agentId: + description: The agent ID to unregister + type: string + example: example_id_123 + required: + - agentId + UpdateAgentInput: + type: object + properties: + agentId: + description: The agent ID to update + type: string + example: example_id_123 + name: + description: New agent name + type: string + example: Example Name + description: + description: New agent description + type: string + example: string + endpointUrl: + description: New endpoint URL + type: string + format: uri + example: https://example.com + protocol: + description: New protocol + type: string + enum: + - MCP + - A2A + example: MCP + authenticationType: + description: New authentication type + type: string + enum: + - API_KEY + - OAUTH + - NO_AUTH + - JWT + example: API_KEY + auth: + description: New authentication configuration + anyOf: + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + - type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + - type: object + properties: {} + required: + - agentId + CreateTacticInput: + type: object + properties: + campaignId: + type: string + example: example_id_123 + name: + type: string + minLength: 1 + example: Example Name + prompt: + type: string + example: string + channelCodes: + type: array + items: + type: string + enum: + - ctv + - video + - display + - app + - social + example: [] + countryCodes: + type: array + items: + type: string + example: [] + languages: + description: Language codes + type: array + items: + type: string + example: [] + availableBrandStandards: + type: array + items: + type: object + properties: + id: + type: number + name: + type: string + required: + - id + - name + example: [] + availableBrandStory: + type: array + items: + type: object + properties: + id: + type: number + name: + type: string + required: + - id + - name + example: [] + required: + - campaignId + - name + UpdateTacticInput: + type: object + properties: + tacticId: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + channelCodes: + type: array + items: + type: string + enum: + - ctv + - video + - display + - app + - social + example: [] + countryCodes: + type: array + items: + type: string + example: [] + availableBrandStandards: + type: array + items: + type: object + properties: + id: + type: number + name: + type: string + required: + - id + - name + example: [] + availableBrandStory: + type: array + items: + type: object + properties: + id: + type: number + name: + type: string + required: + - id + - name + example: [] + required: + - tacticId + DeleteTacticInput: + type: object + properties: + tacticId: + type: number + example: 100 + confirm: + type: boolean + example: true + required: + - tacticId + - confirm + GetTacticInput: + type: object + properties: + tacticId: + type: number + example: 100 + required: + - tacticId + ListTacticsInput: + type: object + properties: + campaignId: + type: string + example: example_id_123 + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + LinkCampaignToTacticInput: + type: object + properties: + tacticId: + type: number + example: 100 + campaignId: + type: string + example: example_id_123 + required: + - tacticId + - campaignId + UnlinkCampaignFromTacticInput: + type: object + properties: + tacticId: + type: number + example: 100 + campaignId: + type: string + example: example_id_123 + required: + - tacticId + - campaignId + RegisterWebhookInput: + type: object + properties: + brandAgentId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + endpoint: + type: object + properties: + url: + type: string + format: uri + method: + type: string + enum: + - POST + - PUT + headers: + type: object + additionalProperties: + type: string + authentication: + type: object + properties: + type: + type: string + enum: + - bearer + - basic + - hmac + credentials: + type: string + required: + - type + - credentials + required: + - url + - method + eventTypes: + type: array + items: + type: string + example: [] + filters: + type: object + properties: + campaigns: + type: array + items: + type: string + tactics: + type: array + items: + type: string + creatives: + type: array + items: + type: string + mediaBuys: + type: array + items: + type: string + metrics: + type: array + items: + type: string + minSeverity: + type: string + enum: + - info + - warning + - critical + retryPolicy: + type: object + properties: + maxRetries: + type: integer + minimum: 0 + maximum: 9007199254740991 + backoffMultiplier: + type: number + minimum: 0 + exclusiveMinimum: true + maxBackoffSeconds: + type: number + minimum: 0 + exclusiveMinimum: true + required: + - endpoint + - eventTypes + ListWebhooksInput: + type: object + properties: + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + DeleteWebhookInput: + type: object + properties: + webhookId: + type: string + example: example_id_123 + required: + - webhookId + CreateServiceTokenInput: + type: object + properties: + name: + description: Human-readable name for the service token + type: string + minLength: 1 + example: Example Name + description: + description: Optional description of the token purpose and usage + type: string + example: string + expiresInDays: + description: Number of days until token expiration (max 365). If not provided, token does not expire + type: integer + exclusiveMinimum: true + maximum: 365 + example: 100 + scope: + description: 'Token scope: CUSTOMER (full customer access) or SEAT (scoped to specific seat)' + default: CUSTOMER + type: string + enum: + - CUSTOMER + - SEAT + seatName: + description: Seat name (required when scope is SEAT). The seat will be looked up for the customer. + type: string + minLength: 1 + example: Example Name + required: + - name + UpdateServiceTokenInput: + type: object + properties: + id: + description: The unique identifier of the service token to update + type: integer + format: int64 + example: 100 + name: + description: Updated human-readable name for the service token + type: string + minLength: 1 + example: Example Name + description: + description: Updated description of the token purpose and usage + type: string + example: string + expiresInDays: + description: Number of days to extend expiration from now (max 365). Updates the expiresAt timestamp + type: integer + exclusiveMinimum: true + maximum: 365 + example: 100 + required: + - id + ArchiveServiceTokenInput: + type: object + properties: + id: + description: The unique identifier of the service token to archive + type: integer + format: int64 + example: 100 + required: + - id + GetServiceTokenInput: + type: object + properties: + id: + description: The unique identifier of the service token to retrieve + type: integer + format: int64 + example: 100 + includeSecret: + description: Whether to fetch the access_client_secret from Google Secret Manager. Defaults to false for security + default: false + type: boolean + required: + - id + ListServiceTokensInput: + type: object + properties: + includeArchived: + description: Whether to include archived tokens in the response + default: false + type: boolean + seatId: + description: Filter tokens by seat ID + type: integer + format: int64 + example: 100 + userId: + description: Filter tokens by user ID + type: integer + format: int64 + example: 100 + MediaBuyGet: + type: object + properties: + id: + type: string + example: example_id_123 + tacticId: + type: number + example: 100 + customerId: + type: number + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + required: + - mediaProductId + - salesAgentId + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + example: [] + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + example: [] + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + status: + type: string + example: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - tacticId + - customerId + - name + - pricing + - status + - createdAt + - updatedAt + TacticGet: + type: object + properties: + id: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + campaignIds: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + countryCodes: + type: array + items: + type: string + example: [] + mediaBuyCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - channelCodes + - countryCodes + - createdAt + - updatedAt + MCPContent: + type: object + properties: + type: + type: string + enum: + - text + example: text + text: + type: string + example: string + required: + - type + - text + additionalProperties: false + BadRequest: + description: Bad request error response + type: object + properties: + error: + type: string + example: string + message: + type: string + example: string + required: + - error + additionalProperties: false + Unauthorized: + description: Unauthorized error response + type: object + properties: + error: + type: string + example: string + message: + type: string + example: string + required: + - error + additionalProperties: false + InternalError: + description: Internal server error response + type: object + properties: + error: + type: string + example: string + message: + type: string + example: string + required: + - error + additionalProperties: false + ChannelList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + channel: + type: string + displayName: + type: string + required: + - channel + - displayName + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + GetCustomerOutput: + type: object + properties: + id: + description: Unique identifier for the customer + type: number + example: 100 + company: + description: Company name + type: string + example: string + name: + description: Customer display name + type: string + example: Example Name + active: + description: Whether the customer is currently active + type: boolean + example: true + createdAt: + description: ISO 8601 timestamp when the customer was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - company + - name + - active + - createdAt + additionalProperties: false + GetCustomerSeatsOutput: + type: object + properties: + customerId: + description: The customer ID these seats belong to + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + seats: + description: Array of seats belonging to the customer + type: array + items: + type: object + properties: + id: + description: Unique identifier for the seat + type: string + name: + description: Seat display name + type: string + customerId: + description: Customer ID that owns this seat + type: number + active: + description: Whether the seat is currently active + type: boolean + required: + - id + - name + - customerId + - active + additionalProperties: false + example: [] + count: + description: Total number of seats returned + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - customerId + - seats + - count + additionalProperties: false + CreativeSyncSalesAgents: + type: object + properties: + success: + type: boolean + example: true + creativeId: + type: string + example: example_id_123 + campaignId: + type: string + example: example_id_123 + required: + - success + - creativeId + additionalProperties: false + CountryList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + key: + type: string + displayName: + type: string + required: + - key + - displayName + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + LanguageList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + key: + type: string + displayName: + type: string + required: + - key + - displayName + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + MediaBuyDelete: + type: object + properties: + success: + type: boolean + example: true + id: + type: string + example: example_id_123 + required: + - success + - id + additionalProperties: false + MediaBuyExecute: + type: object + properties: + success: + type: boolean + example: true + mediaBuyId: + type: string + example: example_id_123 + status: + type: string + example: string + adcpMediaBuyId: + type: string + example: example_id_123 + adcpStatus: + type: string + example: string + required: + - success + - mediaBuyId + - status + additionalProperties: false + MediaBuyList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + $ref: '#/components/schemas/MediaBuyGetOutput' + example: [] + required: + - total + - items + additionalProperties: false + MediaBuyValidateBudget: + type: object + properties: + valid: + type: boolean + example: true + message: + type: string + example: string + required: + - valid + additionalProperties: false + NotificationsList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + hasMore: + type: boolean + example: true + items: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + data: + type: object + additionalProperties: {} + read: + type: boolean + acknowledged: + type: boolean + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - type + - data + - read + - acknowledged + - createdAt + additionalProperties: false + example: [] + required: + - total + - hasMore + - items + additionalProperties: false + NotificationsMarkRead: + type: object + properties: + success: + type: boolean + example: true + notificationId: + type: string + example: example_id_123 + required: + - success + - notificationId + additionalProperties: false + NotificationsMarkAcknowledged: + type: object + properties: + success: + type: boolean + example: true + notificationId: + type: string + example: example_id_123 + required: + - success + - notificationId + additionalProperties: false + NotificationsMarkAllRead: + type: object + properties: + success: + type: boolean + example: true + count: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - success + - count + additionalProperties: false + MediaProductDiscover: + type: object + properties: + success: + type: boolean + example: true + productsFound: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + productsSaved: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + successfulAgents: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + failedAgents: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + products: + type: array + items: + type: object + properties: + productId: + type: string + name: + type: string + publisherName: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + deliveryType: + type: string + enum: + - guaranteed + - non_guaranteed + inventoryType: + type: string + enum: + - premium + - run_of_site + - targeted_package + creativeFormats: + anyOf: + - type: array + items: + type: string + - type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + fixedCpm: + type: number + floorCpm: + type: number + targetCpm: + type: number + required: + - productId + - name + - publisherName + - deliveryType + - inventoryType + additionalProperties: false + example: [] + required: + - success + - productsFound + - productsSaved + - successfulAgents + - failedAgents + - products + additionalProperties: false + MediaProductSave: + type: object + properties: + id: + type: string + example: example_id_123 + productId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + publisherId: + type: string + example: example_id_123 + publisherName: + type: string + example: Example Name + customerId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - productId + - name + - publisherId + - publisherName + - customerId + - createdAt + - updatedAt + additionalProperties: false + MediaProductList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + id: + type: string + productId: + type: string + name: + type: string + salesAgent: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + deliveryType: + type: string + enum: + - guaranteed + - non_guaranteed + format: + type: string + creativeFormats: + anyOf: + - type: array + items: + type: string + - type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - id + - productId + - name + - deliveryType + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + MediaProductSync: + type: object + properties: + success: + type: boolean + example: true + productsSaved: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - success + - productsSaved + additionalProperties: false + AgentGet: + anyOf: + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + authenticationType: + type: string + description: + type: string + organizationId: + type: string + registeredBy: + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - authenticationType + - createdAt + - updatedAt + additionalProperties: false + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + authenticationType: + type: string + description: + type: string + organizationId: + type: string + registeredBy: + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + customerAccountCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - authenticationType + - createdAt + - updatedAt + - customerAccountCount + additionalProperties: false + AgentList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + anyOf: + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + additionalProperties: false + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + customerAccountCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - customerAccountCount + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + AgentRegister: + type: object + properties: + agentId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + type: + type: string + enum: + - SALES + - OUTCOME + example: SALES + status: + type: string + example: string + endpointUrl: + type: string + example: https://example.com + required: + - agentId + - name + - type + - status + - endpointUrl + additionalProperties: false + AgentUnregister: + type: object + properties: + success: + type: boolean + example: true + agentId: + type: string + example: example_id_123 + type: + type: string + enum: + - SALES + - OUTCOME + example: SALES + required: + - success + - agentId + - type + additionalProperties: false + AgentUpdate: + type: object + properties: + agentId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + type: + type: string + enum: + - SALES + - OUTCOME + example: SALES + status: + type: string + example: string + required: + - agentId + - name + - type + - status + additionalProperties: false + TacticCreate: + type: object + properties: + id: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + campaignId: + type: string + example: example_id_123 + channelCodes: + type: array + items: + type: string + example: [] + countryCodes: + type: array + items: + type: string + example: [] + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - campaignId + - channelCodes + - countryCodes + - createdAt + additionalProperties: false + TacticDelete: + type: object + properties: + success: + type: boolean + example: true + tacticId: + type: number + example: 100 + required: + - success + - tacticId + additionalProperties: false + TacticList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + $ref: '#/components/schemas/TacticGetOutput' + example: [] + required: + - total + - items + additionalProperties: false + TacticLinkCampaign: + type: object + properties: + success: + type: boolean + example: true + tacticId: + type: number + example: 100 + campaignId: + type: string + example: example_id_123 + required: + - success + - tacticId + - campaignId + additionalProperties: false + TacticUnlinkCampaign: + type: object + properties: + success: + type: boolean + example: true + tacticId: + type: number + example: 100 + campaignId: + type: string + example: example_id_123 + required: + - success + - tacticId + - campaignId + additionalProperties: false + WebhookRegister: + type: object + properties: + id: + type: string + example: example_id_123 + brandAgentId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + endpoint: + type: object + properties: + url: + type: string + method: + type: string + authenticationType: + type: string + required: + - url + - method + additionalProperties: false + eventTypes: + type: array + items: + type: string + example: [] + filters: + type: object + properties: + campaigns: + type: array + items: + type: string + tactics: + type: array + items: + type: string + creatives: + type: array + items: + type: string + mediaBuys: + type: array + items: + type: string + metrics: + type: array + items: + type: string + minSeverity: + type: string + additionalProperties: false + retryPolicy: + type: object + properties: + maxRetries: + type: integer + minimum: 0 + maximum: 9007199254740991 + backoffMultiplier: + type: number + minimum: 0 + exclusiveMinimum: true + maxBackoffSeconds: + type: number + minimum: 0 + exclusiveMinimum: true + required: + - maxRetries + - backoffMultiplier + - maxBackoffSeconds + additionalProperties: false + status: + type: string + example: string + testResult: + type: object + properties: + success: + type: boolean + statusCode: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + error: + type: string + required: + - success + additionalProperties: false + required: + - id + - endpoint + - eventTypes + - retryPolicy + - status + - testResult + additionalProperties: false + WebhookList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + id: + type: string + status: + type: string + endpoint: + type: object + properties: + url: + type: string + method: + type: string + authenticationType: + type: string + required: + - url + - method + additionalProperties: false + eventTypes: + type: array + items: + type: string + brandAgentId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + failureCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + lastSuccess: + nullable: true + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + lastFailure: + nullable: true + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - status + - endpoint + - eventTypes + - failureCount + - createdAt + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + WebhookDelete: + type: object + properties: + success: + type: boolean + example: true + webhookId: + type: string + example: example_id_123 + required: + - success + - webhookId + additionalProperties: false + CreateServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + example: 100 + customerId: + description: Customer ID that owns this token + type: number + example: 100 + seatId: + description: Seat ID if token is scoped to a specific seat + type: integer + format: int64 + example: 100 + userId: + description: User ID if token is scoped to a specific user + type: integer + format: int64 + example: 100 + organizationId: + description: Optional organization identifier for scoping the token + type: string + example: example_id_123 + name: + description: Human-readable name of the token + type: string + example: Example Name + description: + description: Description of the token purpose + type: string + example: string + accessClientId: + description: The public client ID portion of the token credentials (safe to log) + type: string + example: example_id_123 + accessClientSecret: + description: The secret portion of the token credentials. ONLY returned on creation, never retrievable again! + type: string + example: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if set + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + description: ISO 8601 timestamp when the token was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - customerId + - name + - accessClientId + - accessClientSecret + - createdAt + additionalProperties: false + UpdateServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + example: 100 + name: + description: Updated human-readable name of the token + type: string + example: Example Name + description: + description: Updated description of the token purpose + type: string + example: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + description: ISO 8601 timestamp when the token was last updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - updatedAt + additionalProperties: false + ArchiveServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the archived token + type: integer + format: int64 + example: 100 + archivedAt: + description: ISO 8601 timestamp when the token was archived + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - archivedAt + additionalProperties: false + GetServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + example: 100 + customerId: + description: Customer ID that owns this token + type: number + example: 100 + seatId: + description: Seat ID if token is scoped to a specific seat + type: integer + format: int64 + example: 100 + userId: + description: User ID if token is scoped to a specific user + type: integer + format: int64 + example: 100 + organizationId: + description: Optional organization identifier for scoping the token + type: string + example: example_id_123 + name: + description: Human-readable name of the token + type: string + example: Example Name + description: + description: Description of the token purpose + type: string + example: string + accessClientId: + description: The public client ID portion of the token credentials (safe to log) + type: string + example: example_id_123 + accessClientSecret: + description: The secret portion of the token credentials. Only included if includeSecret=true was passed + type: string + example: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if set + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + description: ISO 8601 timestamp when the token was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + description: ISO 8601 timestamp when the token was last updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + description: ISO 8601 timestamp when the token was archived, if archived + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - customerId + - name + - accessClientId + - createdAt + - updatedAt + additionalProperties: false + ListServiceTokensOutput: + type: object + properties: + tokens: + description: 'Array of service tokens. Note: accessClientSecret is never included in list responses' + type: array + items: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + customerId: + description: Customer ID that owns this token + type: number + seatId: + description: Seat ID if token is scoped to a specific seat + type: integer + format: int64 + seatName: + description: Seat name if token is scoped to a specific seat + type: string + userId: + description: User ID if token is scoped to a specific user + type: integer + format: int64 + organizationId: + description: Optional organization identifier for scoping the token + type: string + name: + description: Human-readable name of the token + type: string + description: + description: Description of the token purpose + type: string + accessClientId: + description: The public client ID portion of the token credentials (safe to log) + type: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if set + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + createdAt: + description: ISO 8601 timestamp when the token was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + description: ISO 8601 timestamp when the token was last updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + archivedAt: + description: ISO 8601 timestamp when the token was archived, if archived + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - customerId + - name + - accessClientId + - createdAt + - updatedAt + additionalProperties: false + example: [] + count: + description: Total number of tokens returned + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - tokens + - count + additionalProperties: false + MediaBuyGetOutput: + type: object + properties: + id: + type: string + example: example_id_123 + tacticId: + type: number + example: 100 + customerId: + type: number + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + example: [] + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + example: [] + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false + status: + type: string + example: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - tacticId + - customerId + - name + - pricing + - status + - createdAt + - updatedAt + additionalProperties: false + TacticGetOutput: + type: object + properties: + id: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + campaignIds: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + countryCodes: + type: array + items: + type: string + example: [] + mediaBuyCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - channelCodes + - countryCodes + - createdAt + - updatedAt + additionalProperties: false + MediaBuyCreate: + type: object + properties: + id: + type: string + example: example_id_123 + tacticId: + type: number + example: 100 + customerId: + type: number + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + example: [] + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + example: [] + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false + status: + type: string + example: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - tacticId + - customerId + - name + - pricing + - status + - createdAt + - updatedAt + additionalProperties: false + MediaBuyUpdate: + type: object + properties: + id: + type: string + example: example_id_123 + tacticId: + type: number + example: 100 + customerId: + type: number + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + example: [] + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + example: [] + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false + status: + type: string + example: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - tacticId + - customerId + - name + - pricing + - status + - createdAt + - updatedAt + additionalProperties: false + TacticUpdate: + type: object + properties: + id: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + campaignIds: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + countryCodes: + type: array + items: + type: string + example: [] + mediaBuyCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - channelCodes + - countryCodes + - createdAt + - updatedAt + additionalProperties: false + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/platform-api.yaml b/platform-api.yaml new file mode 100644 index 0000000..5dabd8b --- /dev/null +++ b/platform-api.yaml @@ -0,0 +1,7516 @@ +# This OpenAPI specification is auto-generated from TypeScript Schemas +# DO NOT EDIT THIS FILE MANUALLY +# API Type: BUYER + +openapi: 3.0.0 +info: + title: Scope3 Platform API + version: 1.0.0 + description: |- + API for brand advertisers to manage brand agents, campaigns, creatives, and discover marketplace offerings. + + This API provides buyers with tools to: + - Manage brand agents and campaign briefs + - Create and manage creatives + - Discover and save media products from the marketplace + - View campaigns, tactics, and media buys (read-only) + - Configure brand standards and brand stories +servers: + - url: https://api.agentic.scope3.com/mcp + description: Production server + - url: https://api.agentic.staging.scope3.com/mcp + description: Staging server +paths: + /mcp-initialize: + post: + operationId: mcp_initialize + summary: Initialize MCP session + description: >- + Initialize a new MCP session. This must be called before using any tools. The session ID should be generated as + a UUID and included in the mcp-session-id header for all subsequent requests. + tags: + - MCP + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: MCP session identifier (UUID). Generate a new UUID for session initialization. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + jsonrpc: + type: string + enum: + - '2.0' + id: + oneOf: + - type: string + - type: number + method: + type: string + enum: + - initialize + params: + type: object + properties: + protocolVersion: + type: string + example: '2024-11-05' + capabilities: + type: object + clientInfo: + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + required: + - protocolVersion + - capabilities + - clientInfo + required: + - jsonrpc + - id + - method + - params + responses: + '200': + description: Session initialized successfully + content: + application/json: + schema: + type: object + properties: + jsonrpc: + type: string + enum: + - '2.0' + id: + oneOf: + - type: string + - type: number + result: + type: object + properties: + protocolVersion: + type: string + capabilities: + type: object + serverInfo: + type: object + properties: + name: + type: string + version: + type: string + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + /brand-agent-list: + post: + operationId: brand_agent_list + summary: List brand agents + description: >- + List all brand agents (advertiser accounts) for the authenticated customer. Authentication is automatic - no + parameters required. + tags: + - Brand Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_agent_list + required: true + content: + application/json: + example: + tool: brand_agent_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - brand_agent_list + arguments: + $ref: '#/components/schemas/ListBrandAgentsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandAgentList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-agent-get: + post: + operationId: brand_agent_get + summary: Get brand agent + description: Get detailed information about a specific brand agent (advertiser account) by ID. + tags: + - Brand Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_agent_get + required: true + content: + application/json: + example: + tool: brand_agent_get + arguments: + brandAgentId: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - brand_agent_get + arguments: + $ref: '#/components/schemas/GetBrandAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandAgentUpdateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-agent-create: + post: + operationId: brand_agent_create + summary: Create brand agent + description: >- + Create a new brand agent (advertiser account). This creates the top-level container that will own campaigns, + creatives, audiences, standards, and measurement sources. + tags: + - Brand Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_agent_create + required: true + content: + application/json: + example: + tool: brand_agent_create + arguments: + name: Example Name + schema: + type: object + properties: + tool: + type: string + enum: + - brand_agent_create + arguments: + $ref: '#/components/schemas/CreateBrandAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandAgentUpdateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-agent-update: + post: + operationId: brand_agent_update + summary: Update brand agent + description: Update an existing brand agent with new information. + tags: + - Brand Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_agent_update + required: true + content: + application/json: + example: + tool: brand_agent_update + arguments: + brandAgentId: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - brand_agent_update + arguments: + $ref: '#/components/schemas/UpdateBrandAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandAgentUpdateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-agent-delete: + post: + operationId: brand_agent_delete + summary: Delete brand agent + description: Delete a brand agent. This will also delete all associated campaigns, creatives, and other resources. + tags: + - Brand Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_agent_delete + required: true + content: + application/json: + example: + tool: brand_agent_delete + arguments: + brandAgentId: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - brand_agent_delete + arguments: + $ref: '#/components/schemas/DeleteBrandAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandAgentDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-list: + post: + operationId: campaign_list + summary: List campaigns + description: List all campaigns with optional filtering by brand agent. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_list + required: true + content: + application/json: + example: + tool: campaign_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_list + arguments: + $ref: '#/components/schemas/ListCampaignsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-create: + post: + operationId: campaign_create + summary: Create campaign + description: >- + Create a new campaign with natural language prompt. The backend will parse the prompt to extract targeting, + budget, and creative requirements. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_create + required: true + content: + application/json: + example: + tool: campaign_create + arguments: + brandAgentId: 100 + prompt: string + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_create + arguments: + $ref: '#/components/schemas/CreateCampaignInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignUpdateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-get: + post: + operationId: campaign_get + summary: Get campaign + description: Get detailed information about a specific campaign. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_get + required: true + content: + application/json: + example: + tool: campaign_get + arguments: + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_get + arguments: + $ref: '#/components/schemas/GetCampaignInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignUpdateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-update: + post: + operationId: campaign_update + summary: Update campaign + description: Update an existing campaign with new information. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_update + required: true + content: + application/json: + example: + tool: campaign_update + arguments: + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_update + arguments: + $ref: '#/components/schemas/UpdateCampaignInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignUpdateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-delete: + post: + operationId: campaign_delete + summary: Delete campaign + description: Delete a campaign and all associated resources. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_delete + required: true + content: + application/json: + example: + tool: campaign_delete + arguments: + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_delete + arguments: + $ref: '#/components/schemas/DeleteCampaignInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-get-summary: + post: + operationId: campaign_get_summary + summary: Get campaign summary + description: Get a high-level summary of a campaign including key metrics and status. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_get_summary + required: true + content: + application/json: + example: + tool: campaign_get_summary + arguments: + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_get_summary + arguments: + $ref: '#/components/schemas/GetCampaignSummaryInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignGetSummary' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-list-tactics: + post: + operationId: campaign_list_tactics + summary: List campaign tactics + description: List all tactics associated with a specific campaign. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_list_tactics + required: true + content: + application/json: + example: + tool: campaign_list_tactics + arguments: + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_list_tactics + arguments: + $ref: '#/components/schemas/ListCampaignTacticsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignListTactics' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /campaign-validate-brief: + post: + operationId: campaign_validate_brief + summary: Validate campaign brief + description: Validate a campaign brief to ensure it contains all necessary information for campaign creation. + tags: + - Campaigns + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for campaign_validate_brief + required: true + content: + application/json: + example: + tool: campaign_validate_brief + arguments: + brief: string + schema: + type: object + properties: + tool: + type: string + enum: + - campaign_validate_brief + arguments: + $ref: '#/components/schemas/ValidateBriefInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CampaignValidateBrief' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /asset-list: + post: + operationId: asset_list + summary: List assets + description: List all uploaded assets with optional filtering by brand agent. + tags: + - Assets + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for asset_list + required: true + content: + application/json: + example: + tool: asset_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - asset_list + arguments: + $ref: '#/components/schemas/ListAssetsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AssetList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-standards-create: + post: + operationId: brand_standards_create + summary: Create brand standards + description: >- + Create brand standards including guidelines, tone of voice, visual requirements, and content rules for a brand + agent. + tags: + - Brand Standards + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_standards_create + required: true + content: + application/json: + example: + tool: brand_standards_create + arguments: + brandAgentId: 100 + prompt: string + schema: + type: object + properties: + tool: + type: string + enum: + - brand_standards_create + arguments: + $ref: '#/components/schemas/CreateBrandStandardInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStandardsCreateOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-standards-delete: + post: + operationId: brand_standards_delete + summary: Delete brand standards + description: Delete brand standards for a brand agent. + tags: + - Brand Standards + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_standards_delete + required: true + content: + application/json: + example: + tool: brand_standards_delete + arguments: + brandStandardId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - brand_standards_delete + arguments: + $ref: '#/components/schemas/DeleteBrandStandardInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStandardsDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-standards-list: + post: + operationId: brand_standards_list + summary: List brand standards + description: List all brand standards with optional filtering by brand agent. + tags: + - Brand Standards + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_standards_list + required: true + content: + application/json: + example: + tool: brand_standards_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - brand_standards_list + arguments: + $ref: '#/components/schemas/ListBrandStandardsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStandardsList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-story-create: + post: + operationId: brand_story_create + summary: Create brand story + description: Create a brand story containing the narrative, history, values, and key messaging for a brand agent. + tags: + - Brand Stories + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_story_create + required: true + content: + application/json: + example: + tool: brand_story_create + arguments: + brandAgentId: null + name: Example Name + languages: [] + schema: + type: object + properties: + tool: + type: string + enum: + - brand_story_create + arguments: + $ref: '#/components/schemas/CreateBrandStoryInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStoryCreate' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-story-update: + post: + operationId: brand_story_update + summary: Update brand story + description: Update an existing brand story with new information. + tags: + - Brand Stories + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_story_update + required: true + content: + application/json: + example: + tool: brand_story_update + arguments: + brandStoryId: example_id_123 + prompt: string + schema: + type: object + properties: + tool: + type: string + enum: + - brand_story_update + arguments: + $ref: '#/components/schemas/UpdateBrandStoryInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStoryUpdate' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-story-delete: + post: + operationId: brand_story_delete + summary: Delete brand story + description: Delete a brand story. + tags: + - Brand Stories + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_story_delete + required: true + content: + application/json: + example: + tool: brand_story_delete + arguments: + brandStoryId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - brand_story_delete + arguments: + $ref: '#/components/schemas/DeleteBrandStoryInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStoryDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /brand-story-list: + post: + operationId: brand_story_list + summary: List brand stories + description: List all brand stories with optional filtering by brand agent. + tags: + - Brand Stories + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for brand_story_list + required: true + content: + application/json: + example: + tool: brand_story_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - brand_story_list + arguments: + $ref: '#/components/schemas/ListBrandStoriesInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/BrandStoryList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /channel-list: + post: + operationId: channel_list + summary: List channels + description: List all available advertising channels and platforms. + tags: + - Channels + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for channel_list + required: true + content: + application/json: + example: + tool: channel_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - channel_list + arguments: + $ref: '#/components/schemas/ListChannelsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/ChannelList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /country-list: + post: + operationId: country_list + summary: List countries + description: Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + tags: + - Targeting + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for country_list + required: true + content: + application/json: + example: + tool: country_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - country_list + arguments: + $ref: '#/components/schemas/ListCountriesInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CountryList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /language-list: + post: + operationId: language_list + summary: List languages + description: Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + tags: + - Targeting + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for language_list + required: true + content: + application/json: + example: + tool: language_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - language_list + arguments: + $ref: '#/components/schemas/ListLanguagesInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/LanguageList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-assign: + post: + operationId: creative_assign + summary: Assign creative + description: Assign a creative to a tactic or media buy. + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_assign + required: true + content: + application/json: + example: + tool: creative_assign + arguments: + creativeId: example_id_123 + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - creative_assign + arguments: + $ref: '#/components/schemas/AssignCreativeInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeAssign' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-create: + post: + operationId: creative_create + summary: Create creative + description: Create a new creative with assets, copy, and targeting specifications. + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_create + required: true + content: + application/json: + example: + tool: creative_create + arguments: + brandAgentId: 100 + name: Example Name + schema: + type: object + properties: + tool: + type: string + enum: + - creative_create + arguments: + $ref: '#/components/schemas/CreateCreativeInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-update: + post: + operationId: creative_update + summary: Update creative + description: Update an existing creative with new assets, copy, or specifications. + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_update + required: true + content: + application/json: + example: + tool: creative_update + arguments: + creativeId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - creative_update + arguments: + $ref: '#/components/schemas/UpdateCreativeInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-delete: + post: + operationId: creative_delete + summary: Delete creative + description: Delete a creative and remove it from any associated tactics or media buys. + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_delete + required: true + content: + application/json: + example: + tool: creative_delete + arguments: + creativeId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - creative_delete + arguments: + $ref: '#/components/schemas/DeleteCreativeInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-get: + post: + operationId: creative_get + summary: Get creative + description: Get detailed information about a specific creative. + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_get + required: true + content: + application/json: + example: + tool: creative_get + arguments: + creativeId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - creative_get + arguments: + $ref: '#/components/schemas/GetCreativeInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /creative-list: + post: + operationId: creative_list + summary: List creatives + description: List all creatives with optional filtering by brand agent or campaign. + tags: + - Creatives + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for creative_list + required: true + content: + application/json: + example: + tool: creative_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - creative_list + arguments: + $ref: '#/components/schemas/ListCreativesInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreativeList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-get: + post: + operationId: media_buy_get + summary: Get media buy + description: Get detailed information about a specific media buy. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_get + required: true + content: + application/json: + example: + tool: media_buy_get + arguments: + mediaBuyId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_get + arguments: + $ref: '#/components/schemas/GetMediaBuyInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-buy-list: + post: + operationId: media_buy_list + summary: List media buys + description: List all media buys with optional filtering by brand agent, campaign, or status. + tags: + - Media Buys + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_buy_list + required: true + content: + application/json: + example: + tool: media_buy_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - media_buy_list + arguments: + $ref: '#/components/schemas/ListMediaBuysInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaBuyList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /media-product-list: + post: + operationId: media_product_list + summary: List media products + description: List saved media products with optional filtering. + tags: + - Media Products + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for media_product_list + required: true + content: + application/json: + example: + tool: media_product_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - media_product_list + arguments: + $ref: '#/components/schemas/ListProductsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/MediaProductList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-get: + post: + operationId: agent_get + summary: Get agent + description: >- + Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the + agent ID. + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_get + required: true + content: + application/json: + example: + tool: agent_get + arguments: + agentId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - agent_get + arguments: + $ref: '#/components/schemas/GetAgentInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentGet' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /agent-list: + post: + operationId: agent_list + summary: List agents + description: >- + List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, + organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + tags: + - Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for agent_list + required: true + content: + application/json: + example: + tool: agent_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - agent_list + arguments: + $ref: '#/components/schemas/ListAgentsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/AgentList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-get: + post: + operationId: tactic_get + summary: Get tactic + description: Get detailed information about a specific tactic. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_get + required: true + content: + application/json: + example: + tool: tactic_get + arguments: + tacticId: 100 + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_get + arguments: + $ref: '#/components/schemas/GetTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticGetOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-list: + post: + operationId: tactic_list + summary: List tactics + description: List all tactics with optional filtering by brand agent or campaign. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for tactic_list + required: true + content: + application/json: + example: + tool: tactic_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_list + arguments: + $ref: '#/components/schemas/ListTacticsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /outcomes-agent-get-proposals: + post: + operationId: outcomes_agent_get_proposals + summary: Get proposals from outcome agents + description: >- + Request tactical proposals from outcome agents for a campaign. Outcome agents analyze the campaign brief and + budget to propose execution strategies. + tags: + - Outcome Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for outcomes_agent_get_proposals + required: true + content: + application/json: + example: + tool: outcomes_agent_get_proposals + arguments: + campaignId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - outcomes_agent_get_proposals + arguments: + $ref: '#/components/schemas/OutcomesAgentGetProposalsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/OutcomesAgentGetProposals' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /outcomes-agent-accept-proposal: + post: + operationId: outcomes_agent_accept_proposal + summary: Accept outcome agent proposal + description: Accept a proposal from an outcome agent, creating a tactic and assigning it to the agent for management. + tags: + - Outcome Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for outcomes_agent_accept_proposal + required: true + content: + application/json: + example: + tool: outcomes_agent_accept_proposal + arguments: + proposalId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - outcomes_agent_accept_proposal + arguments: + $ref: '#/components/schemas/OutcomesAgentAcceptProposalInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/OutcomesAgentAcceptProposal' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /outcomes-agent-list-tactics: + post: + operationId: outcomes_agent_list_tactics + summary: List tactics by outcome agent + description: List all tactics managed by a specific outcome agent. + tags: + - Outcome Agents + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for outcomes_agent_list_tactics + required: true + content: + application/json: + example: + tool: outcomes_agent_list_tactics + arguments: + outcomeAgentId: example_id_123 + schema: + type: object + properties: + tool: + type: string + enum: + - outcomes_agent_list_tactics + arguments: + $ref: '#/components/schemas/OutcomesAgentListTacticsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/OutcomesAgentListTactics' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-create: + post: + operationId: service_token_create + summary: Create service token + description: >- + Create a new service token for API authentication. Returns the full token which should be stored securely as it + cannot be retrieved later. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_create + required: true + content: + application/json: + example: + tool: service_token_create + arguments: + name: Example Name + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_create + arguments: + $ref: '#/components/schemas/CreateServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/CreateServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-list: + post: + operationId: service_token_list + summary: List service tokens + description: List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_list + required: true + content: + application/json: + example: + tool: service_token_list + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_list + arguments: + $ref: '#/components/schemas/ListServiceTokensInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/ListServiceTokensOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-get: + post: + operationId: service_token_get + summary: Get service token + description: Get detailed information about a specific service token. The secret is never returned. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_get + required: true + content: + application/json: + example: + tool: service_token_get + arguments: + id: '1234567890' + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_get + arguments: + $ref: '#/components/schemas/GetServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/GetServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-update: + post: + operationId: service_token_update + summary: Update service token + description: Update a service token. Only name, description, and expiration can be modified. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_update + required: true + content: + application/json: + example: + tool: service_token_update + arguments: + id: '1234567890' + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_update + arguments: + $ref: '#/components/schemas/UpdateServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/UpdateServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /service-token-archive: + post: + operationId: service_token_archive + summary: Archive service token + description: Archive (soft delete) a service token. This immediately invalidates the token for authentication. + tags: + - Service Tokens + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for service_token_archive + required: true + content: + application/json: + example: + tool: service_token_archive + arguments: + id: '1234567890' + schema: + type: object + properties: + tool: + type: string + enum: + - service_token_archive + arguments: + $ref: '#/components/schemas/ArchiveServiceTokenInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/ArchiveServiceTokenOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /customer-get: + post: + operationId: customer_get + summary: Get customer info + description: Get detailed information about a customer from the core database. + tags: + - Customers + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for customer_get + required: true + content: + application/json: + example: + tool: customer_get + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - customer_get + arguments: + $ref: '#/components/schemas/GetCustomerInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/GetCustomerOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /customer-get-seats: + post: + operationId: customer_get_seats + summary: Get customer seats + description: Get all seats associated with a customer from the core database. + tags: + - Customers + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + description: Request body for customer_get_seats + required: true + content: + application/json: + example: + tool: customer_get_seats + arguments: {} + schema: + type: object + properties: + tool: + type: string + enum: + - customer_get_seats + arguments: + $ref: '#/components/schemas/GetCustomerSeatsInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/GetCustomerSeatsOutput' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' +components: + schemas: + BudgetRange: + description: Budget range for campaign planning + type: object + properties: + min: + description: Minimum budget available + example: 50000 + type: number + minimum: 0 + exclusiveMinimum: true + max: + description: Maximum budget available + example: 150000 + type: number + minimum: 0 + exclusiveMinimum: true + currency: + description: Currency for budget (ISO 4217 code) + example: USD + default: USD + type: string + minLength: 3 + maxLength: 3 + required: + - min + - max + ProposalCard: + description: Visual card data for rendering proposals in marketplace UI, following ADCP product card pattern + type: object + properties: + title: + description: Proposal name/title + example: Premium Display Campaign + type: string + description: + description: What the proposal offers + example: Target premium inventory at $2.50 vCPM with 85% viewability guarantee + type: string + image_carousel: + description: Optional array of image URLs showcasing the approach + example: + - https://example.com/chart1.png + - https://example.com/viz2.png + type: array + items: + type: string + format: uri + details: + description: Markdown-formatted detailed execution plan and specifications + example: |- + ## Execution Strategy + + We will target... + type: string + pricing_summary: + description: Pricing information for comparison + type: object + properties: + method: + description: Human-readable pricing method + example: 15% revenue share + type: string + budget_capacity: + description: Human-readable budget capacity + example: $50,000 maximum + type: string + estimated_cost: + description: Optional estimated cost calculation + example: $7,500 estimated fee + type: string + required: + - method + - budget_capacity + required: + - title + - description + - pricing_summary + ListAssetsInput: + type: object + properties: + brandAgentId: + description: Optional brand agent ID to filter assets + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + ListBrandAgentsInput: + description: Parameters for listing brand agents. Authentication is automatic. + type: object + properties: + where: + description: Prisma-style where clause for filtering agents + type: object + additionalProperties: {} + orderBy: + description: Prisma-style orderBy clause + type: object + additionalProperties: {} + take: + description: Number of records to return + example: 10 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + skip: + description: Number of records to skip + example: 0 + type: integer + minimum: 0 + maximum: 9007199254740991 + distinct: + description: Fields to use for distinct selection + type: array + items: + type: string + example: [] + GetBrandAgentInput: + description: Parameters for retrieving a specific brand agent + type: object + properties: + brandAgentId: + description: The unique identifier for the brand agent + example: 123 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + required: + - brandAgentId + CreateBrandAgentInput: + description: Parameters for creating a new brand agent + type: object + properties: + name: + description: Name of the brand agent (advertiser account) + example: Nike Global Campaigns + type: string + minLength: 1 + maxLength: 255 + description: + description: Optional description of the brand agent + example: Brand agent for Nike global advertising campaigns + type: string + maxLength: 1000 + manifestUrl: + description: URL to the brand manifest + example: https://example.com/brand-manifest + type: string + format: uri + countryCodes: + description: Country codes (ISO 3166-1 alpha-2) + example: + - US + - CA + - GB + type: array + items: + type: string + minLength: 2 + maxLength: 2 + required: + - name + UpdateBrandAgentInput: + description: Parameters for updating a brand agent + type: object + properties: + brandAgentId: + description: The unique identifier for the brand agent + example: 123 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + name: + description: Updated name of the brand agent + type: string + minLength: 1 + maxLength: 255 + example: Example Name + description: + description: Updated description + type: string + maxLength: 1000 + example: string + manifestUrl: + description: Updated URL to the brand manifest + example: https://example.com/brand-manifest + type: string + format: uri + countryCodes: + description: Updated country codes + type: array + items: + type: string + minLength: 2 + maxLength: 2 + example: [] + required: + - brandAgentId + DeleteBrandAgentInput: + description: Parameters for deleting a brand agent + type: object + properties: + brandAgentId: + description: The unique identifier for the brand agent to delete + example: 123 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + required: + - brandAgentId + CreateBrandStandardInput: + type: object + properties: + brandAgentId: + description: Brand agent ID + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + name: + description: Standard name + type: string + minLength: 1 + maxLength: 255 + example: Example Name + description: + description: Standard description + type: string + example: string + prompt: + description: Brand standards prompt + type: string + minLength: 1 + example: string + isPrimary: + description: Whether this is the primary standard + type: boolean + example: true + countries: + description: Country codes + type: array + items: + type: string + example: [] + channels: + description: Channel types + type: array + items: + type: string + enum: + - ctv + - video + - display + - app + - social + example: [] + brands: + description: Brand names + type: array + items: + type: string + example: [] + required: + - brandAgentId + - prompt + DeleteBrandStandardInput: + type: object + properties: + brandStandardId: + description: Brand standard ID + type: string + example: example_id_123 + required: + - brandStandardId + ListBrandStandardsInput: + type: object + properties: + brandAgentId: + description: Optional brand agent ID to filter brand standards by + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + where: + description: Prisma-style where clause for filtering standards + type: object + additionalProperties: {} + orderBy: + description: Prisma-style orderBy clause + type: object + additionalProperties: {} + take: + description: Number of records to return + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + description: Number of records to skip + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + distinct: + description: Fields to use for distinct selection + type: array + items: + type: string + example: [] + CreateBrandStoryInput: + type: object + properties: + brandAgentId: + description: Brand agent ID (bigint or string) + anyOf: + - type: integer + format: int64 + - type: string + name: + description: Story name + type: string + minLength: 1 + maxLength: 255 + example: Example Name + prompt: + description: Brand story prompt + type: string + example: string + brands: + description: Brand names + type: array + items: + type: string + example: [] + languages: + description: Language codes (use language_list tool to see available options) + type: array + items: + type: string + example: [] + required: + - brandAgentId + - name + - languages + UpdateBrandStoryInput: + type: object + properties: + brandStoryId: + description: Brand story ID + type: string + example: example_id_123 + name: + description: Story name + type: string + example: Example Name + prompt: + description: Updated brand story prompt + type: string + minLength: 1 + example: string + required: + - brandStoryId + - prompt + DeleteBrandStoryInput: + type: object + properties: + brandStoryId: + description: Brand story ID + type: string + example: example_id_123 + required: + - brandStoryId + ListBrandStoriesInput: + type: object + properties: + brandAgentId: + description: Optional brand agent ID to filter brand stories by + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + where: + description: Filtering criteria + type: object + additionalProperties: {} + orderBy: + description: Ordering criteria + type: object + additionalProperties: {} + take: + description: Number of records to return + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + description: Number of records to skip + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + distinct: + description: Fields to use for distinct selection + type: array + items: + type: string + example: [] + ListCampaignsInput: + description: Parameters for listing campaigns + type: object + properties: + brandAgentId: + description: Filter by brand agent ID + example: 123 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + status: + description: Filter by campaign status + type: string + enum: + - ACTIVE + - PAUSED + - ARCHIVED + - DRAFT + example: ACTIVE + limit: + description: Number of results to return + example: 50 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + offset: + description: Number of results to skip for pagination + example: 0 + type: integer + minimum: 0 + maximum: 9007199254740991 + CreateCampaignInput: + description: Parameters for creating a new campaign + type: object + properties: + brandAgentId: + description: Brand agent ID that will own this campaign + example: 123 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + name: + description: Optional name for the campaign (auto-generated if not provided) + example: Summer 2025 Tech Campaign + type: string + minLength: 1 + maxLength: 255 + prompt: + description: >- + Natural language description of campaign requirements. The backend will parse this to extract targeting, + budget, and creative requirements. + example: Create a video campaign targeting tech enthusiasts aged 25-45 with $50k budget + type: string + minLength: 10 + budget: + description: Budget configuration for the campaign + type: object + properties: + total: + type: number + minimum: 0 + exclusiveMinimum: true + currency: + default: USD + type: string + minLength: 3 + maxLength: 3 + dailyCap: + type: number + minimum: 0 + exclusiveMinimum: true + pacing: + type: string + enum: + - EVEN + - ASAP + - FRONTLOADED + required: + - total + startDate: + description: Campaign start date (ISO 8601 format) + example: '2025-01-15T00:00:00Z' + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + endDate: + description: Campaign end date (ISO 8601 format) + example: '2025-03-31T23:59:59Z' + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + scoringWeights: + description: Scoring weights for campaign optimization + type: object + properties: + affinity: + type: number + minimum: 0 + maximum: 1 + outcome: + type: number + minimum: 0 + maximum: 1 + quality: + type: number + minimum: 0 + maximum: 1 + outcomeScoreWindowDays: + description: Number of days for outcome measurement window + example: 30 + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + status: + description: Initial campaign status + type: string + enum: + - ACTIVE + - PAUSED + - ARCHIVED + - DRAFT + example: ACTIVE + required: + - brandAgentId + - prompt + GetCampaignInput: + description: Parameters for retrieving a specific campaign + type: object + properties: + campaignId: + description: The unique identifier for the campaign + example: cmp_987654321 + type: string + minLength: 1 + required: + - campaignId + UpdateCampaignInput: + description: Parameters for updating a campaign + type: object + properties: + campaignId: + description: The unique identifier for the campaign + example: cmp_987654321 + type: string + minLength: 1 + name: + description: Updated campaign name + type: string + minLength: 1 + maxLength: 255 + example: Example Name + prompt: + description: Updated campaign prompt + type: string + minLength: 10 + example: string + budget: + description: Updated budget configuration + type: object + properties: + total: + type: number + minimum: 0 + exclusiveMinimum: true + currency: + default: USD + type: string + minLength: 3 + maxLength: 3 + dailyCap: + type: number + minimum: 0 + exclusiveMinimum: true + pacing: + type: string + enum: + - EVEN + - ASAP + - FRONTLOADED + startDate: + description: Updated start date + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + endDate: + description: Updated end date + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + scoringWeights: + description: Updated scoring weights + type: object + properties: + affinity: + type: number + minimum: 0 + maximum: 1 + outcome: + type: number + minimum: 0 + maximum: 1 + quality: + type: number + minimum: 0 + maximum: 1 + outcomeScoreWindowDays: + description: Updated outcome score window days + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + status: + description: Updated campaign status + type: string + enum: + - ACTIVE + - PAUSED + - ARCHIVED + - DRAFT + example: ACTIVE + required: + - campaignId + DeleteCampaignInput: + description: Parameters for deleting a campaign + type: object + properties: + campaignId: + description: The unique identifier for the campaign to delete + example: cmp_987654321 + type: string + minLength: 1 + hardDelete: + description: 'If true, permanently delete the campaign. Default: false (soft delete/archive)' + type: boolean + example: true + required: + - campaignId + GetCampaignSummaryInput: + type: object + properties: + campaignId: + description: Campaign ID + type: string + example: example_id_123 + required: + - campaignId + ListCampaignTacticsInput: + type: object + properties: + campaignId: + description: Campaign ID + type: string + example: example_id_123 + required: + - campaignId + ValidateBriefInput: + type: object + properties: + brief: + description: Campaign brief text + type: string + minLength: 10 + example: string + required: + - brief + ListChannelsInput: + type: object + properties: {} + GetCustomerInput: + type: object + properties: + customerId: + description: >- + The unique identifier of the customer to retrieve. If not provided, uses the authenticated users customer + ID. + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + GetCustomerSeatsInput: + type: object + properties: + customerId: + description: >- + The unique identifier of the customer whose seats to retrieve. If not provided, uses the authenticated users + customer ID. + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + AssignCreativeInput: + type: object + properties: + creativeId: + type: string + example: example_id_123 + campaignId: + type: string + example: example_id_123 + required: + - creativeId + - campaignId + CreateCreativeInput: + type: object + properties: + brandAgentId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + organizationId: + type: string + example: example_id_123 + name: + type: string + minLength: 1 + maxLength: 255 + example: Example Name + description: + type: string + example: string + formatSource: + type: string + enum: + - ADCP + - CREATIVE_AGENT + - PUBLISHER + example: ADCP + formatId: + description: >- + Format identifier. For ADCP sources, this should be a format ID string recognized by the target sales agent + (e.g., display_300x250, video_1920x1080). Valid formats are agent-specific. + type: string + example: example_id_123 + mediaUrl: + type: string + example: https://example.com + assets: + description: >- + Optional: Upload assets inline with the creative. Each asset requires: name, contentType, data (base64), and + assetType. + type: array + items: + type: object + properties: + name: + description: Filename (e.g., banner.png) + type: string + contentType: + description: MIME type (e.g., image/png, image/jpeg) + type: string + data: + description: Base64-encoded file data (without data:image/png;base64, prefix) + format: byte + type: string + assetType: + description: Type of asset + type: string + enum: + - image + - video + - audio + - logo + - font + tags: + description: Optional tags + type: array + items: + type: string + required: + - name + - contentType + - data + - assetType + example: [] + content: + type: object + additionalProperties: {} + assemblyMethod: + type: string + enum: + - CREATIVE_AGENT + - ACTIVATION + - PUBLISHER + example: CREATIVE_AGENT + campaignId: + description: Optional campaign ID (object ID) to assign creative to + type: string + example: example_id_123 + required: + - brandAgentId + - name + UpdateCreativeInput: + type: object + properties: + creativeId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + required: + - creativeId + DeleteCreativeInput: + type: object + properties: + creativeId: + type: string + example: example_id_123 + required: + - creativeId + GetCreativeInput: + type: object + properties: + creativeId: + type: string + example: example_id_123 + required: + - creativeId + ListCreativesInput: + type: object + properties: + campaignId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + brandAgentId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + formatSource: + type: string + enum: + - ADCP + - CREATIVE_AGENT + - PUBLISHER + example: ADCP + status: + type: string + enum: + - ACTIVE + - PAUSED + - ARCHIVED + - DRAFT + example: ACTIVE + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + ListCountriesInput: + type: object + properties: {} + ListLanguagesInput: + type: object + properties: {} + GetMediaBuyInput: + type: object + properties: + mediaBuyId: + type: string + example: example_id_123 + required: + - mediaBuyId + ListMediaBuysInput: + type: object + properties: + tacticId: + type: number + example: 100 + status: + type: string + enum: + - DRAFT + - PENDING_APPROVAL + - ACTIVE + - PAUSED + - COMPLETED + - FAILED + - REJECTED + example: DRAFT + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + OutcomesAgentGetProposalsInput: + type: object + properties: + campaignId: + description: Campaign ID to get proposals for + example: camp_123 + type: string + agentIds: + description: 'Optional: Specific outcome agent IDs to query. If omitted, queries all outcome agents.' + example: + - agent_123 + - agent_456 + type: array + items: + type: string + budgetRange: + allOf: + - $ref: '#/components/schemas/BudgetRange' + startDate: + description: Campaign start date (ISO 8601) + example: '2025-01-01T00:00:00Z' + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + endDate: + description: Campaign end date (ISO 8601) + example: '2025-01-31T23:59:59Z' + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + channels: + description: Advertising channels + example: + - display + - video + type: array + items: + type: string + enum: + - ctv + - video + - display + - app + - social + countries: + description: ISO 3166-1 alpha-2 country codes + example: + - US + - CA + type: array + items: + type: string + brief: + description: Campaign brief text + type: string + example: string + required: + - campaignId + OutcomesAgentAcceptProposalInput: + type: object + properties: + proposalId: + description: Database ID of the proposal to accept + example: '123' + type: string + tacticName: + description: >- + Optional: Name for the tactic/strategy that will be created. If not provided, a unique identifier will be + generated. + example: Premium Display Campaign + type: string + customFields: + description: Optional custom fields required by the outcome agent + type: object + additionalProperties: {} + required: + - proposalId + OutcomesAgentListTacticsInput: + type: object + properties: + outcomeAgentId: + description: ID of the outcome agent to list tactics for + example: '123' + type: string + required: + - outcomeAgentId + ListProductsInput: + type: object + properties: + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + GetAgentInput: + type: object + properties: + agentId: + description: The agent ID to retrieve + type: string + example: example_id_123 + required: + - agentId + ListAgentsInput: + type: object + properties: + type: + description: Filter by agent type (SALES or OUTCOME) + type: string + enum: + - SALES + - OUTCOME + example: SALES + status: + description: Filter by status (PENDING, ACTIVE, DISABLED) + type: string + enum: + - PENDING + - ACTIVE + - DISABLED + example: PENDING + organizationId: + description: Filter by organization ID + type: string + example: example_id_123 + relationship: + description: >- + Filter by relationship (SELF = owned by you, SCOPE3 = Scope3-provided, MARKETPLACE = third-party marketplace + agents) + type: string + enum: + - SELF + - SCOPE3 + - MARKETPLACE + example: SELF + name: + description: Filter by agent name (partial match) + type: string + example: Example Name + GetTacticInput: + type: object + properties: + tacticId: + type: number + example: 100 + required: + - tacticId + ListTacticsInput: + type: object + properties: + campaignId: + type: string + example: example_id_123 + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + CreateServiceTokenInput: + type: object + properties: + name: + description: Human-readable name for the service token + type: string + minLength: 1 + example: Example Name + description: + description: Optional description of the token purpose and usage + type: string + example: string + expiresInDays: + description: Number of days until token expiration (max 365). If not provided, token does not expire + type: integer + exclusiveMinimum: true + maximum: 365 + example: 100 + scope: + description: 'Token scope: CUSTOMER (full customer access) or SEAT (scoped to specific seat)' + default: CUSTOMER + type: string + enum: + - CUSTOMER + - SEAT + seatName: + description: Seat name (required when scope is SEAT). The seat will be looked up for the customer. + type: string + minLength: 1 + example: Example Name + required: + - name + UpdateServiceTokenInput: + type: object + properties: + id: + description: The unique identifier of the service token to update + type: integer + format: int64 + example: 100 + name: + description: Updated human-readable name for the service token + type: string + minLength: 1 + example: Example Name + description: + description: Updated description of the token purpose and usage + type: string + example: string + expiresInDays: + description: Number of days to extend expiration from now (max 365). Updates the expiresAt timestamp + type: integer + exclusiveMinimum: true + maximum: 365 + example: 100 + required: + - id + ArchiveServiceTokenInput: + type: object + properties: + id: + description: The unique identifier of the service token to archive + type: integer + format: int64 + example: 100 + required: + - id + GetServiceTokenInput: + type: object + properties: + id: + description: The unique identifier of the service token to retrieve + type: integer + format: int64 + example: 100 + includeSecret: + description: Whether to fetch the access_client_secret from Google Secret Manager. Defaults to false for security + default: false + type: boolean + required: + - id + ListServiceTokensInput: + type: object + properties: + includeArchived: + description: Whether to include archived tokens in the response + default: false + type: boolean + seatId: + description: Filter tokens by seat ID + type: integer + format: int64 + example: 100 + userId: + description: Filter tokens by user ID + type: integer + format: int64 + example: 100 + BrandAgentUpdate: + type: object + properties: + id: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + manifestUrl: + type: string + format: uri + example: https://example.com + customerId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - customerId + - createdAt + - updatedAt + BrandStandardsCreate: + type: object + properties: + id: + type: string + example: example_id_123 + name: + type: string + example: Example Name + description: + type: string + example: string + countryCodes: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + brands: + type: array + items: + type: string + example: [] + models: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + example: [] + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - countryCodes + - channelCodes + - brands + - models + - createdAt + - updatedAt + CampaignUpdate: + type: object + properties: + campaignId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - campaignId + - name + - status + - createdAt + - updatedAt + CreativeGet: + type: object + properties: + creativeId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + campaignId: + type: string + example: example_id_123 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - creativeId + - name + - status + - createdAt + - updatedAt + MediaBuyGet: + type: object + properties: + id: + type: string + example: example_id_123 + tacticId: + type: number + example: 100 + customerId: + type: number + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + required: + - mediaProductId + - salesAgentId + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + example: [] + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + example: [] + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + status: + type: string + example: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - tacticId + - customerId + - name + - pricing + - status + - createdAt + - updatedAt + TacticGet: + type: object + properties: + id: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + campaignIds: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + countryCodes: + type: array + items: + type: string + example: [] + mediaBuyCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - channelCodes + - countryCodes + - createdAt + - updatedAt + MCPContent: + type: object + properties: + type: + type: string + enum: + - text + example: text + text: + type: string + example: string + required: + - type + - text + additionalProperties: false + BadRequest: + description: Bad request error response + type: object + properties: + error: + type: string + example: string + message: + type: string + example: string + required: + - error + additionalProperties: false + Unauthorized: + description: Unauthorized error response + type: object + properties: + error: + type: string + example: string + message: + type: string + example: string + required: + - error + additionalProperties: false + InternalError: + description: Internal server error response + type: object + properties: + error: + type: string + example: string + message: + type: string + example: string + required: + - error + additionalProperties: false + AssetList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + assetId: + type: string + originalFilename: + type: string + assetType: + type: string + size: + type: number + brandAgentId: + type: string + customerId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + signedUrl: + type: string + tags: + type: array + items: + type: string + required: + - assetId + - originalFilename + - assetType + - size + - brandAgentId + - customerId + - signedUrl + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + BrandAgentList: + type: object + properties: + brandAgents: + type: array + items: + $ref: '#/components/schemas/BrandAgentUpdateOutput' + example: [] + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - brandAgents + - total + additionalProperties: false + BrandAgentDelete: + type: object + properties: + success: + type: boolean + example: true + deletedId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + required: + - success + - deletedId + additionalProperties: false + BrandStandardsDelete: + type: object + properties: + success: + type: boolean + example: true + id: + type: string + example: example_id_123 + required: + - success + - id + additionalProperties: false + BrandStandardsList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + $ref: '#/components/schemas/BrandStandardsCreateOutput' + example: [] + required: + - total + - items + additionalProperties: false + BrandStoryCreate: + type: object + properties: + id: + type: string + example: example_id_123 + name: + type: string + example: Example Name + brandAgentId: + type: string + example: example_id_123 + countryCodes: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + languages: + type: array + items: + type: string + example: [] + brands: + type: array + items: + type: string + example: [] + currentModel: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - createdAt + - updatedAt + additionalProperties: false + BrandStoryUpdate: + type: object + properties: + id: + type: string + example: example_id_123 + name: + type: string + example: Example Name + prompt: + type: string + example: string + status: + type: string + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - createdAt + - updatedAt + additionalProperties: false + BrandStoryDelete: + type: object + properties: + success: + type: boolean + example: true + id: + type: string + example: example_id_123 + required: + - success + - id + additionalProperties: false + BrandStoryList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + description: + type: string + status: + type: string + type: + type: string + languages: + type: array + items: + type: string + currentModel: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - status + - type + - languages + - createdAt + - updatedAt + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + CampaignList: + type: object + properties: + campaigns: + type: array + items: + $ref: '#/components/schemas/CampaignUpdateOutput' + example: [] + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - campaigns + - total + additionalProperties: false + CampaignDelete: + type: object + properties: + success: + type: boolean + example: true + deletedId: + type: string + example: example_id_123 + required: + - success + - deletedId + additionalProperties: false + CampaignGetSummary: + type: object + properties: + campaignId: + type: string + example: example_id_123 + summary: + type: object + additionalProperties: {} + required: + - campaignId + - summary + additionalProperties: false + CampaignListTactics: + type: object + properties: + tactics: + type: array + items: {} + example: [] + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - tactics + - total + additionalProperties: false + CampaignValidateBrief: + type: object + properties: + valid: + type: boolean + example: true + feedback: + type: string + example: string + required: + - valid + additionalProperties: false + ChannelList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + channel: + type: string + displayName: + type: string + required: + - channel + - displayName + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + GetCustomerOutput: + type: object + properties: + id: + description: Unique identifier for the customer + type: number + example: 100 + company: + description: Company name + type: string + example: string + name: + description: Customer display name + type: string + example: Example Name + active: + description: Whether the customer is currently active + type: boolean + example: true + createdAt: + description: ISO 8601 timestamp when the customer was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - company + - name + - active + - createdAt + additionalProperties: false + GetCustomerSeatsOutput: + type: object + properties: + customerId: + description: The customer ID these seats belong to + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + seats: + description: Array of seats belonging to the customer + type: array + items: + type: object + properties: + id: + description: Unique identifier for the seat + type: string + name: + description: Seat display name + type: string + customerId: + description: Customer ID that owns this seat + type: number + active: + description: Whether the seat is currently active + type: boolean + required: + - id + - name + - customerId + - active + additionalProperties: false + example: [] + count: + description: Total number of seats returned + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - customerId + - seats + - count + additionalProperties: false + CreativeAssign: + type: object + properties: + success: + type: boolean + example: true + creativeId: + type: string + example: example_id_123 + campaignId: + type: string + example: example_id_123 + required: + - success + - creativeId + - campaignId + additionalProperties: false + CreativeDelete: + type: object + properties: + success: + type: boolean + example: true + id: + type: string + example: example_id_123 + required: + - success + - id + additionalProperties: false + CreativeList: + type: object + properties: + items: + type: array + items: + $ref: '#/components/schemas/CreativeGetOutput' + example: [] + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - items + - total + additionalProperties: false + CountryList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + key: + type: string + displayName: + type: string + required: + - key + - displayName + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + LanguageList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + key: + type: string + displayName: + type: string + required: + - key + - displayName + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + MediaBuyList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + $ref: '#/components/schemas/MediaBuyGetOutput' + example: [] + required: + - total + - items + additionalProperties: false + OutcomesAgentGetProposals: + type: object + properties: + total: + description: Total number of proposals returned + type: number + example: 100 + proposals: + description: List of proposals from outcome agents + type: array + items: + type: object + properties: + id: + description: Database ID of the proposal + type: string + proposalId: + description: Outcome agent generated proposal ID + type: string + outcomeAgentId: + description: ID of the outcome agent that created this proposal + type: string + outcomeAgentName: + description: Name of the outcome agent + type: string + execution: + description: How the proposal would be executed + type: string + budgetCapacity: + description: Maximum budget the agent can manage + type: number + pricing: + description: Pricing model for the proposal + type: object + properties: + method: + type: string + enum: + - revshare + - cost_per_unit + rate: + type: number + pricing_model: + type: string + enum: + - cpm + - cpc + - cpa + - cpv + - cpcv + currency: + type: string + required: + - method + - rate + - currency + additionalProperties: false + sku: + description: Tactic type identifier + type: string + status: + description: Current status of the proposal + type: string + enum: + - pending + - accepted + - rejected + - expired + proposalCard: + description: Visual card data for rendering in UI + allOf: + - $ref: '#/components/schemas/ProposalCardOutput' + createdAt: + description: When the proposal was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - proposalId + - outcomeAgentId + - outcomeAgentName + - execution + - budgetCapacity + - pricing + - status + - createdAt + additionalProperties: false + example: [] + required: + - total + - proposals + additionalProperties: false + OutcomesAgentAcceptProposal: + type: object + properties: + tacticId: + description: ID of the created tactic/strategy + type: string + example: example_id_123 + tacticName: + description: Name of the created tactic (user-provided or auto-generated) + type: string + example: Example Name + proposalId: + description: ID of the accepted proposal + type: string + example: example_id_123 + outcomeAgentId: + description: ID of the outcome agent managing this tactic + type: string + example: example_id_123 + acknowledged: + description: Whether the outcome agent acknowledged the assignment + type: boolean + example: true + message: + description: Optional message from the outcome agent + type: string + example: string + required: + - tacticId + - tacticName + - proposalId + - outcomeAgentId + - acknowledged + additionalProperties: false + OutcomesAgentListTactics: + type: object + properties: + outcomeAgentId: + description: ID of the outcome agent + type: string + example: example_id_123 + outcomeAgentName: + description: Name of the outcome agent + type: string + example: Example Name + total: + description: Total number of tactics managed by this agent + type: number + example: 100 + tactics: + description: List of tactics managed by this outcome agent + type: array + items: + type: object + properties: + tacticId: + description: ID of the tactic (strategy) + type: string + tacticName: + description: Name of the tactic + type: string + proposalId: + description: ID of the original proposal + type: string + acceptedAt: + description: When the proposal was accepted (ISO 8601) + type: string + campaignId: + description: Campaign ID if linked to a campaign + nullable: true + type: string + required: + - tacticId + - tacticName + - proposalId + - acceptedAt + - campaignId + additionalProperties: false + example: [] + required: + - outcomeAgentId + - outcomeAgentName + - total + - tactics + additionalProperties: false + MediaProductList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + type: object + properties: + id: + type: string + productId: + type: string + name: + type: string + salesAgent: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + deliveryType: + type: string + enum: + - guaranteed + - non_guaranteed + format: + type: string + creativeFormats: + anyOf: + - type: array + items: + type: string + - type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - id + - productId + - name + - deliveryType + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + AgentGet: + anyOf: + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + authenticationType: + type: string + description: + type: string + organizationId: + type: string + registeredBy: + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - authenticationType + - createdAt + - updatedAt + additionalProperties: false + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + authenticationType: + type: string + description: + type: string + organizationId: + type: string + registeredBy: + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + customerAccountCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - authenticationType + - createdAt + - updatedAt + - customerAccountCount + additionalProperties: false + AgentList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + anyOf: + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + additionalProperties: false + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + customerAccountCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - customerAccountCount + additionalProperties: false + example: [] + required: + - total + - items + additionalProperties: false + TacticList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + items: + type: array + items: + $ref: '#/components/schemas/TacticGetOutput' + example: [] + required: + - total + - items + additionalProperties: false + CreateServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + example: 100 + customerId: + description: Customer ID that owns this token + type: number + example: 100 + seatId: + description: Seat ID if token is scoped to a specific seat + type: integer + format: int64 + example: 100 + userId: + description: User ID if token is scoped to a specific user + type: integer + format: int64 + example: 100 + organizationId: + description: Optional organization identifier for scoping the token + type: string + example: example_id_123 + name: + description: Human-readable name of the token + type: string + example: Example Name + description: + description: Description of the token purpose + type: string + example: string + accessClientId: + description: The public client ID portion of the token credentials (safe to log) + type: string + example: example_id_123 + accessClientSecret: + description: The secret portion of the token credentials. ONLY returned on creation, never retrievable again! + type: string + example: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if set + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + description: ISO 8601 timestamp when the token was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - customerId + - name + - accessClientId + - accessClientSecret + - createdAt + additionalProperties: false + UpdateServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + example: 100 + name: + description: Updated human-readable name of the token + type: string + example: Example Name + description: + description: Updated description of the token purpose + type: string + example: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + description: ISO 8601 timestamp when the token was last updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - updatedAt + additionalProperties: false + ArchiveServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the archived token + type: integer + format: int64 + example: 100 + archivedAt: + description: ISO 8601 timestamp when the token was archived + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - archivedAt + additionalProperties: false + GetServiceTokenOutput: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + example: 100 + customerId: + description: Customer ID that owns this token + type: number + example: 100 + seatId: + description: Seat ID if token is scoped to a specific seat + type: integer + format: int64 + example: 100 + userId: + description: User ID if token is scoped to a specific user + type: integer + format: int64 + example: 100 + organizationId: + description: Optional organization identifier for scoping the token + type: string + example: example_id_123 + name: + description: Human-readable name of the token + type: string + example: Example Name + description: + description: Description of the token purpose + type: string + example: string + accessClientId: + description: The public client ID portion of the token credentials (safe to log) + type: string + example: example_id_123 + accessClientSecret: + description: The secret portion of the token credentials. Only included if includeSecret=true was passed + type: string + example: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if set + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + description: ISO 8601 timestamp when the token was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + description: ISO 8601 timestamp when the token was last updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + description: ISO 8601 timestamp when the token was archived, if archived + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - customerId + - name + - accessClientId + - createdAt + - updatedAt + additionalProperties: false + ListServiceTokensOutput: + type: object + properties: + tokens: + description: 'Array of service tokens. Note: accessClientSecret is never included in list responses' + type: array + items: + type: object + properties: + id: + description: Unique identifier for the service token + type: integer + format: int64 + customerId: + description: Customer ID that owns this token + type: number + seatId: + description: Seat ID if token is scoped to a specific seat + type: integer + format: int64 + seatName: + description: Seat name if token is scoped to a specific seat + type: string + userId: + description: User ID if token is scoped to a specific user + type: integer + format: int64 + organizationId: + description: Optional organization identifier for scoping the token + type: string + name: + description: Human-readable name of the token + type: string + description: + description: Description of the token purpose + type: string + accessClientId: + description: The public client ID portion of the token credentials (safe to log) + type: string + expiresAt: + description: ISO 8601 timestamp when the token expires, if set + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + createdAt: + description: ISO 8601 timestamp when the token was created + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + description: ISO 8601 timestamp when the token was last updated + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + archivedAt: + description: ISO 8601 timestamp when the token was archived, if archived + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - customerId + - name + - accessClientId + - createdAt + - updatedAt + additionalProperties: false + example: [] + count: + description: Total number of tokens returned + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + required: + - tokens + - count + additionalProperties: false + ProposalCardOutput: + description: Visual card data for rendering proposals in marketplace UI, following ADCP product card pattern + type: object + properties: + title: + description: Proposal name/title + example: Premium Display Campaign + type: string + description: + description: What the proposal offers + example: Target premium inventory at $2.50 vCPM with 85% viewability guarantee + type: string + image_carousel: + description: Optional array of image URLs showcasing the approach + example: + - https://example.com/chart1.png + - https://example.com/viz2.png + type: array + items: + type: string + format: uri + details: + description: Markdown-formatted detailed execution plan and specifications + example: |- + ## Execution Strategy + + We will target... + type: string + pricing_summary: + description: Pricing information for comparison + type: object + properties: + method: + description: Human-readable pricing method + example: 15% revenue share + type: string + budget_capacity: + description: Human-readable budget capacity + example: $50,000 maximum + type: string + estimated_cost: + description: Optional estimated cost calculation + example: $7,500 estimated fee + type: string + required: + - method + - budget_capacity + additionalProperties: false + required: + - title + - description + - pricing_summary + additionalProperties: false + BudgetRangeOutput: + description: Budget range for campaign planning + type: object + properties: + min: + description: Minimum budget available + example: 50000 + type: number + minimum: 0 + exclusiveMinimum: true + max: + description: Maximum budget available + example: 150000 + type: number + minimum: 0 + exclusiveMinimum: true + currency: + description: Currency for budget (ISO 4217 code) + example: USD + default: USD + type: string + minLength: 3 + maxLength: 3 + required: + - min + - max + - currency + additionalProperties: false + BrandAgentUpdateOutput: + type: object + properties: + id: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + manifestUrl: + type: string + format: uri + example: https://example.com + customerId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - customerId + - createdAt + - updatedAt + additionalProperties: false + BrandStandardsCreateOutput: + type: object + properties: + id: + type: string + example: example_id_123 + name: + type: string + example: Example Name + description: + type: string + example: string + countryCodes: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + brands: + type: array + items: + type: string + example: [] + models: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + additionalProperties: false + example: [] + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - countryCodes + - channelCodes + - brands + - models + - createdAt + - updatedAt + additionalProperties: false + CampaignUpdateOutput: + type: object + properties: + campaignId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - campaignId + - name + - status + - createdAt + - updatedAt + additionalProperties: false + CreativeGetOutput: + type: object + properties: + creativeId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + campaignId: + type: string + example: example_id_123 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - creativeId + - name + - status + - createdAt + - updatedAt + additionalProperties: false + MediaBuyGetOutput: + type: object + properties: + id: + type: string + example: example_id_123 + tacticId: + type: number + example: 100 + customerId: + type: number + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + example: [] + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + example: [] + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + example: [] + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false + status: + type: string + example: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - tacticId + - customerId + - name + - pricing + - status + - createdAt + - updatedAt + additionalProperties: false + TacticGetOutput: + type: object + properties: + id: + type: number + example: 100 + name: + type: string + example: Example Name + prompt: + type: string + example: string + campaignIds: + type: array + items: + type: string + example: [] + channelCodes: + type: array + items: + type: string + example: [] + countryCodes: + type: array + items: + type: string + example: [] + mediaBuyCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + archivedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - channelCodes + - countryCodes + - createdAt + - updatedAt + additionalProperties: false + BrandAgentGet: + type: object + properties: + id: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + manifestUrl: + type: string + format: uri + example: https://example.com + customerId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - customerId + - createdAt + - updatedAt + additionalProperties: false + BrandAgentCreate: + type: object + properties: + id: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + name: + type: string + example: Example Name + description: + type: string + example: string + manifestUrl: + type: string + format: uri + example: https://example.com + customerId: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + example: 100 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - id + - name + - customerId + - createdAt + - updatedAt + additionalProperties: false + CampaignCreate: + type: object + properties: + campaignId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - campaignId + - name + - status + - createdAt + - updatedAt + additionalProperties: false + CampaignGet: + type: object + properties: + campaignId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - campaignId + - name + - status + - createdAt + - updatedAt + additionalProperties: false + CreativeCreate: + type: object + properties: + creativeId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + campaignId: + type: string + example: example_id_123 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - creativeId + - name + - status + - createdAt + - updatedAt + additionalProperties: false + CreativeUpdate: + type: object + properties: + creativeId: + type: string + example: example_id_123 + name: + type: string + example: Example Name + status: + type: string + example: string + campaignId: + type: string + example: example_id_123 + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: string + required: + - creativeId + - name + - status + - createdAt + - updatedAt + additionalProperties: false + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/scripts/generate-sdk.ts b/scripts/generate-sdk.ts new file mode 100644 index 0000000..5569935 --- /dev/null +++ b/scripts/generate-sdk.ts @@ -0,0 +1,346 @@ +#!/usr/bin/env ts-node +/** + * Generates TypeScript SDK clients from OpenAPI specifications + * + * This script reads OpenAPI YAML files and generates: + * - PlatformClient from platform-api.yaml (for brand advertisers/buyers) + * - PartnerClient from partner-api.yaml (for DSPs/publishers/partners) + * + * Generated clients wrap MCP tool calls with typed methods. + */ + +import * as fs from 'fs'; +import * as path from 'path'; +import * as yaml from 'js-yaml'; + +interface OpenAPISpec { + info: { + title: string; + description: string; + }; + paths: Record>; + components?: { + schemas?: Record; + }; +} + +interface Operation { + operationId: string; + summary?: string; + description?: string; + tags?: string[]; + requestBody?: { + content: { + 'application/json': { + schema: { + $ref?: string; + type?: string; + properties?: Record; + required?: string[]; + }; + }; + }; + }; + responses?: Record; +} + +interface ResourceGroup { + name: string; + operations: Array<{ + operationId: string; + methodName: string; + summary?: string; + description?: string; + hasParams: boolean; + }>; +} + +function parseOpenAPISpec(filePath: string): OpenAPISpec { + const content = fs.readFileSync(filePath, 'utf-8'); + return yaml.load(content) as OpenAPISpec; +} + +function operationIdToMethodName(operationId: string, resourceName: string): string { + // Convert snake_case operation IDs to camelCase method names + // e.g., "brand_agent_list" on brandAgents resource -> "list" + // e.g., "country_list" on targeting resource -> "countryList" + // e.g., "tactic_link_campaign" on tactics resource -> "linkCampaign" + + const parts = operationId.split('_'); + + // Convert resourceName to snake_case to match against operation ID + // "brandAgents" -> "brand_agent", "mediaBuys" -> "media_buy" + const resourceSnakeCase = resourceName + .replace(/([A-Z])/g, '_$1') + .toLowerCase() + .replace(/^_/, '') + .replace(/s$/, ''); // Remove trailing 's' for plural resources + + const resourceParts = resourceSnakeCase.split('_'); + + // Check if operation ID starts with the resource name + // e.g., "brand_agent_list" starts with ["brand", "agent"] + let skipParts = 0; + for (let i = 0; i < resourceParts.length && i < parts.length; i++) { + if (parts[i] === resourceParts[i]) { + skipParts++; + } else { + break; + } + } + + // If we matched the resource prefix, skip it + const methodParts = skipParts > 0 ? parts.slice(skipParts) : parts; + + // Convert to camelCase + return methodParts.map((part, i) => + i === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1) + ).join(''); +} + +function toCamelCase(str: string): string { + // Convert "Brand Agents" or "brand_agents" to "brandAgents" + return str + .split(/[\s_-]+/) + .map((word, index) => + index === 0 + ? word.toLowerCase() + : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase() + ) + .join(''); +} + +function groupOperationsByResource(spec: OpenAPISpec): Map { + const groups = new Map(); + + for (const [path, methods] of Object.entries(spec.paths)) { + for (const [method, operation] of Object.entries(methods)) { + if (method !== 'post' || !operation.operationId) continue; + + // Skip mcp-initialize, it's handled by the base client + if (operation.operationId === 'mcp_initialize') continue; + + // Extract resource name from operation ID or tags + // e.g., "brand_agent_list" -> "brandAgents" + const operationId = operation.operationId; + let resourceName: string; + + if (operation.tags && operation.tags.length > 0) { + // Use tag as resource name, convert to camelCase + resourceName = toCamelCase(operation.tags[0]); + } else { + // Extract from operation ID + const parts = operationId.split('_'); + // Find the action word index + const actionIndex = parts.findIndex(p => + ['list', 'get', 'create', 'update', 'delete', 'execute', 'sync', 'validate', 'discover', 'save', 'mark'].includes(p) + ); + + if (actionIndex > 0) { + // Resource name is everything before the action + const resourceParts = parts.slice(0, actionIndex); + resourceName = toCamelCase(resourceParts.join('_')); + } else { + // Default to first part + resourceName = toCamelCase(parts[0]); + } + } + + if (!groups.has(resourceName)) { + groups.set(resourceName, { + name: resourceName, + operations: [], + }); + } + + const hasParams = !!(operation.requestBody?.content['application/json']?.schema); + + groups.get(resourceName)!.operations.push({ + operationId, + methodName: operationIdToMethodName(operationId, resourceName), + summary: operation.summary, + description: operation.description, + hasParams, + }); + } + } + + return groups; +} + +function generateResourceClass(resource: ResourceGroup, typesImport: string): string { + const className = `${resource.name.charAt(0).toUpperCase()}${resource.name.slice(1)}Resource`; + + let code = `import { Scope3Client } from '../../client';\n`; + code += `import type { operations } from '../../types/${typesImport}';\n\n`; + + code += `export class ${className} {\n`; + code += ` constructor(private client: Scope3Client) {}\n\n`; + + for (const op of resource.operations) { + // Generate JSDoc comment + if (op.summary || op.description) { + code += ` /**\n`; + if (op.summary) { + code += ` * ${op.summary}\n`; + } + if (op.description && op.description !== op.summary) { + code += ` * ${op.description.split('\n').join('\n * ')}\n`; + } + code += ` */\n`; + } + + // Generate method signature + const paramsType = op.hasParams + ? `operations['${op.operationId}']['requestBody']['content']['application/json']` + : '{}'; + + const responseType = `operations['${op.operationId}']['responses'][200]['content']['application/json']`; + + if (op.hasParams) { + code += ` async ${op.methodName}(params: ${paramsType}): Promise<${responseType}> {\n`; + code += ` return this.client['callTool']('${op.operationId}', params);\n`; + } else { + code += ` async ${op.methodName}(): Promise<${responseType}> {\n`; + code += ` return this.client['callTool']('${op.operationId}', {});\n`; + } + code += ` }\n\n`; + } + + code += `}\n`; + + return code; +} + +function generateClientClass( + clientName: string, + apiTitle: string, + apiDescription: string, + resources: ResourceGroup[], + typesImport: string +): string { + let code = `import { Scope3Client } from './client';\n`; + code += `import { ClientConfig } from './types';\n`; + + // Import all resource classes + const clientDir = clientName.replace('Client', '').toLowerCase(); // "PlatformClient" -> "platform" + for (const resource of resources) { + const className = `${resource.name.charAt(0).toUpperCase()}${resource.name.slice(1)}Resource`; + code += `import { ${className} } from './resources/${clientDir}/${resource.name}';\n`; + } + + code += `\n`; + code += `/**\n`; + code += ` * ${apiTitle}\n`; + code += ` * \n`; + code += ` * ${apiDescription.split('\n').join('\n * ')}\n`; + code += ` */\n`; + code += `export class ${clientName} extends Scope3Client {\n`; + + // Declare resource properties + for (const resource of resources) { + const className = `${resource.name.charAt(0).toUpperCase()}${resource.name.slice(1)}Resource`; + code += ` public readonly ${resource.name}: ${className};\n`; + } + + code += `\n`; + code += ` constructor(config: ClientConfig) {\n`; + code += ` super(config);\n\n`; + + // Initialize resources + for (const resource of resources) { + const className = `${resource.name.charAt(0).toUpperCase()}${resource.name.slice(1)}Resource`; + code += ` this.${resource.name} = new ${className}(this);\n`; + } + + code += ` }\n\n`; + + // Add CLI support methods + code += ` // Expose MCP methods for CLI dynamic command generation\n`; + code += ` async listTools(): Promise {\n`; + code += ` if (!this.getClient()) {\n`; + code += ` await this.connect();\n`; + code += ` }\n`; + code += ` return this.getClient().listTools();\n`; + code += ` }\n\n`; + + code += ` async callTool, TResponse = unknown>(\n`; + code += ` toolName: string,\n`; + code += ` args: TRequest\n`; + code += ` ): Promise {\n`; + code += ` return super.callTool(toolName, args);\n`; + code += ` }\n`; + + code += `}\n`; + + return code; +} + +function main() { + const projectRoot = path.join(__dirname, '..'); + + // Parse OpenAPI specs + console.log('📖 Parsing OpenAPI specifications...'); + const platformSpec = parseOpenAPISpec(path.join(projectRoot, 'platform-api.yaml')); + const partnerSpec = parseOpenAPISpec(path.join(projectRoot, 'partner-api.yaml')); + + // Group operations by resource + console.log('🔍 Analyzing API operations...'); + const platformResources = Array.from(groupOperationsByResource(platformSpec).values()); + const partnerResources = Array.from(groupOperationsByResource(partnerSpec).values()); + + console.log(` Platform API: ${platformResources.length} resource groups`); + console.log(` Partner API: ${partnerResources.length} resource groups`); + + // Create output directories + const platformResourcesDir = path.join(projectRoot, 'src/resources/platform'); + const partnerResourcesDir = path.join(projectRoot, 'src/resources/partner'); + + fs.mkdirSync(platformResourcesDir, { recursive: true }); + fs.mkdirSync(partnerResourcesDir, { recursive: true }); + + // Generate Platform resources + console.log('\n🏗️ Generating Platform API resources...'); + for (const resource of platformResources) { + const code = generateResourceClass(resource, 'platform-api'); + const filePath = path.join(platformResourcesDir, `${resource.name}.ts`); + fs.writeFileSync(filePath, code); + console.log(` ✓ ${resource.name} (${resource.operations.length} operations)`); + } + + // Generate Partner resources + console.log('\n🏗️ Generating Partner API resources...'); + for (const resource of partnerResources) { + const code = generateResourceClass(resource, 'partner-api'); + const filePath = path.join(partnerResourcesDir, `${resource.name}.ts`); + fs.writeFileSync(filePath, code); + console.log(` ✓ ${resource.name} (${resource.operations.length} operations)`); + } + + // Generate client classes + console.log('\n🎯 Generating client classes...'); + + const platformClient = generateClientClass( + 'PlatformClient', + platformSpec.info.title, + platformSpec.info.description, + platformResources, + 'platform-api' + ); + fs.writeFileSync(path.join(projectRoot, 'src/platform-client.ts'), platformClient); + console.log(' ✓ PlatformClient'); + + const partnerClient = generateClientClass( + 'PartnerClient', + partnerSpec.info.title, + partnerSpec.info.description, + partnerResources, + 'partner-api' + ); + fs.writeFileSync(path.join(projectRoot, 'src/partner-client.ts'), partnerClient); + console.log(' ✓ PartnerClient'); + + console.log('\n✅ SDK generation complete!'); +} + +main(); diff --git a/scripts/update-schemas.sh b/scripts/update-schemas.sh new file mode 100755 index 0000000..89ad499 --- /dev/null +++ b/scripts/update-schemas.sh @@ -0,0 +1,38 @@ +#!/bin/bash +set -e + +# Base URL for the OpenAPI specs +BASE_URL="https://raw.githubusercontent.com/scope3data/agentic-api/main/mintlify" + +# Set up curl with authentication if GITHUB_TOKEN is available +if [ -n "$GITHUB_TOKEN" ]; then + AUTH_HEADER=(-H "Authorization: token $GITHUB_TOKEN") +else + AUTH_HEADER=() +fi + +echo "Downloading OpenAPI schemas..." + +# Download outcome-agent-openapi.yaml +echo "Fetching outcome-agent-openapi.yaml..." +curl -f "${AUTH_HEADER[@]}" -o outcome-agent-openapi.yaml "$BASE_URL/outcome-agent-openapi.yaml" + +# Download partner-api.yaml +echo "Fetching partner-api.yaml..." +curl -f "${AUTH_HEADER[@]}" -o partner-api.yaml "$BASE_URL/partner-api.yaml" + +# Download platform-api.yaml +echo "Fetching platform-api.yaml..." +curl -f "${AUTH_HEADER[@]}" -o platform-api.yaml "$BASE_URL/platform-api.yaml" + +echo "Generating TypeScript types and SDK..." + +# Generate types +npm run generate-outcome-agent-types +npm run generate-partner-api-types +npm run generate-platform-api-types + +# Generate SDK from types +npm run generate-sdk + +echo "✅ Schemas updated, types generated, and SDK regenerated successfully!" diff --git a/src/__tests__/client.test.ts b/src/__tests__/client.test.ts index 12cb471..2ed9ce3 100644 --- a/src/__tests__/client.test.ts +++ b/src/__tests__/client.test.ts @@ -1,10 +1,10 @@ -import { Scope3AgenticClient } from '../sdk'; +import { PlatformClient } from '../platform-client'; -describe('Scope3AgenticClient', () => { - let client: Scope3AgenticClient; +describe('PlatformClient', () => { + let client: PlatformClient; beforeEach(() => { - client = new Scope3AgenticClient({ + client = new PlatformClient({ apiKey: 'test-api-key', }); }); @@ -24,12 +24,13 @@ describe('Scope3AgenticClient', () => { expect(client.creatives).toBeDefined(); expect(client.tactics).toBeDefined(); expect(client.mediaBuys).toBeDefined(); - expect(client.notifications).toBeDefined(); - expect(client.products).toBeDefined(); + expect(client.mediaProducts).toBeDefined(); + expect(client.agents).toBeDefined(); + expect(client.targeting).toBeDefined(); }); it('should accept custom base URL', () => { - const customClient = new Scope3AgenticClient({ + const customClient = new PlatformClient({ apiKey: 'test-api-key', baseUrl: 'https://custom.api.com', }); @@ -37,7 +38,7 @@ describe('Scope3AgenticClient', () => { }); it('should accept custom timeout', () => { - const customClient = new Scope3AgenticClient({ + const customClient = new PlatformClient({ apiKey: 'test-api-key', timeout: 60000, }); diff --git a/src/cli.ts b/src/cli.ts index 72b5997..36b82a8 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node import { Command } from 'commander'; -import { Scope3AgenticClient } from './sdk'; +import { PlatformClient } from './platform-client'; import Table from 'cli-table3'; import chalk from 'chalk'; import * as fs from 'fs'; @@ -138,10 +138,7 @@ function saveToolsCache(tools: McpTool[]): void { } // Fetch available tools from MCP server -async function fetchAvailableTools( - client: Scope3AgenticClient, - useCache = true -): Promise { +async function fetchAvailableTools(client: PlatformClient, useCache = true): Promise { // Try cache first if (useCache) { const cache = loadToolsCache(); @@ -383,7 +380,7 @@ function createClient( environment?: 'production' | 'staging', baseUrl?: string, debug?: boolean -): Scope3AgenticClient { +): PlatformClient { const config = loadConfig(); // Determine final environment @@ -416,7 +413,7 @@ function createClient( process.exit(1); } - return new Scope3AgenticClient({ + return new PlatformClient({ apiKey: finalApiKey, environment: finalEnvironment, baseUrl: baseUrl || config.baseUrl, diff --git a/src/index.ts b/src/index.ts index 2a547bf..d655bd4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,20 +1,10 @@ -export { Scope3AgenticClient } from './sdk'; -// Legacy export for backwards compatibility -export { Scope3AgenticClient as Scope3SDK } from './sdk'; +// Auto-generated clients +export { PlatformClient } from './platform-client'; +export { PartnerClient } from './partner-client'; + +// Standalone services export { WebhookServer } from './webhook-server'; -export { SimpleMediaAgent } from './simple-media-agent'; + +// Types export type { ClientConfig, ToolResponse, Environment } from './types'; export type { WebhookEvent, WebhookHandler, WebhookServerConfig } from './webhook-server'; - -export * from './resources/agents'; -export * from './resources/assets'; -export * from './resources/brand-agents'; -export * from './resources/brand-standards'; -export * from './resources/brand-stories'; -export * from './resources/campaigns'; -export * from './resources/channels'; -export * from './resources/creatives'; -export * from './resources/tactics'; -export * from './resources/media-buys'; -export * from './resources/notifications'; -export * from './resources/products'; diff --git a/src/partner-client.ts b/src/partner-client.ts new file mode 100644 index 0000000..3e6a870 --- /dev/null +++ b/src/partner-client.ts @@ -0,0 +1,71 @@ +import { Scope3Client } from './client'; +import { ClientConfig } from './types'; +import { ChannelsResource } from './resources/partner/channels'; +import { TargetingResource } from './resources/partner/targeting'; +import { CreativesResource } from './resources/partner/creatives'; +import { MediaBuysResource } from './resources/partner/mediaBuys'; +import { NotificationsResource } from './resources/partner/notifications'; +import { MediaProductsResource } from './resources/partner/mediaProducts'; +import { AgentsResource } from './resources/partner/agents'; +import { TacticsResource } from './resources/partner/tactics'; +import { WebhooksResource } from './resources/partner/webhooks'; +import { ServiceTokensResource } from './resources/partner/serviceTokens'; +import { CustomersResource } from './resources/partner/customers'; + +/** + * Scope3 Partner API + * + * API for partners to register agents, manage tactics and media buys, and configure webhooks. + * + * This API provides partners with tools to: + * - Register and manage sales agents (DSPs, publisher platforms) + * - Full CRUD operations for tactics and media buys + * - Link tactics to buyer campaigns (read-only campaign access) + * - Manage media products and product discovery + * - Configure webhooks for event notifications + * - Execute media buys and manage placements + */ +export class PartnerClient extends Scope3Client { + public readonly channels: ChannelsResource; + public readonly targeting: TargetingResource; + public readonly creatives: CreativesResource; + public readonly mediaBuys: MediaBuysResource; + public readonly notifications: NotificationsResource; + public readonly mediaProducts: MediaProductsResource; + public readonly agents: AgentsResource; + public readonly tactics: TacticsResource; + public readonly webhooks: WebhooksResource; + public readonly serviceTokens: ServiceTokensResource; + public readonly customers: CustomersResource; + + constructor(config: ClientConfig) { + super(config); + + this.channels = new ChannelsResource(this); + this.targeting = new TargetingResource(this); + this.creatives = new CreativesResource(this); + this.mediaBuys = new MediaBuysResource(this); + this.notifications = new NotificationsResource(this); + this.mediaProducts = new MediaProductsResource(this); + this.agents = new AgentsResource(this); + this.tactics = new TacticsResource(this); + this.webhooks = new WebhooksResource(this); + this.serviceTokens = new ServiceTokensResource(this); + this.customers = new CustomersResource(this); + } + + // Expose MCP methods for CLI dynamic command generation + async listTools(): Promise { + if (!this.getClient()) { + await this.connect(); + } + return this.getClient().listTools(); + } + + async callTool, TResponse = unknown>( + toolName: string, + args: TRequest + ): Promise { + return super.callTool(toolName, args); + } +} diff --git a/src/platform-client.ts b/src/platform-client.ts new file mode 100644 index 0000000..7926ca2 --- /dev/null +++ b/src/platform-client.ts @@ -0,0 +1,82 @@ +import { Scope3Client } from './client'; +import { ClientConfig } from './types'; +import { BrandAgentsResource } from './resources/platform/brandAgents'; +import { CampaignsResource } from './resources/platform/campaigns'; +import { AssetsResource } from './resources/platform/assets'; +import { BrandStandardsResource } from './resources/platform/brandStandards'; +import { BrandStoriesResource } from './resources/platform/brandStories'; +import { ChannelsResource } from './resources/platform/channels'; +import { TargetingResource } from './resources/platform/targeting'; +import { CreativesResource } from './resources/platform/creatives'; +import { MediaBuysResource } from './resources/platform/mediaBuys'; +import { MediaProductsResource } from './resources/platform/mediaProducts'; +import { AgentsResource } from './resources/platform/agents'; +import { TacticsResource } from './resources/platform/tactics'; +import { OutcomeAgentsResource } from './resources/platform/outcomeAgents'; +import { ServiceTokensResource } from './resources/platform/serviceTokens'; +import { CustomersResource } from './resources/platform/customers'; + +/** + * Scope3 Platform API + * + * API for brand advertisers to manage brand agents, campaigns, creatives, and discover marketplace offerings. + * + * This API provides buyers with tools to: + * - Manage brand agents and campaign briefs + * - Create and manage creatives + * - Discover and save media products from the marketplace + * - View campaigns, tactics, and media buys (read-only) + * - Configure brand standards and brand stories + */ +export class PlatformClient extends Scope3Client { + public readonly brandAgents: BrandAgentsResource; + public readonly campaigns: CampaignsResource; + public readonly assets: AssetsResource; + public readonly brandStandards: BrandStandardsResource; + public readonly brandStories: BrandStoriesResource; + public readonly channels: ChannelsResource; + public readonly targeting: TargetingResource; + public readonly creatives: CreativesResource; + public readonly mediaBuys: MediaBuysResource; + public readonly mediaProducts: MediaProductsResource; + public readonly agents: AgentsResource; + public readonly tactics: TacticsResource; + public readonly outcomeAgents: OutcomeAgentsResource; + public readonly serviceTokens: ServiceTokensResource; + public readonly customers: CustomersResource; + + constructor(config: ClientConfig) { + super(config); + + this.brandAgents = new BrandAgentsResource(this); + this.campaigns = new CampaignsResource(this); + this.assets = new AssetsResource(this); + this.brandStandards = new BrandStandardsResource(this); + this.brandStories = new BrandStoriesResource(this); + this.channels = new ChannelsResource(this); + this.targeting = new TargetingResource(this); + this.creatives = new CreativesResource(this); + this.mediaBuys = new MediaBuysResource(this); + this.mediaProducts = new MediaProductsResource(this); + this.agents = new AgentsResource(this); + this.tactics = new TacticsResource(this); + this.outcomeAgents = new OutcomeAgentsResource(this); + this.serviceTokens = new ServiceTokensResource(this); + this.customers = new CustomersResource(this); + } + + // Expose MCP methods for CLI dynamic command generation + async listTools(): Promise { + if (!this.getClient()) { + await this.connect(); + } + return this.getClient().listTools(); + } + + async callTool, TResponse = unknown>( + toolName: string, + args: TRequest + ): Promise { + return super.callTool(toolName, args); + } +} diff --git a/src/resources/agents.ts b/src/resources/agents.ts deleted file mode 100644 index 12d4553..0000000 --- a/src/resources/agents.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export type AgentType = 'SALES' | 'OUTCOME'; -export type AgentStatus = 'PENDING' | 'ACTIVE' | 'DISABLED'; -export type AgentRelationship = 'SELF' | 'SCOPE3' | 'MARKETPLACE'; - -export interface JWTAuthConfig { - type: 'jwt'; - privateKey: string; - issuer: string; - subject: string; - keyId: string; - scope: string; - tokenEndpointUrl: string; - audienceUrl: string; - algorithm?: 'ES256' | 'RS256'; - environment?: string; -} - -export interface ApiKeyAuthConfig { - auth: { - type: 'bearer' | 'apikey' | 'api_key'; - token: string; - }; -} - -export interface OAuthAuthConfig { - auth: { - type: 'oauth' | 'oauth2'; - token: string; - }; -} - -export interface NoAuthConfig {} - -export type AgentAuthConfig = JWTAuthConfig | ApiKeyAuthConfig | OAuthAuthConfig | NoAuthConfig; - -export interface AgentListRequest { - type?: AgentType; - status?: AgentStatus; - organizationId?: string; - relationship?: AgentRelationship; - name?: string; -} - -export interface AgentGetRequest { - agentId: string; -} - -export interface AgentRegisterRequest { - type: AgentType; - name: string; - endpointUrl: string; - protocol: 'MCP' | 'A2A'; - authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; - description?: string; - organizationId?: string; - authConfig?: AgentAuthConfig; -} - -export interface AgentUpdateRequest { - agentId: string; - name?: string; - description?: string; - endpointUrl?: string; - protocol?: 'MCP' | 'A2A'; - authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; - authConfig?: AgentAuthConfig; -} - -export interface AgentUnregisterRequest { - agentId: string; -} - -export class AgentsResource { - constructor(private client: Scope3Client) {} - - async list(request?: AgentListRequest): Promise { - return this.client['callTool']('agent_list', request || {}); - } - - async get(request: AgentGetRequest): Promise { - return this.client['callTool']('agent_get', request); - } - - async register(request: AgentRegisterRequest): Promise { - return this.client['callTool']('agent_register', request); - } - - async update(request: AgentUpdateRequest): Promise { - return this.client['callTool']('agent_update', request); - } - - async unregister(request: AgentUnregisterRequest): Promise { - return this.client['callTool']('agent_unregister', request); - } -} diff --git a/src/resources/assets.ts b/src/resources/assets.ts deleted file mode 100644 index 4295677..0000000 --- a/src/resources/assets.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface AssetUploadRequest { - brandAgentId: string; - assets: Array<{ - name: string; - contentType: string; - data: string; - assetType: 'image' | 'video' | 'audio' | 'logo' | 'font'; - tags?: string[]; - }>; -} - -export interface AssetListRequest { - brandAgentId?: string; -} - -export class AssetsResource { - constructor(private client: Scope3Client) {} - - async upload(request: AssetUploadRequest): Promise { - return this.client['callTool']('asset_upload', request); - } - - async list(request: AssetListRequest = {}): Promise { - return this.client['callTool']('asset_list', request); - } -} diff --git a/src/resources/brand-agents.ts b/src/resources/brand-agents.ts deleted file mode 100644 index 6367814..0000000 --- a/src/resources/brand-agents.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface BrandAgentCreateRequest { - name: string; - description?: string; - nickname?: string; - externalId?: string; - advertiserDomains?: string[]; -} - -export interface BrandAgentUpdateRequest { - brandAgentId: string; - name?: string; - description?: string; - tacticSeedDataCoop?: boolean; -} - -export interface BrandAgentGetRequest { - brandAgentId: string; -} - -export interface BrandAgentDeleteRequest { - brandAgentId: string; -} - -export class BrandAgentsResource { - constructor(private client: Scope3Client) {} - - async list(): Promise { - return this.client['callTool']('brand_agent_list', {}); - } - - async create(request: BrandAgentCreateRequest): Promise { - return this.client['callTool']('brand_agent_create', request); - } - - async get(request: BrandAgentGetRequest): Promise { - return this.client['callTool']('brand_agent_get', request); - } - - async update(request: BrandAgentUpdateRequest): Promise { - return this.client['callTool']('brand_agent_update', request); - } - - async delete(request: BrandAgentDeleteRequest): Promise { - return this.client['callTool']('brand_agent_delete', request); - } -} diff --git a/src/resources/brand-standards.ts b/src/resources/brand-standards.ts deleted file mode 100644 index 3417dbe..0000000 --- a/src/resources/brand-standards.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface BrandStandardsListRequest { - where?: { - name?: string; - }; - orderBy?: { - id?: 'asc' | 'desc'; - name?: 'asc' | 'desc'; - }; - take?: number; - skip?: number; -} - -export interface BrandStandardsCreateRequest { - brandAgentId: string; - prompt: string; - name?: string; - description?: string; - isArchived?: boolean; - countries?: string[]; - channels?: string[]; - brands?: string[]; -} - -export interface BrandStandardsDeleteRequest { - brandStandardId: string; -} - -export class BrandStandardsResource { - constructor(private client: Scope3Client) {} - - async list(request: BrandStandardsListRequest = {}): Promise { - return this.client['callTool']('brand_standards_list', request); - } - - async create(request: BrandStandardsCreateRequest): Promise { - return this.client['callTool']('brand_standards_create', request); - } - - async delete(request: BrandStandardsDeleteRequest): Promise { - return this.client['callTool']('brand_standards_delete', request); - } -} diff --git a/src/resources/brand-stories.ts b/src/resources/brand-stories.ts deleted file mode 100644 index 6c5756a..0000000 --- a/src/resources/brand-stories.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface BrandStoryListRequest { - brandAgentId: string; -} - -export interface BrandStoryCreateRequest { - brandAgentId: string; - name: string; - prompt: string; - countries?: string[]; - channels?: string[]; - languages?: string[]; - brands?: string[]; -} - -export interface BrandStoryUpdateRequest { - brandStoryId: string; - prompt: string; -} - -export interface BrandStoryDeleteRequest { - brandStoryId: string; -} - -export class BrandStoriesResource { - constructor(private client: Scope3Client) {} - - async list(request: BrandStoryListRequest): Promise { - return this.client['callTool']('brand_story_list', request); - } - - async create(request: BrandStoryCreateRequest): Promise { - return this.client['callTool']('brand_story_create', request); - } - - async update(request: BrandStoryUpdateRequest): Promise { - return this.client['callTool']('brand_story_update', request); - } - - async delete(request: BrandStoryDeleteRequest): Promise { - return this.client['callTool']('brand_story_delete', request); - } -} diff --git a/src/resources/campaigns.ts b/src/resources/campaigns.ts deleted file mode 100644 index 681c3a7..0000000 --- a/src/resources/campaigns.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface Budget { - amount: number; - currency?: string; - dailyCap?: number; - pacing?: 'asap' | 'even' | 'front_loaded'; -} - -export interface ScoringWeights { - affinity?: number; - outcome?: number; - quality?: number; -} - -export interface CampaignListRequest { - brandAgentId?: string; - status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED'; - limit?: number; - offset?: number; -} - -export interface CampaignCreateRequest { - prompt: string; - brandAgentId?: string; - name?: string; - budget?: Budget; - startDate?: string; - endDate?: string; - scoringWeights?: ScoringWeights; - outcomeScoreWindowDays?: number; - segmentIds?: string[]; - dealIds?: string[]; - visibility?: 'PUBLIC' | 'PRIVATE'; - status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED'; -} - -export interface CampaignUpdateRequest { - campaignId: string; - name?: string; - prompt?: string; - status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED'; - budget?: Budget; - startDate?: string; - endDate?: string; - scoringWeights?: ScoringWeights; - outcomeScoreWindowDays?: number; - segmentIds?: string[]; - dealIds?: string[]; - visibility?: 'PUBLIC' | 'PRIVATE'; -} - -export interface CampaignDeleteRequest { - campaignId: string; - hardDelete?: boolean; -} - -export interface CampaignGetSummaryRequest { - campaignId: string; -} - -export interface CampaignListTacticsRequest { - campaignId: string; - includeArchived?: boolean; -} - -export interface CampaignValidateBriefRequest { - brief: string; - brandAgentId?: string; - threshold?: number; -} - -export class CampaignsResource { - constructor(private client: Scope3Client) {} - - async list(request: CampaignListRequest = {}): Promise { - return this.client['callTool']('campaign_list', request); - } - - async create(request: CampaignCreateRequest): Promise { - return this.client['callTool']('campaign_create', request); - } - - async update(request: CampaignUpdateRequest): Promise { - return this.client['callTool']('campaign_update', request); - } - - async delete(request: CampaignDeleteRequest): Promise { - return this.client['callTool']('campaign_delete', request); - } - - async getSummary(request: CampaignGetSummaryRequest): Promise { - return this.client['callTool']('campaign_get_summary', request); - } - - async listTactics(request: CampaignListTacticsRequest): Promise { - return this.client['callTool']('campaign_list_tactics', request); - } - - async validateBrief(request: CampaignValidateBriefRequest): Promise { - return this.client['callTool']('campaign_validate_brief', request); - } -} diff --git a/src/resources/channels.ts b/src/resources/channels.ts deleted file mode 100644 index eb6b873..0000000 --- a/src/resources/channels.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export class ChannelsResource { - constructor(private client: Scope3Client) {} - - async list(): Promise { - return this.client['callTool']('channel_list', {}); - } -} diff --git a/src/resources/creatives.ts b/src/resources/creatives.ts deleted file mode 100644 index a2ff81e..0000000 --- a/src/resources/creatives.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface CreativeListRequest { - brandAgentId?: string; - campaignId?: string; -} - -export interface CreativeCreateRequest { - brandAgentId: number; - name: string; - organizationId?: number; - description?: string; - formatSource?: 'ADCP' | 'CREATIVE_AGENT' | 'PUBLISHER'; - formatId?: string; - mediaUrl?: string; - content?: { - assetIds?: string[]; - htmlSnippet?: string; - vastTag?: string; - }; - assemblyMethod?: 'CREATIVE_AGENT' | 'ACTIVATION' | 'PUBLISHER'; - campaignId?: number; -} - -export interface CreativeGetRequest { - creativeId: number; -} - -export interface CreativeUpdateRequest { - creativeId: number; - name?: string; - status?: string; -} - -export interface CreativeDeleteRequest { - creativeId: number; -} - -export interface CreativeAssignRequest { - creativeId: number; - campaignId: number; -} - -export interface CreativeSyncSalesAgentsRequest { - creativeId: number; -} - -export class CreativesResource { - constructor(private client: Scope3Client) {} - - async list(request: CreativeListRequest = {}): Promise { - return this.client['callTool']('creative_list', request); - } - - async create(request: CreativeCreateRequest): Promise { - return this.client['callTool']('creative_create', request); - } - - async get(request: CreativeGetRequest): Promise { - return this.client['callTool']('creative_get', request); - } - - async update(request: CreativeUpdateRequest): Promise { - return this.client['callTool']('creative_update', request); - } - - async delete(request: CreativeDeleteRequest): Promise { - return this.client['callTool']('creative_delete', request); - } - - async assign(request: CreativeAssignRequest): Promise { - return this.client['callTool']('creative_assign', request); - } - - async syncSalesAgents(request: CreativeSyncSalesAgentsRequest): Promise { - return this.client['callTool']('creative_sync_sales_agents', request); - } -} diff --git a/src/resources/media-buys.ts b/src/resources/media-buys.ts deleted file mode 100644 index 263545b..0000000 --- a/src/resources/media-buys.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; -import { Budget } from './campaigns'; - -export interface MediaBuyProduct { - mediaProductId: string; - salesAgentId: string; - budgetAmount?: number; - budgetCurrency?: string; - pricingCpm?: number; - pricingSignalCost?: number; - displayOrder?: number; -} - -export interface MediaBuyListRequest { - tacticId?: string; - campaignId?: string; - includeArchived?: boolean; -} - -export interface MediaBuyCreateRequest { - tacticId: string; - name: string; - description?: string; - products: MediaBuyProduct[]; - budget: Budget; - creativeIds?: string[]; -} - -export interface MediaBuyGetRequest { - mediaBuyId: string; -} - -export interface MediaBuyUpdateRequest { - mediaBuyId: string; - name?: string; - budget?: { - amount?: number; - dailyCap?: number; - pacing?: 'asap' | 'even' | 'front_loaded'; - }; - cpm?: number; - creativeIds?: string[]; -} - -export interface MediaBuyDeleteRequest { - mediaBuyId: string; -} - -export interface MediaBuyExecuteRequest { - mediaBuyId: string; -} - -export class MediaBuysResource { - constructor(private client: Scope3Client) {} - - async list(request: MediaBuyListRequest = {}): Promise { - return this.client['callTool']('media_buy_list', request); - } - - async create(request: MediaBuyCreateRequest): Promise { - return this.client['callTool']('media_buy_create', request); - } - - async get(request: MediaBuyGetRequest): Promise { - return this.client['callTool']('media_buy_get', request); - } - - async update(request: MediaBuyUpdateRequest): Promise { - return this.client['callTool']('media_buy_update', request); - } - - async delete(request: MediaBuyDeleteRequest): Promise { - return this.client['callTool']('media_buy_delete', request); - } - - async execute(request: MediaBuyExecuteRequest): Promise { - return this.client['callTool']('media_buy_execute', request); - } -} diff --git a/src/resources/notifications.ts b/src/resources/notifications.ts deleted file mode 100644 index 978acf7..0000000 --- a/src/resources/notifications.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface NotificationsListRequest { - unreadOnly?: boolean; - limit?: number; -} - -export interface NotificationMarkReadRequest { - notificationId: string; -} - -export interface NotificationMarkAcknowledgedRequest { - notificationId: string; -} - -export class NotificationsResource { - constructor(private client: Scope3Client) {} - - async list(request: NotificationsListRequest = {}): Promise { - return this.client['callTool']('notifications_list', request); - } - - async markRead(request: NotificationMarkReadRequest): Promise { - return this.client['callTool']('notifications_mark_read', request); - } - - async markAcknowledged(request: NotificationMarkAcknowledgedRequest): Promise { - return this.client['callTool']('notifications_mark_acknowledged', request); - } - - async markAllRead(): Promise { - return this.client['callTool']('notifications_mark_all_read', {}); - } -} diff --git a/src/resources/partner/agents.ts b/src/resources/partner/agents.ts new file mode 100644 index 0000000..e7ca8f8 --- /dev/null +++ b/src/resources/partner/agents.ts @@ -0,0 +1,56 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class AgentsResource { + constructor(private client: Scope3Client) {} + + /** + * Get agent + * Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + async get( + params: operations['agent_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_get', params); + } + + /** + * List agents + * List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + async list( + params: operations['agent_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_list', params); + } + + /** + * Register agent + * Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). + */ + async register( + params: operations['agent_register']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_register', params); + } + + /** + * Unregister agent + * Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. + */ + async unregister( + params: operations['agent_unregister']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_unregister', params); + } + + /** + * Update agent + * Update agent configuration and credentials. Type is automatically inferred from the agent ID. + */ + async update( + params: operations['agent_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_update', params); + } +} diff --git a/src/resources/partner/channels.ts b/src/resources/partner/channels.ts new file mode 100644 index 0000000..bb4e898 --- /dev/null +++ b/src/resources/partner/channels.ts @@ -0,0 +1,16 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class ChannelsResource { + constructor(private client: Scope3Client) {} + + /** + * List channels + * List all available advertising channels and platforms. + */ + async list( + params: operations['channel_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('channel_list', params); + } +} diff --git a/src/resources/partner/creatives.ts b/src/resources/partner/creatives.ts new file mode 100644 index 0000000..1a53bcb --- /dev/null +++ b/src/resources/partner/creatives.ts @@ -0,0 +1,18 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class CreativesResource { + constructor(private client: Scope3Client) {} + + /** + * Sync creatives to sales agents + * Synchronize creatives to connected sales agents (DSPs, publisher platforms). + */ + async syncSalesAgents( + params: operations['creative_sync_sales_agents']['requestBody']['content']['application/json'] + ): Promise< + operations['creative_sync_sales_agents']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('creative_sync_sales_agents', params); + } +} diff --git a/src/resources/partner/customers.ts b/src/resources/partner/customers.ts new file mode 100644 index 0000000..dd5175b --- /dev/null +++ b/src/resources/partner/customers.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class CustomersResource { + constructor(private client: Scope3Client) {} + + /** + * Get customer info + * Get detailed information about a customer from the core database. + */ + async get( + params: operations['customer_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('customer_get', params); + } + + /** + * Get customer seats + * Get all seats associated with a customer from the core database. + */ + async getSeats( + params: operations['customer_get_seats']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('customer_get_seats', params); + } +} diff --git a/src/resources/partner/mediaBuys.ts b/src/resources/partner/mediaBuys.ts new file mode 100644 index 0000000..a297a0d --- /dev/null +++ b/src/resources/partner/mediaBuys.ts @@ -0,0 +1,78 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class MediaBuysResource { + constructor(private client: Scope3Client) {} + + /** + * Create media buy + * Create a new media buy with budget, targeting, and creative specifications. + */ + async create( + params: operations['media_buy_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_create', params); + } + + /** + * Update media buy + * Update an existing media buy with new budget, targeting, or creative assignments. + */ + async update( + params: operations['media_buy_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_update', params); + } + + /** + * Delete media buy + * Delete a media buy and cancel any active placements. + */ + async delete( + params: operations['media_buy_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_delete', params); + } + + /** + * Execute media buy + * Execute a media buy, sending it to the configured sales agents for placement. + */ + async execute( + params: operations['media_buy_execute']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_execute', params); + } + + /** + * Get media buy + * Get detailed information about a specific media buy. + */ + async get( + params: operations['media_buy_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_get', params); + } + + /** + * List media buys + * List all media buys with optional filtering by brand agent, campaign, or status. + */ + async list( + params: operations['media_buy_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_list', params); + } + + /** + * Validate media buy budget + * Validate a media buy budget against campaign constraints and available funds. + */ + async validateBudget( + params: operations['media_buy_validate_budget']['requestBody']['content']['application/json'] + ): Promise< + operations['media_buy_validate_budget']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('media_buy_validate_budget', params); + } +} diff --git a/src/resources/partner/mediaProducts.ts b/src/resources/partner/mediaProducts.ts new file mode 100644 index 0000000..203a001 --- /dev/null +++ b/src/resources/partner/mediaProducts.ts @@ -0,0 +1,48 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class MediaProductsResource { + constructor(private client: Scope3Client) {} + + /** + * Discover media products + * Discover available media products from connected sales agents based on targeting criteria. + */ + async discover( + params: operations['media_product_discover']['requestBody']['content']['application/json'] + ): Promise< + operations['media_product_discover']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('media_product_discover', params); + } + + /** + * Save media product + * Save a discovered media product for future use in media buys. + */ + async save( + params: operations['media_product_save']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_product_save', params); + } + + /** + * List media products + * List saved media products with optional filtering. + */ + async list( + params: operations['media_product_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_product_list', params); + } + + /** + * Sync media products + * Synchronize media product catalog from connected sales agents. + */ + async sync( + params: operations['media_product_sync']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_product_sync', params); + } +} diff --git a/src/resources/partner/notifications.ts b/src/resources/partner/notifications.ts new file mode 100644 index 0000000..d18bfd3 --- /dev/null +++ b/src/resources/partner/notifications.ts @@ -0,0 +1,52 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class NotificationsResource { + constructor(private client: Scope3Client) {} + + /** + * List notifications + * List notifications for the authenticated user with optional filtering by status. + */ + async notificationsList( + params: operations['notifications_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('notifications_list', params); + } + + /** + * Mark notification as read + * Mark a specific notification as read. + */ + async notificationsMarkRead( + params: operations['notifications_mark_read']['requestBody']['content']['application/json'] + ): Promise< + operations['notifications_mark_read']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('notifications_mark_read', params); + } + + /** + * Mark notification as acknowledged + * Mark a specific notification as acknowledged. + */ + async notificationsMarkAcknowledged( + params: operations['notifications_mark_acknowledged']['requestBody']['content']['application/json'] + ): Promise< + operations['notifications_mark_acknowledged']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('notifications_mark_acknowledged', params); + } + + /** + * Mark all notifications as read + * Mark all notifications for the authenticated user as read. + */ + async notificationsMarkAllRead( + params: operations['notifications_mark_all_read']['requestBody']['content']['application/json'] + ): Promise< + operations['notifications_mark_all_read']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('notifications_mark_all_read', params); + } +} diff --git a/src/resources/partner/serviceTokens.ts b/src/resources/partner/serviceTokens.ts new file mode 100644 index 0000000..651de1b --- /dev/null +++ b/src/resources/partner/serviceTokens.ts @@ -0,0 +1,56 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class ServiceTokensResource { + constructor(private client: Scope3Client) {} + + /** + * Create service token + * Create a new service token for API authentication. Returns the full token which should be stored securely as it cannot be retrieved later. + */ + async create( + params: operations['service_token_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_create', params); + } + + /** + * List service tokens + * List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + */ + async list( + params: operations['service_token_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_list', params); + } + + /** + * Get service token + * Get detailed information about a specific service token. The secret is never returned. + */ + async get( + params: operations['service_token_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_get', params); + } + + /** + * Update service token + * Update a service token. Only name, description, and expiration can be modified. + */ + async update( + params: operations['service_token_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_update', params); + } + + /** + * Archive service token + * Archive (soft delete) a service token. This immediately invalidates the token for authentication. + */ + async archive( + params: operations['service_token_archive']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_archive', params); + } +} diff --git a/src/resources/partner/tactics.ts b/src/resources/partner/tactics.ts new file mode 100644 index 0000000..e5454ba --- /dev/null +++ b/src/resources/partner/tactics.ts @@ -0,0 +1,78 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class TacticsResource { + constructor(private client: Scope3Client) {} + + /** + * Create tactic + * Create a new tactic defining how to achieve campaign objectives. + */ + async create( + params: operations['tactic_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_create', params); + } + + /** + * Update tactic + * Update an existing tactic with new targeting, budget, or creative requirements. + */ + async update( + params: operations['tactic_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_update', params); + } + + /** + * Delete tactic + * Delete a tactic and all associated media buys. + */ + async delete( + params: operations['tactic_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_delete', params); + } + + /** + * Get tactic + * Get detailed information about a specific tactic. + */ + async get( + params: operations['tactic_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_get', params); + } + + /** + * List tactics + * List all tactics with optional filtering by brand agent or campaign. + */ + async list( + params: operations['tactic_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_list', params); + } + + /** + * Link tactic to campaign + * Link a tactic to a campaign. + */ + async linkCampaign( + params: operations['tactic_link_campaign']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_link_campaign', params); + } + + /** + * Unlink tactic from campaign + * Unlink a tactic from a campaign. + */ + async unlinkCampaign( + params: operations['tactic_unlink_campaign']['requestBody']['content']['application/json'] + ): Promise< + operations['tactic_unlink_campaign']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('tactic_unlink_campaign', params); + } +} diff --git a/src/resources/partner/targeting.ts b/src/resources/partner/targeting.ts new file mode 100644 index 0000000..765baba --- /dev/null +++ b/src/resources/partner/targeting.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class TargetingResource { + constructor(private client: Scope3Client) {} + + /** + * List countries + * Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + */ + async countryList( + params: operations['country_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('country_list', params); + } + + /** + * List languages + * Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + */ + async languageList( + params: operations['language_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('language_list', params); + } +} diff --git a/src/resources/partner/webhooks.ts b/src/resources/partner/webhooks.ts new file mode 100644 index 0000000..e298327 --- /dev/null +++ b/src/resources/partner/webhooks.ts @@ -0,0 +1,36 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/partner-api'; + +export class WebhooksResource { + constructor(private client: Scope3Client) {} + + /** + * Register webhook + * Register a webhook to receive real-time notifications about events. + */ + async register( + params: operations['webhook_register']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('webhook_register', params); + } + + /** + * List webhooks + * List all registered webhooks. + */ + async list( + params: operations['webhook_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('webhook_list', params); + } + + /** + * Delete webhook + * Delete a registered webhook. + */ + async delete( + params: operations['webhook_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('webhook_delete', params); + } +} diff --git a/src/resources/platform/agents.ts b/src/resources/platform/agents.ts new file mode 100644 index 0000000..f40255c --- /dev/null +++ b/src/resources/platform/agents.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class AgentsResource { + constructor(private client: Scope3Client) {} + + /** + * Get agent + * Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + async get( + params: operations['agent_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_get', params); + } + + /** + * List agents + * List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + async list( + params: operations['agent_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('agent_list', params); + } +} diff --git a/src/resources/platform/assets.ts b/src/resources/platform/assets.ts new file mode 100644 index 0000000..f2a343b --- /dev/null +++ b/src/resources/platform/assets.ts @@ -0,0 +1,16 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class AssetsResource { + constructor(private client: Scope3Client) {} + + /** + * List assets + * List all uploaded assets with optional filtering by brand agent. + */ + async list( + params: operations['asset_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('asset_list', params); + } +} diff --git a/src/resources/platform/brandAgents.ts b/src/resources/platform/brandAgents.ts new file mode 100644 index 0000000..87ff2ad --- /dev/null +++ b/src/resources/platform/brandAgents.ts @@ -0,0 +1,56 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class BrandAgentsResource { + constructor(private client: Scope3Client) {} + + /** + * List brand agents + * List all brand agents (advertiser accounts) for the authenticated customer. Authentication is automatic - no parameters required. + */ + async list( + params: operations['brand_agent_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_agent_list', params); + } + + /** + * Get brand agent + * Get detailed information about a specific brand agent (advertiser account) by ID. + */ + async get( + params: operations['brand_agent_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_agent_get', params); + } + + /** + * Create brand agent + * Create a new brand agent (advertiser account). This creates the top-level container that will own campaigns, creatives, audiences, standards, and measurement sources. + */ + async create( + params: operations['brand_agent_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_agent_create', params); + } + + /** + * Update brand agent + * Update an existing brand agent with new information. + */ + async update( + params: operations['brand_agent_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_agent_update', params); + } + + /** + * Delete brand agent + * Delete a brand agent. This will also delete all associated campaigns, creatives, and other resources. + */ + async delete( + params: operations['brand_agent_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_agent_delete', params); + } +} diff --git a/src/resources/platform/brandStandards.ts b/src/resources/platform/brandStandards.ts new file mode 100644 index 0000000..0c148d5 --- /dev/null +++ b/src/resources/platform/brandStandards.ts @@ -0,0 +1,40 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class BrandStandardsResource { + constructor(private client: Scope3Client) {} + + /** + * Create brand standards + * Create brand standards including guidelines, tone of voice, visual requirements, and content rules for a brand agent. + */ + async standardsCreate( + params: operations['brand_standards_create']['requestBody']['content']['application/json'] + ): Promise< + operations['brand_standards_create']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('brand_standards_create', params); + } + + /** + * Delete brand standards + * Delete brand standards for a brand agent. + */ + async standardsDelete( + params: operations['brand_standards_delete']['requestBody']['content']['application/json'] + ): Promise< + operations['brand_standards_delete']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('brand_standards_delete', params); + } + + /** + * List brand standards + * List all brand standards with optional filtering by brand agent. + */ + async standardsList( + params: operations['brand_standards_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_standards_list', params); + } +} diff --git a/src/resources/platform/brandStories.ts b/src/resources/platform/brandStories.ts new file mode 100644 index 0000000..7aca127 --- /dev/null +++ b/src/resources/platform/brandStories.ts @@ -0,0 +1,46 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class BrandStoriesResource { + constructor(private client: Scope3Client) {} + + /** + * Create brand story + * Create a brand story containing the narrative, history, values, and key messaging for a brand agent. + */ + async storyCreate( + params: operations['brand_story_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_story_create', params); + } + + /** + * Update brand story + * Update an existing brand story with new information. + */ + async storyUpdate( + params: operations['brand_story_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_story_update', params); + } + + /** + * Delete brand story + * Delete a brand story. + */ + async storyDelete( + params: operations['brand_story_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_story_delete', params); + } + + /** + * List brand stories + * List all brand stories with optional filtering by brand agent. + */ + async storyList( + params: operations['brand_story_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('brand_story_list', params); + } +} diff --git a/src/resources/platform/campaigns.ts b/src/resources/platform/campaigns.ts new file mode 100644 index 0000000..3fd7d88 --- /dev/null +++ b/src/resources/platform/campaigns.ts @@ -0,0 +1,88 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class CampaignsResource { + constructor(private client: Scope3Client) {} + + /** + * List campaigns + * List all campaigns with optional filtering by brand agent. + */ + async list( + params: operations['campaign_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_list', params); + } + + /** + * Create campaign + * Create a new campaign with natural language prompt. The backend will parse the prompt to extract targeting, budget, and creative requirements. + */ + async create( + params: operations['campaign_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_create', params); + } + + /** + * Get campaign + * Get detailed information about a specific campaign. + */ + async get( + params: operations['campaign_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_get', params); + } + + /** + * Update campaign + * Update an existing campaign with new information. + */ + async update( + params: operations['campaign_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_update', params); + } + + /** + * Delete campaign + * Delete a campaign and all associated resources. + */ + async delete( + params: operations['campaign_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_delete', params); + } + + /** + * Get campaign summary + * Get a high-level summary of a campaign including key metrics and status. + */ + async getSummary( + params: operations['campaign_get_summary']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_get_summary', params); + } + + /** + * List campaign tactics + * List all tactics associated with a specific campaign. + */ + async listTactics( + params: operations['campaign_list_tactics']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('campaign_list_tactics', params); + } + + /** + * Validate campaign brief + * Validate a campaign brief to ensure it contains all necessary information for campaign creation. + */ + async validateBrief( + params: operations['campaign_validate_brief']['requestBody']['content']['application/json'] + ): Promise< + operations['campaign_validate_brief']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('campaign_validate_brief', params); + } +} diff --git a/src/resources/platform/channels.ts b/src/resources/platform/channels.ts new file mode 100644 index 0000000..965faae --- /dev/null +++ b/src/resources/platform/channels.ts @@ -0,0 +1,16 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class ChannelsResource { + constructor(private client: Scope3Client) {} + + /** + * List channels + * List all available advertising channels and platforms. + */ + async list( + params: operations['channel_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('channel_list', params); + } +} diff --git a/src/resources/platform/creatives.ts b/src/resources/platform/creatives.ts new file mode 100644 index 0000000..78b0622 --- /dev/null +++ b/src/resources/platform/creatives.ts @@ -0,0 +1,66 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class CreativesResource { + constructor(private client: Scope3Client) {} + + /** + * Assign creative + * Assign a creative to a tactic or media buy. + */ + async assign( + params: operations['creative_assign']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('creative_assign', params); + } + + /** + * Create creative + * Create a new creative with assets, copy, and targeting specifications. + */ + async create( + params: operations['creative_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('creative_create', params); + } + + /** + * Update creative + * Update an existing creative with new assets, copy, or specifications. + */ + async update( + params: operations['creative_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('creative_update', params); + } + + /** + * Delete creative + * Delete a creative and remove it from any associated tactics or media buys. + */ + async delete( + params: operations['creative_delete']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('creative_delete', params); + } + + /** + * Get creative + * Get detailed information about a specific creative. + */ + async get( + params: operations['creative_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('creative_get', params); + } + + /** + * List creatives + * List all creatives with optional filtering by brand agent or campaign. + */ + async list( + params: operations['creative_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('creative_list', params); + } +} diff --git a/src/resources/platform/customers.ts b/src/resources/platform/customers.ts new file mode 100644 index 0000000..8ea46dd --- /dev/null +++ b/src/resources/platform/customers.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class CustomersResource { + constructor(private client: Scope3Client) {} + + /** + * Get customer info + * Get detailed information about a customer from the core database. + */ + async get( + params: operations['customer_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('customer_get', params); + } + + /** + * Get customer seats + * Get all seats associated with a customer from the core database. + */ + async getSeats( + params: operations['customer_get_seats']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('customer_get_seats', params); + } +} diff --git a/src/resources/platform/mediaBuys.ts b/src/resources/platform/mediaBuys.ts new file mode 100644 index 0000000..14ed37d --- /dev/null +++ b/src/resources/platform/mediaBuys.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class MediaBuysResource { + constructor(private client: Scope3Client) {} + + /** + * Get media buy + * Get detailed information about a specific media buy. + */ + async get( + params: operations['media_buy_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_get', params); + } + + /** + * List media buys + * List all media buys with optional filtering by brand agent, campaign, or status. + */ + async list( + params: operations['media_buy_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_buy_list', params); + } +} diff --git a/src/resources/platform/mediaProducts.ts b/src/resources/platform/mediaProducts.ts new file mode 100644 index 0000000..2e8c517 --- /dev/null +++ b/src/resources/platform/mediaProducts.ts @@ -0,0 +1,16 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class MediaProductsResource { + constructor(private client: Scope3Client) {} + + /** + * List media products + * List saved media products with optional filtering. + */ + async list( + params: operations['media_product_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('media_product_list', params); + } +} diff --git a/src/resources/platform/outcomeAgents.ts b/src/resources/platform/outcomeAgents.ts new file mode 100644 index 0000000..109e3b8 --- /dev/null +++ b/src/resources/platform/outcomeAgents.ts @@ -0,0 +1,42 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class OutcomeAgentsResource { + constructor(private client: Scope3Client) {} + + /** + * Get proposals from outcome agents + * Request tactical proposals from outcome agents for a campaign. Outcome agents analyze the campaign brief and budget to propose execution strategies. + */ + async outcomesAgentGetProposals( + params: operations['outcomes_agent_get_proposals']['requestBody']['content']['application/json'] + ): Promise< + operations['outcomes_agent_get_proposals']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('outcomes_agent_get_proposals', params); + } + + /** + * Accept outcome agent proposal + * Accept a proposal from an outcome agent, creating a tactic and assigning it to the agent for management. + */ + async outcomesAgentAcceptProposal( + params: operations['outcomes_agent_accept_proposal']['requestBody']['content']['application/json'] + ): Promise< + operations['outcomes_agent_accept_proposal']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('outcomes_agent_accept_proposal', params); + } + + /** + * List tactics by outcome agent + * List all tactics managed by a specific outcome agent. + */ + async outcomesAgentListTactics( + params: operations['outcomes_agent_list_tactics']['requestBody']['content']['application/json'] + ): Promise< + operations['outcomes_agent_list_tactics']['responses'][200]['content']['application/json'] + > { + return this.client['callTool']('outcomes_agent_list_tactics', params); + } +} diff --git a/src/resources/platform/serviceTokens.ts b/src/resources/platform/serviceTokens.ts new file mode 100644 index 0000000..a958299 --- /dev/null +++ b/src/resources/platform/serviceTokens.ts @@ -0,0 +1,56 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class ServiceTokensResource { + constructor(private client: Scope3Client) {} + + /** + * Create service token + * Create a new service token for API authentication. Returns the full token which should be stored securely as it cannot be retrieved later. + */ + async create( + params: operations['service_token_create']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_create', params); + } + + /** + * List service tokens + * List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + */ + async list( + params: operations['service_token_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_list', params); + } + + /** + * Get service token + * Get detailed information about a specific service token. The secret is never returned. + */ + async get( + params: operations['service_token_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_get', params); + } + + /** + * Update service token + * Update a service token. Only name, description, and expiration can be modified. + */ + async update( + params: operations['service_token_update']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_update', params); + } + + /** + * Archive service token + * Archive (soft delete) a service token. This immediately invalidates the token for authentication. + */ + async archive( + params: operations['service_token_archive']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('service_token_archive', params); + } +} diff --git a/src/resources/platform/tactics.ts b/src/resources/platform/tactics.ts new file mode 100644 index 0000000..ee3ae4a --- /dev/null +++ b/src/resources/platform/tactics.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class TacticsResource { + constructor(private client: Scope3Client) {} + + /** + * Get tactic + * Get detailed information about a specific tactic. + */ + async get( + params: operations['tactic_get']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_get', params); + } + + /** + * List tactics + * List all tactics with optional filtering by brand agent or campaign. + */ + async list( + params: operations['tactic_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('tactic_list', params); + } +} diff --git a/src/resources/platform/targeting.ts b/src/resources/platform/targeting.ts new file mode 100644 index 0000000..d30cac3 --- /dev/null +++ b/src/resources/platform/targeting.ts @@ -0,0 +1,26 @@ +import { Scope3Client } from '../../client'; +import type { operations } from '../../types/platform-api'; + +export class TargetingResource { + constructor(private client: Scope3Client) {} + + /** + * List countries + * Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + */ + async countryList( + params: operations['country_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('country_list', params); + } + + /** + * List languages + * Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + */ + async languageList( + params: operations['language_list']['requestBody']['content']['application/json'] + ): Promise { + return this.client['callTool']('language_list', params); + } +} diff --git a/src/resources/products.ts b/src/resources/products.ts deleted file mode 100644 index e2946db..0000000 --- a/src/resources/products.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface MediaProductListRequest { - salesAgentId?: string; -} - -export interface MediaProductDiscoverRequest { - salesAgentId?: string; -} - -export interface MediaProductSyncRequest { - salesAgentId: string; -} - -export class ProductsResource { - constructor(private client: Scope3Client) {} - - async list(request: MediaProductListRequest = {}): Promise { - return this.client['callTool']('media_product_list', request); - } - - async discover(request: MediaProductDiscoverRequest = {}): Promise { - return this.client['callTool']('media_product_discover', request); - } - - async sync(request: MediaProductSyncRequest): Promise { - return this.client['callTool']('media_product_sync', request); - } -} diff --git a/src/resources/tactics.ts b/src/resources/tactics.ts deleted file mode 100644 index 9d71c99..0000000 --- a/src/resources/tactics.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export type ChannelCode = - | 'DIGITAL-AUDIO' - | 'DISPLAY-WEB' - | 'DISPLAY-APP' - | 'CTV-BVOD' - | 'OLV' - | 'DOOH' - | 'SOCIAL'; - -export interface TacticListRequest { - campaignId?: string; - includeArchived?: boolean; -} - -export interface TacticCreateRequest { - name: string; - campaignId: string; - prompt?: string; - channelCodes?: ChannelCode[]; - countryCodes?: string[]; -} - -export interface TacticGetRequest { - tacticId: string; -} - -export interface TacticUpdateRequest { - tacticId: string; - name?: string; - prompt?: string; - channelCodes?: ChannelCode[]; - countryCodes?: string[]; -} - -export interface TacticDeleteRequest { - tacticId: string; -} - -export interface TacticLinkCampaignRequest { - tacticId: string; - campaignId: string; -} - -export interface TacticUnlinkCampaignRequest { - tacticId: string; - campaignId: string; -} - -export class TacticsResource { - constructor(private client: Scope3Client) {} - - async list(request: TacticListRequest = {}): Promise { - return this.client['callTool']('tactic_list', request); - } - - async create(request: TacticCreateRequest): Promise { - return this.client['callTool']('tactic_create', request); - } - - async get(request: TacticGetRequest): Promise { - return this.client['callTool']('tactic_get', request); - } - - async update(request: TacticUpdateRequest): Promise { - return this.client['callTool']('tactic_update', request); - } - - async delete(request: TacticDeleteRequest): Promise { - return this.client['callTool']('tactic_delete', request); - } - - async linkCampaign(request: TacticLinkCampaignRequest): Promise { - return this.client['callTool']('tactic_link_campaign', request); - } - - async unlinkCampaign(request: TacticUnlinkCampaignRequest): Promise { - return this.client['callTool']('tactic_unlink_campaign', request); - } -} diff --git a/src/sdk.ts b/src/sdk.ts deleted file mode 100644 index f2b7dc4..0000000 --- a/src/sdk.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Scope3Client } from './client'; -import { ClientConfig } from './types'; -import { AgentsResource } from './resources/agents'; -import { AssetsResource } from './resources/assets'; -import { BrandAgentsResource } from './resources/brand-agents'; -import { BrandStandardsResource } from './resources/brand-standards'; -import { BrandStoriesResource } from './resources/brand-stories'; -import { CampaignsResource } from './resources/campaigns'; -import { ChannelsResource } from './resources/channels'; -import { CreativesResource } from './resources/creatives'; -import { TacticsResource } from './resources/tactics'; -import { MediaBuysResource } from './resources/media-buys'; -import { NotificationsResource } from './resources/notifications'; -import { ProductsResource } from './resources/products'; - -export class Scope3AgenticClient extends Scope3Client { - public readonly agents: AgentsResource; - public readonly assets: AssetsResource; - public readonly brandAgents: BrandAgentsResource; - public readonly brandStandards: BrandStandardsResource; - public readonly brandStories: BrandStoriesResource; - public readonly campaigns: CampaignsResource; - public readonly channels: ChannelsResource; - public readonly creatives: CreativesResource; - public readonly tactics: TacticsResource; - public readonly mediaBuys: MediaBuysResource; - public readonly notifications: NotificationsResource; - public readonly products: ProductsResource; - - constructor(config: ClientConfig) { - super(config); - - this.agents = new AgentsResource(this); - this.assets = new AssetsResource(this); - this.brandAgents = new BrandAgentsResource(this); - this.brandStandards = new BrandStandardsResource(this); - this.brandStories = new BrandStoriesResource(this); - this.campaigns = new CampaignsResource(this); - this.channels = new ChannelsResource(this); - this.creatives = new CreativesResource(this); - this.tactics = new TacticsResource(this); - this.mediaBuys = new MediaBuysResource(this); - this.notifications = new NotificationsResource(this); - this.products = new ProductsResource(this); - } - - // Expose MCP methods for CLI dynamic command generation - async listTools(): Promise { - if (!this.getClient()) { - await this.connect(); - } - return this.getClient().listTools(); - } - - async callTool, TResponse = unknown>( - toolName: string, - args: TRequest - ): Promise { - return super.callTool(toolName, args); - } -} diff --git a/src/simple-media-agent-server.ts b/src/simple-media-agent-server.ts deleted file mode 100644 index 3c987e2..0000000 --- a/src/simple-media-agent-server.ts +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node -import { SimpleMediaAgent } from './simple-media-agent.js'; - -const scope3ApiKey = process.env.SCOPE3_API_KEY; -const scope3BaseUrl = process.env.SCOPE3_BASE_URL; -const minDailyBudget = process.env.MIN_DAILY_BUDGET - ? parseFloat(process.env.MIN_DAILY_BUDGET) - : 100; -const overallocationPercent = process.env.OVERALLOCATION_PERCENT - ? parseFloat(process.env.OVERALLOCATION_PERCENT) - : 40; - -if (!scope3ApiKey) { - console.error('Error: SCOPE3_API_KEY environment variable is required'); - process.exit(1); -} - -const agent = new SimpleMediaAgent({ - scope3ApiKey, - scope3BaseUrl, - minDailyBudget, - overallocationPercent, - name: 'simple-media-agent', - version: '1.0.0', -}); - -agent.start().catch((error) => { - console.error('Fatal error:', error); - process.exit(1); -}); - -console.error(` -Simple Media Agent -- Scope3 Base URL: ${scope3BaseUrl || 'https://api.agentic.scope3.com'} -- Min Daily Budget: $${minDailyBudget} -- Overallocation: ${overallocationPercent}% (sum of all media buy budgets) -- Protocol: MCP (stdio) -`); diff --git a/src/simple-media-agent.ts b/src/simple-media-agent.ts deleted file mode 100644 index 4dc6811..0000000 --- a/src/simple-media-agent.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { FastMCP } from 'fastmcp'; -import { z } from 'zod'; -import { Scope3AgenticClient } from './sdk'; -import type { SimpleMediaAgentConfig, MediaBuyAllocation } from './simple-media-agent/types'; -import { getProposedTactics } from './simple-media-agent/get-proposed-tactics'; -import { manageTactic } from './simple-media-agent/manage-tactic'; - -/** - * Simple Media Agent that exposes MCP tools - * Called by Scope3 platform via MCP protocol - */ -export class SimpleMediaAgent { - private server: FastMCP; - private scope3: Scope3AgenticClient; - private config: Required< - Omit & { name: string; version: string } - >; - private activeTactics: Map; - - constructor(config: SimpleMediaAgentConfig) { - this.config = { - scope3ApiKey: config.scope3ApiKey, - scope3BaseUrl: config.scope3BaseUrl || 'https://api.agentic.scope3.com', - minDailyBudget: config.minDailyBudget || 100, - overallocationPercent: config.overallocationPercent || 40, - name: config.name || 'simple-media-agent', - version: (config.version as `${number}.${number}.${number}`) || '1.0.0', - }; - - this.server = new FastMCP({ - name: this.config.name, - version: this.config.version as `${number}.${number}.${number}`, - }); - - this.scope3 = new Scope3AgenticClient({ - apiKey: this.config.scope3ApiKey, - baseUrl: this.config.scope3BaseUrl, - }); - - this.activeTactics = new Map(); - this.setupTools(); - } - - private setupTools(): void { - // get_proposed_tactics tool - this.server.addTool({ - name: 'get_proposed_tactics', - description: - 'Get tactic proposals from this media agent. Returns budget allocation based on floor prices from sales agents.', - parameters: z.object({ - campaignId: z.string().describe('Campaign ID'), - budgetRange: z - .object({ - min: z.number(), - max: z.number(), - currency: z.string(), - }) - .optional(), - channels: z.array(z.string()).optional().describe('Media channels'), - countries: z.array(z.string()).optional().describe('ISO country codes'), - seatId: z.string().describe('Seat/account ID'), - }), - execute: async (args) => { - const result = await getProposedTactics(this.scope3, args); - return JSON.stringify(result, null, 2); - }, - }); - - // manage_tactic tool - this.server.addTool({ - name: 'manage_tactic', - description: - 'Assign this media agent to manage a tactic. Creates media buys with overallocated budgets.', - parameters: z.object({ - tacticId: z.string().describe('Tactic ID'), - tacticContext: z.object({}).passthrough().describe('Tactic details including budget'), - brandAgentId: z.string().describe('Brand agent ID'), - seatId: z.string().describe('Seat/account ID'), - }), - execute: async (args) => { - const result = await manageTactic( - this.scope3, - this.config.minDailyBudget, - this.config.overallocationPercent, - this.activeTactics, - args - ); - return JSON.stringify(result, null, 2); - }, - }); - } - - async start(): Promise { - await this.server.start({ - transportType: 'stdio', - }); - } -} diff --git a/src/simple-media-agent/get-proposed-tactics.ts b/src/simple-media-agent/get-proposed-tactics.ts deleted file mode 100644 index 2845081..0000000 --- a/src/simple-media-agent/get-proposed-tactics.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { Scope3AgenticClient } from '../sdk'; -import type { ProposedTactic } from './types'; - -export async function getProposedTactics( - scope3: Scope3AgenticClient, - args: { - campaignId: string; - budgetRange?: { min: number; max: number; currency: string }; - seatId: string; - } -): Promise<{ proposedTactics: ProposedTactic[] }> { - const { campaignId, budgetRange } = args; - - // Get all registered agents (SALES type) - const agentsResponse = await scope3.agents.list({ type: 'SALES' }); - const agents = agentsResponse.data || []; - - if (!Array.isArray(agents)) { - throw new Error('Expected agents to be an array'); - } - - // Call getProducts for each agent - const allProducts: Array<{ - id: string; - salesAgentId: string; - floorPrice?: number; - recommendedPrice?: number; - name?: string; - }> = []; - - for (const agent of agents) { - try { - const productsResponse = await scope3.products.discover({ - salesAgentId: agent.id, - }); - - const products = productsResponse.data; - if (!Array.isArray(products)) continue; - - const mappedProducts = products.map((p) => ({ - id: p.id, - salesAgentId: agent.id, - floorPrice: p.floorPrice, - recommendedPrice: p.recommendedPrice, - name: p.name, - })); - - allProducts.push(...mappedProducts); - } catch (error) { - console.error(`Error fetching products from agent ${agent.id}:`, error); - } - } - - // Fail if no products found - if (allProducts.length === 0) { - throw new Error( - `No products available from ${agents.length} agents. ` + - 'Cannot propose tactics without available inventory.' - ); - } - - // Sort by floor price (cheapest first) - allProducts.sort((a, b) => (a.floorPrice || 0) - (b.floorPrice || 0)); - - // Calculate average floor price for proposal - const avgFloorPrice = - allProducts.reduce((sum, p) => sum + (p.floorPrice || 0), 0) / allProducts.length; - - return { - proposedTactics: [ - { - tacticId: `simple-passthrough-${campaignId}`, - execution: `Passthrough strategy: distribute budget across ${allProducts.length} products based on floor prices with 40% overallocation.`, - budgetCapacity: budgetRange?.max || 0, - pricing: { - method: 'passthrough', - estimatedCpm: avgFloorPrice, - currency: 'USD', - }, - sku: 'simple-passthrough', - }, - ], - }; -} diff --git a/src/simple-media-agent/manage-tactic.ts b/src/simple-media-agent/manage-tactic.ts deleted file mode 100644 index b35252e..0000000 --- a/src/simple-media-agent/manage-tactic.ts +++ /dev/null @@ -1,145 +0,0 @@ -import type { Scope3AgenticClient } from '../sdk'; -import type { MediaBuyAllocation } from './types'; - -function calculateBudgetAllocation( - products: Array<{ - id: string; - salesAgentId: string; - floorPrice?: number; - }>, - totalBudget: number, - minDailyBudget: number, - overallocationPercent: number -): MediaBuyAllocation[] { - if (products.length === 0) return []; - - // Apply overallocation to total budget - // The SUM of all media buy budgets = totalBudget * (1 + overallocationPercent/100) - const overallocationMultiplier = 1 + overallocationPercent / 100; - const allocatedTotalBudget = totalBudget * overallocationMultiplier; - - // Calculate N = number of products where daily budget >= minDailyBudget - const assumedDays = 30; - const maxProducts = Math.floor(allocatedTotalBudget / assumedDays / minDailyBudget); - const n = Math.min(maxProducts, products.length); - - if (n === 0) return []; - - // Take N cheapest products - const selectedProducts = products.slice(0, n); - - // Divide overallocated budget equally - // Each media buy gets: allocatedTotalBudget / N - const budgetPerProduct = allocatedTotalBudget / n; - - return selectedProducts.map((product) => ({ - mediaProductId: product.id, - salesAgentId: product.salesAgentId, - budgetAmount: budgetPerProduct, - budgetCurrency: 'USD', - pricingCpm: product.floorPrice || 0, - })); -} - -export async function manageTactic( - scope3: Scope3AgenticClient, - minDailyBudget: number, - overallocationPercent: number, - tacticAllocations: Map, - args: { - tacticId: string; - tacticContext: { budget?: number }; - brandAgentId: string; - seatId: string; - } -): Promise<{ - acknowledged: boolean; - reason?: string; -}> { - const { tacticId, tacticContext } = args; - - console.log(`Managing tactic ${tacticId}`); - - // Get all registered agents (SALES type) - const agentsResponse = await scope3.agents.list({ type: 'SALES' }); - const agents = agentsResponse.data || []; - - if (!Array.isArray(agents)) { - throw new Error('Expected agents to be an array'); - } - - // Get products from all agents - const allProducts: Array<{ - id: string; - salesAgentId: string; - floorPrice?: number; - recommendedPrice?: number; - name?: string; - }> = []; - - for (const agent of agents) { - try { - const productsResponse = await scope3.products.discover({ - salesAgentId: agent.id, - }); - - const products = productsResponse.data; - if (!Array.isArray(products)) continue; - - const mappedProducts = products.map((p) => ({ - id: p.id, - salesAgentId: agent.id, - floorPrice: p.floorPrice, - recommendedPrice: p.recommendedPrice, - name: p.name, - })); - - allProducts.push(...mappedProducts); - } catch (error) { - console.error(`Error fetching products from agent ${agent.id}:`, error); - } - } - - // Sort by floor price (cheapest first) - allProducts.sort((a, b) => (a.floorPrice || 0) - (b.floorPrice || 0)); - - // Calculate budget allocation with overallocation - const totalBudget = tacticContext.budget || 0; - const allocations = calculateBudgetAllocation( - allProducts, - totalBudget, - minDailyBudget, - overallocationPercent - ); - - // Store tactic info for later reallocation - tacticAllocations.set(tacticId, { - allocations, - }); - - // Create media buys for each allocation - for (const allocation of allocations) { - try { - await scope3.mediaBuys.create({ - tacticId, - name: `Media Buy - ${allocation.mediaProductId}`, - products: [allocation], - budget: { - amount: allocation.budgetAmount || 0, - currency: allocation.budgetCurrency || 'USD', - }, - }); - } catch (error) { - console.error(`Error creating media buy for product ${allocation.mediaProductId}:`, error); - // Return failure if we can't create media buys - return { - acknowledged: false, - reason: `Failed to create media buy for product ${allocation.mediaProductId}`, - }; - } - } - - return { - acknowledged: true, - }; -} diff --git a/src/simple-media-agent/types.ts b/src/simple-media-agent/types.ts deleted file mode 100644 index e6b23ca..0000000 --- a/src/simple-media-agent/types.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { MediaBuyProduct } from '../resources/media-buys'; - -export interface SimpleMediaAgentConfig { - scope3ApiKey: string; - scope3BaseUrl?: string; - minDailyBudget?: number; - overallocationPercent?: number; - name?: string; - version?: string; -} - -// MediaBuyAllocation uses MediaBuyProduct from the ADCP client library -export type MediaBuyAllocation = MediaBuyProduct; - -export interface ProposedTactic { - tacticId: string; - execution: string; - budgetCapacity: number; - pricing: { - method: string; - estimatedCpm: number; - currency: string; - }; - sku: string; -} diff --git a/src/types/outcome-agent-api.ts b/src/types/outcome-agent-api.ts new file mode 100644 index 0000000..e5aef35 --- /dev/null +++ b/src/types/outcome-agent-api.ts @@ -0,0 +1,377 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/get-proposals': { + /** + * Get proposals from your agent + * @description Scope3 calls this endpoint when setting up a campaign to ask for proposals + * from your agent on how you would approach execution. + * + * Analyze the campaign and respond with proposals, budget capacity, + * and your pricing model. + */ + post: operations['get_proposed_tactics']; + }; + '/accept-proposal': { + /** + * Accept or decline proposal assignment + * @description Scope3 calls this when your proposal is accepted and you are assigned to manage a tactic. + * You should acknowledge and begin setup, or decline if you can't fulfill it. + * + * The campaign context contains everything you need: budget, schedule, + * targeting constraints, creatives, and any custom fields. + */ + post: operations['accept_proposal']; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + /** @description Budget range for campaign planning (buyer typically won't reveal full budget) */ + BudgetRange: { + /** + * @description Minimum budget available + * @example 50000 + */ + min?: number; + /** + * @description Maximum budget available + * @example 150000 + */ + max?: number; + /** + * @description Currency for budget (ISO 4217 code) + * @default USD + * @example USD + */ + currency?: string; + }; + TacticPricing: { + /** + * @description How the outcome agent charges for this tactic (revshare or cost_per_unit) + * @example revshare + * @enum {string} + */ + method: 'revshare' | 'cost_per_unit'; + /** + * @description Rate for the pricing method (e.g., 0.15 for 15% revshare, 2.50 for $2.50 CPM) + * @example 0.15 + */ + rate: number; + /** + * @description Pricing unit (required when method is cost_per_unit) + * @example cpm + * @enum {string} + */ + unit?: 'cpm' | 'cpc' | 'cpa' | 'cpv' | 'cpcv'; + /** + * @description Currency for pricing (ISO 4217 code) + * @default USD + * @example USD + */ + currency?: string; + }; + CustomField: { + /** + * @description Name of the custom field + * @example targetVCPM + */ + fieldName?: string; + /** + * @description Data type of the field + * @example number + * @enum {string} + */ + fieldType?: 'string' | 'number' | 'boolean' | 'array' | 'object'; + /** + * @description Help text explaining what this field does + * @example Target vCPM in USD + */ + description?: string; + }; + /** @description Product reference from sales agent */ + Product: { + /** + * @description URL of the sales agent offering this product + * @example https://sales-agent.example.com + */ + sales_agent_url: string; + /** + * @description Product reference ID from the sales agent + * @example prod_premium_display + */ + product_ref: string; + /** + * @description Pricing option ID for this product + * @example pricing_opt_123 + */ + pricing_option_id: string; + }; + GetProposalsRequest: { + /** + * @description Campaign ID + * @example camp_123 + */ + campaignId: string; + budgetRange?: components['schemas']['BudgetRange']; + /** + * Format: date-time + * @description Campaign start date in UTC (ISO 8601 format) + * @example 2025-01-01T00:00:00Z + */ + startDate?: string; + /** + * Format: date-time + * @description Campaign end date in UTC (ISO 8601 format) + * @example 2025-01-31T23:59:59Z + */ + endDate?: string; + /** + * @description Advertising channels (from ADCP specification) + * @example [ + * "display", + * "video" + * ] + */ + channels?: ('display' | 'video' | 'native' | 'audio' | 'connected_tv')[]; + /** + * @description ISO 3166-1 alpha-2 country codes + * @example [ + * "US", + * "CA" + * ] + */ + countries?: string[]; + /** + * @description Campaign brief text + * @example Launch campaign for new product... + */ + brief?: string; + /** @description Optional product objects to include in proposals (full product details, not just IDs) */ + products?: components['schemas']['Product'][]; + /** + * @description Optional property list IDs for targeting (references Scope3 property lists) + * @example [ + * 123, + * 456 + * ] + */ + propertyListIds?: number[]; + /** + * @description Seat/account ID for this request + * @example seat_456 + */ + seatId: string; + }; + Proposal: { + /** + * @description Unique identifier for this proposal (you generate this). The tactic ID will be assigned when the proposal is accepted. + * @example premium-vcpm-display + */ + proposalId: string; + /** + * @description How you would execute this proposal + * @example Target premium inventory at $2.50 vCPM with 85% viewability + */ + execution: string; + /** + * @description Maximum budget you can effectively manage + * @example 50000 + */ + budgetCapacity: number; + pricing: components['schemas']['TacticPricing']; + /** + * @description Identifier for this tactic type + * @example premium-vcpm + */ + sku?: string; + /** @description Custom fields needed to execute this proposal */ + customFieldsRequired?: components['schemas']['CustomField'][]; + /** + * @description Generic blob to store additional information about the proposal that will be passed back when accepted + * @example { + * "property_list": [ + * "prop1", + * "prop2" + * ], + * "custom_data": "value" + * } + */ + additional_info?: Record; + }; + GetProposalsResponse: { + /** @description List of proposals you can provide (empty array if none) */ + proposals?: components['schemas']['Proposal'][]; + }; + CampaignContext: { + /** + * @description Budget allocated + * @example 50000 + */ + budget?: number; + /** + * @description Currency for budget (ISO 4217 code) + * @default USD + * @example USD + */ + budgetCurrency?: string; + /** + * Format: date-time + * @description Campaign start date in UTC (ISO 8601 format) + * @example 2025-01-01T00:00:00Z + */ + startDate?: string; + /** + * Format: date-time + * @description Campaign end date in UTC (ISO 8601 format) + * @example 2025-01-31T23:59:59Z + */ + endDate?: string; + /** + * @description Advertising channel (from ADCP specification) + * @example display + * @enum {string} + */ + channel?: 'display' | 'video' | 'native' | 'audio' | 'connected_tv'; + /** + * @description Target countries + * @example [ + * "US" + * ] + */ + countries?: string[]; + /** @description Creative assets to use (uses Creative from main schema) */ + creatives?: components['schemas']['Creative'][]; + /** @description Brand safety and suitability requirements (uses BrandStandard from main schema) */ + brandStandards?: components['schemas']['BrandStandard'][]; + }; + AcceptProposalRequest: { + /** + * @description ID of the tactic from the strategy table (assigned when user accepts your proposal) + * @example 12345 + */ + tacticId: string; + /** + * @description ID of the proposal that was accepted (matches proposalId from GetProposalsResponse) + * @example premium-vcpm-display + */ + proposalId?: string; + campaignContext: components['schemas']['CampaignContext']; + /** + * @description Brand agent (advertiser) for this campaign + * @example ba_123 + */ + brandAgentId: string; + /** + * @description Seat/account ID + * @example seat_456 + */ + seatId: string; + /** + * @description Custom fields provided by advertiser + * @example { + * "targetVCPM": 2.5 + * } + */ + customFields?: Record; + /** + * @description The additional_info blob that was returned in the proposal response + * @example { + * "property_list": [ + * "prop1", + * "prop2" + * ], + * "custom_data": "value" + * } + */ + additional_info?: Record; + }; + AcceptProposalResponse: { + /** + * @description true to accept assignment, false to decline + * @example true + */ + acknowledged: boolean; + /** + * @description Optional reason if declining + * @example Insufficient budget for effective optimization + */ + reason?: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type $defs = Record; + +export type external = Record; + +export interface operations { + /** + * Get proposals from your agent + * @description Scope3 calls this endpoint when setting up a campaign to ask for proposals + * from your agent on how you would approach execution. + * + * Analyze the campaign and respond with proposals, budget capacity, + * and your pricing model. + */ + get_proposed_tactics: { + requestBody: { + content: { + 'application/json': components['schemas']['GetProposalsRequest']; + }; + }; + responses: { + /** @description Proposals from your agent */ + 200: { + content: { + 'application/json': components['schemas']['GetProposalsResponse']; + }; + }; + /** @description Invalid request */ + 400: { + content: never; + }; + /** @description Internal error */ + 500: { + content: never; + }; + }; + }; + /** + * Accept or decline proposal assignment + * @description Scope3 calls this when your proposal is accepted and you are assigned to manage a tactic. + * You should acknowledge and begin setup, or decline if you can't fulfill it. + * + * The campaign context contains everything you need: budget, schedule, + * targeting constraints, creatives, and any custom fields. + */ + accept_proposal: { + requestBody: { + content: { + 'application/json': components['schemas']['AcceptProposalRequest']; + }; + }; + responses: { + /** @description Acknowledgment of tactic assignment */ + 200: { + content: { + 'application/json': components['schemas']['AcceptProposalResponse']; + }; + }; + /** @description Invalid request */ + 400: { + content: never; + }; + }; + }; +} diff --git a/src/types/partner-api.ts b/src/types/partner-api.ts new file mode 100644 index 0000000..85ffea6 --- /dev/null +++ b/src/types/partner-api.ts @@ -0,0 +1,4660 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/mcp-initialize': { + /** + * Initialize MCP session + * @description Initialize a new MCP session. This must be called before using any tools. The session ID should be generated as a UUID and included in the mcp-session-id header for all subsequent requests. + */ + post: operations['mcp_initialize']; + }; + '/channel-list': { + /** + * List channels + * @description List all available advertising channels and platforms. + */ + post: operations['channel_list']; + }; + '/country-list': { + /** + * List countries + * @description Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + */ + post: operations['country_list']; + }; + '/language-list': { + /** + * List languages + * @description Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + */ + post: operations['language_list']; + }; + '/creative-sync-sales-agents': { + /** + * Sync creatives to sales agents + * @description Synchronize creatives to connected sales agents (DSPs, publisher platforms). + */ + post: operations['creative_sync_sales_agents']; + }; + '/media-buy-create': { + /** + * Create media buy + * @description Create a new media buy with budget, targeting, and creative specifications. + */ + post: operations['media_buy_create']; + }; + '/media-buy-update': { + /** + * Update media buy + * @description Update an existing media buy with new budget, targeting, or creative assignments. + */ + post: operations['media_buy_update']; + }; + '/media-buy-delete': { + /** + * Delete media buy + * @description Delete a media buy and cancel any active placements. + */ + post: operations['media_buy_delete']; + }; + '/media-buy-execute': { + /** + * Execute media buy + * @description Execute a media buy, sending it to the configured sales agents for placement. + */ + post: operations['media_buy_execute']; + }; + '/media-buy-get': { + /** + * Get media buy + * @description Get detailed information about a specific media buy. + */ + post: operations['media_buy_get']; + }; + '/media-buy-list': { + /** + * List media buys + * @description List all media buys with optional filtering by brand agent, campaign, or status. + */ + post: operations['media_buy_list']; + }; + '/media-buy-validate-budget': { + /** + * Validate media buy budget + * @description Validate a media buy budget against campaign constraints and available funds. + */ + post: operations['media_buy_validate_budget']; + }; + '/notifications-list': { + /** + * List notifications + * @description List notifications for the authenticated user with optional filtering by status. + */ + post: operations['notifications_list']; + }; + '/notifications-mark-read': { + /** + * Mark notification as read + * @description Mark a specific notification as read. + */ + post: operations['notifications_mark_read']; + }; + '/notifications-mark-acknowledged': { + /** + * Mark notification as acknowledged + * @description Mark a specific notification as acknowledged. + */ + post: operations['notifications_mark_acknowledged']; + }; + '/notifications-mark-all-read': { + /** + * Mark all notifications as read + * @description Mark all notifications for the authenticated user as read. + */ + post: operations['notifications_mark_all_read']; + }; + '/media-product-discover': { + /** + * Discover media products + * @description Discover available media products from connected sales agents based on targeting criteria. + */ + post: operations['media_product_discover']; + }; + '/media-product-save': { + /** + * Save media product + * @description Save a discovered media product for future use in media buys. + */ + post: operations['media_product_save']; + }; + '/media-product-list': { + /** + * List media products + * @description List saved media products with optional filtering. + */ + post: operations['media_product_list']; + }; + '/media-product-sync': { + /** + * Sync media products + * @description Synchronize media product catalog from connected sales agents. + */ + post: operations['media_product_sync']; + }; + '/agent-get': { + /** + * Get agent + * @description Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + post: operations['agent_get']; + }; + '/agent-list': { + /** + * List agents + * @description List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + post: operations['agent_list']; + }; + '/agent-register': { + /** + * Register agent + * @description Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). + */ + post: operations['agent_register']; + }; + '/agent-unregister': { + /** + * Unregister agent + * @description Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. + */ + post: operations['agent_unregister']; + }; + '/agent-update': { + /** + * Update agent + * @description Update agent configuration and credentials. Type is automatically inferred from the agent ID. + */ + post: operations['agent_update']; + }; + '/tactic-create': { + /** + * Create tactic + * @description Create a new tactic defining how to achieve campaign objectives. + */ + post: operations['tactic_create']; + }; + '/tactic-update': { + /** + * Update tactic + * @description Update an existing tactic with new targeting, budget, or creative requirements. + */ + post: operations['tactic_update']; + }; + '/tactic-delete': { + /** + * Delete tactic + * @description Delete a tactic and all associated media buys. + */ + post: operations['tactic_delete']; + }; + '/tactic-get': { + /** + * Get tactic + * @description Get detailed information about a specific tactic. + */ + post: operations['tactic_get']; + }; + '/tactic-list': { + /** + * List tactics + * @description List all tactics with optional filtering by brand agent or campaign. + */ + post: operations['tactic_list']; + }; + '/tactic-link-campaign': { + /** + * Link tactic to campaign + * @description Link a tactic to a campaign. + */ + post: operations['tactic_link_campaign']; + }; + '/tactic-unlink-campaign': { + /** + * Unlink tactic from campaign + * @description Unlink a tactic from a campaign. + */ + post: operations['tactic_unlink_campaign']; + }; + '/webhook-register': { + /** + * Register webhook + * @description Register a webhook to receive real-time notifications about events. + */ + post: operations['webhook_register']; + }; + '/webhook-list': { + /** + * List webhooks + * @description List all registered webhooks. + */ + post: operations['webhook_list']; + }; + '/webhook-delete': { + /** + * Delete webhook + * @description Delete a registered webhook. + */ + post: operations['webhook_delete']; + }; + '/service-token-create': { + /** + * Create service token + * @description Create a new service token for API authentication. Returns the full token which should be stored securely as it cannot be retrieved later. + */ + post: operations['service_token_create']; + }; + '/service-token-list': { + /** + * List service tokens + * @description List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + */ + post: operations['service_token_list']; + }; + '/service-token-get': { + /** + * Get service token + * @description Get detailed information about a specific service token. The secret is never returned. + */ + post: operations['service_token_get']; + }; + '/service-token-update': { + /** + * Update service token + * @description Update a service token. Only name, description, and expiration can be modified. + */ + post: operations['service_token_update']; + }; + '/service-token-archive': { + /** + * Archive service token + * @description Archive (soft delete) a service token. This immediately invalidates the token for authentication. + */ + post: operations['service_token_archive']; + }; + '/customer-get': { + /** + * Get customer info + * @description Get detailed information about a customer from the core database. + */ + post: operations['customer_get']; + }; + '/customer-get-seats': { + /** + * Get customer seats + * @description Get all seats associated with a customer from the core database. + */ + post: operations['customer_get_seats']; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + ListChannelsInput: Record; + GetCustomerInput: { + /** + * @description The unique identifier of the customer to retrieve. If not provided, uses the authenticated users customer ID. + * @example 100 + */ + customerId?: number; + }; + GetCustomerSeatsInput: { + /** + * @description The unique identifier of the customer whose seats to retrieve. If not provided, uses the authenticated users customer ID. + * @example 100 + */ + customerId?: number; + }; + SyncSalesAgentsInput: { + /** @example example_id_123 */ + creativeId: string; + }; + ListCountriesInput: Record; + ListLanguagesInput: Record; + CreateMediaBuyInput: { + /** @example 100 */ + tacticId: number; + /** @example example_id_123 */ + agentId: string; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products: { + mediaProductId: string; + budgetAmount: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creatives?: { + creative_id: string; + name: string; + format_id: + | string + | { + agent_url: string; + id: string; + }; + assets?: { + [key: string]: { + url: string; + width?: number; + height?: number; + }; + }; + click_url?: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creative_id: string; + name: string; + format_id: + | string + | { + agent_url: string; + id: string; + }; + assets?: { + [key: string]: { + url: string; + width?: number; + height?: number; + }; + }; + click_url?: string; + }[]; + }; + UpdateMediaBuyInput: { + /** @example example_id_123 */ + mediaBuyId: string; + /** @example Example Name */ + name?: string; + /** @example string */ + description?: string; + /** + * @example DRAFT + * @enum {string} + */ + status?: + | 'DRAFT' + | 'PENDING_APPROVAL' + | 'ACTIVE' + | 'PAUSED' + | 'COMPLETED' + | 'FAILED' + | 'REJECTED'; + /** @example [] */ + creativeIds?: string[]; + /** @example [] */ + packages?: { + packageId: string; + creativeIds: string[]; + }[]; + }; + DeleteMediaBuyInput: { + /** @example example_id_123 */ + mediaBuyId: string; + /** @example true */ + confirm: boolean; + }; + ExecuteMediaBuyInput: { + /** @example example_id_123 */ + mediaBuyId: string; + }; + GetMediaBuyInput: { + /** @example example_id_123 */ + mediaBuyId: string; + }; + ListMediaBuysInput: { + /** @example 100 */ + tacticId?: number; + /** + * @example DRAFT + * @enum {string} + */ + status?: + | 'DRAFT' + | 'PENDING_APPROVAL' + | 'ACTIVE' + | 'PAUSED' + | 'COMPLETED' + | 'FAILED' + | 'REJECTED'; + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + ValidateMediaBuyBudgetInput: { + /** @example 100 */ + tacticId: number; + /** @example 100 */ + newBudgetAmount: number; + }; + ListNotificationsInput: { + /** @example 100 */ + brandAgentId?: number; + /** @example example_id_123 */ + campaignId?: string; + /** @example example_id_123 */ + creativeId?: string; + /** @example example_id_123 */ + tacticId?: string; + /** @example [] */ + types?: string[]; + /** @example true */ + unreadOnly?: boolean; + /** @example 100 */ + limit?: number; + /** @example 100 */ + offset?: number; + }; + MarkNotificationReadInput: { + /** @example example_id_123 */ + notificationId: string; + }; + MarkNotificationAcknowledgedInput: { + /** @example example_id_123 */ + notificationId: string; + }; + MarkAllNotificationsReadInput: Record; + DiscoverProductsInput: { + /** + * @description Natural language description of campaign requirements (e.g., "Launch $50k luxury electric vehicle awareness campaign targeting 10M affluent buyers, 60 days, max CPM $15") + * @example string + */ + brief: string; + /** + * Format: uri + * @description Valid URL for the brand (e.g., company website https://example.com or hosted brand manifest JSON) + * @example https://example.com + */ + brandManifestUrl: string; + /** @description Structured filters for product discovery */ + filters?: { + /** @enum {string} */ + deliveryType?: 'guaranteed' | 'non_guaranteed'; + /** @description Filter for fixed price vs auction products */ + isFixedPrice?: boolean; + /** @description Filter by format types */ + formatTypes?: ('video' | 'display' | 'audio')[]; + /** @description Only return products accepting IAB standard formats */ + standardFormatsOnly?: boolean; + /** @description Minimum exposures/impressions needed for measurement validity */ + minExposures?: number; + }; + /** + * @description Optional: Query a specific sales agent by ID. If not provided, queries all active sales agents. + * @example example_id_123 + */ + agentId?: string; + /** + * @description Whether to save discovered products for future use (default: true) + * @example true + */ + saveToDatabase?: boolean; + }; + SaveProductInput: { + /** @example example_id_123 */ + productId: string; + /** @example Example Name */ + name: string; + /** @example string */ + description: string; + /** @example example_id_123 */ + publisherId: string; + /** @example Example Name */ + publisherName: string; + /** + * @example guaranteed + * @enum {string} + */ + deliveryType: 'guaranteed' | 'non_guaranteed'; + /** + * @example premium + * @enum {string} + */ + inventoryType: 'premium' | 'run_of_site' | 'targeted_package'; + creativeFormats?: + | string[] + | { + agent_url: string; + id: string; + }[]; + /** + * @example auction + * @enum {string} + */ + pricingModel: 'auction' | 'fixed_cpm'; + /** @example 100 */ + fixedCpm?: number; + /** @example 100 */ + floorCpm?: number; + /** @example 100 */ + targetCpm?: number; + /** @example [] */ + pricingOptions?: { + [key: string]: unknown; + }[]; + /** @example [] */ + supportedTargeting?: string[]; + /** @example example_id_123 */ + adcpAgentId?: string; + }; + ListProductsInput: { + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + SyncProductsInput: { + /** @example example_id_123 */ + sourceId: string; + }; + GetAgentInput: { + /** + * @description The agent ID to retrieve + * @example example_id_123 + */ + agentId: string; + }; + ListAgentsInput: { + /** + * @description Filter by agent type (SALES or OUTCOME) + * @example SALES + * @enum {string} + */ + type?: 'SALES' | 'OUTCOME'; + /** + * @description Filter by status (PENDING, ACTIVE, DISABLED) + * @example PENDING + * @enum {string} + */ + status?: 'PENDING' | 'ACTIVE' | 'DISABLED'; + /** + * @description Filter by organization ID + * @example example_id_123 + */ + organizationId?: string; + /** + * @description Filter by relationship (SELF = owned by you, SCOPE3 = Scope3-provided, MARKETPLACE = third-party marketplace agents) + * @example SELF + * @enum {string} + */ + relationship?: 'SELF' | 'SCOPE3' | 'MARKETPLACE'; + /** + * @description Filter by agent name (partial match) + * @example Example Name + */ + name?: string; + }; + RegisterAgentInput: { + /** + * @description The type of agent to register + * @example SALES + * @enum {string} + */ + type: 'SALES' | 'OUTCOME'; + /** + * @description Agent name + * @example Example Name + */ + name: string; + /** + * @description Agent description + * @example string + */ + description?: string; + /** + * Format: uri + * @description Agent endpoint URL + * @example https://example.com + */ + endpointUrl: string; + /** + * @description Protocol used by the agent (MCP or A2A) + * @example MCP + * @enum {string} + */ + protocol: 'MCP' | 'A2A'; + /** + * @description Authentication type + * @example API_KEY + * @enum {string} + */ + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + /** + * @description Organization ID + * @example example_id_123 + */ + organizationId?: string; + /** @description Authentication configuration object */ + auth?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + } + | { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + } + | Record; + }; + UnregisterAgentInput: { + /** + * @description The agent ID to unregister + * @example example_id_123 + */ + agentId: string; + }; + UpdateAgentInput: { + /** + * @description The agent ID to update + * @example example_id_123 + */ + agentId: string; + /** + * @description New agent name + * @example Example Name + */ + name?: string; + /** + * @description New agent description + * @example string + */ + description?: string; + /** + * Format: uri + * @description New endpoint URL + * @example https://example.com + */ + endpointUrl?: string; + /** + * @description New protocol + * @example MCP + * @enum {string} + */ + protocol?: 'MCP' | 'A2A'; + /** + * @description New authentication type + * @example API_KEY + * @enum {string} + */ + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + /** @description New authentication configuration */ + auth?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + } + | { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + } + | Record; + }; + CreateTacticInput: { + /** @example example_id_123 */ + campaignId: string; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example [] */ + channelCodes?: ('ctv' | 'video' | 'display' | 'app' | 'social')[]; + /** @example [] */ + countryCodes?: string[]; + /** + * @description Language codes + * @example [] + */ + languages?: string[]; + /** @example [] */ + availableBrandStandards?: { + id: number; + name: string; + }[]; + /** @example [] */ + availableBrandStory?: { + id: number; + name: string; + }[]; + }; + UpdateTacticInput: { + /** @example 100 */ + tacticId: number; + /** @example Example Name */ + name?: string; + /** @example string */ + prompt?: string; + /** @example [] */ + channelCodes?: ('ctv' | 'video' | 'display' | 'app' | 'social')[]; + /** @example [] */ + countryCodes?: string[]; + /** @example [] */ + availableBrandStandards?: { + id: number; + name: string; + }[]; + /** @example [] */ + availableBrandStory?: { + id: number; + name: string; + }[]; + }; + DeleteTacticInput: { + /** @example 100 */ + tacticId: number; + /** @example true */ + confirm: boolean; + }; + GetTacticInput: { + /** @example 100 */ + tacticId: number; + }; + ListTacticsInput: { + /** @example example_id_123 */ + campaignId?: string; + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + LinkCampaignToTacticInput: { + /** @example 100 */ + tacticId: number; + /** @example example_id_123 */ + campaignId: string; + }; + UnlinkCampaignFromTacticInput: { + /** @example 100 */ + tacticId: number; + /** @example example_id_123 */ + campaignId: string; + }; + RegisterWebhookInput: { + /** @example 100 */ + brandAgentId?: number; + endpoint: { + /** Format: uri */ + url: string; + /** @enum {string} */ + method: 'POST' | 'PUT'; + headers?: { + [key: string]: string; + }; + authentication?: { + /** @enum {string} */ + type: 'bearer' | 'basic' | 'hmac'; + credentials: string; + }; + }; + /** @example [] */ + eventTypes: string[]; + filters?: { + campaigns?: string[]; + tactics?: string[]; + creatives?: string[]; + mediaBuys?: string[]; + metrics?: string[]; + /** @enum {string} */ + minSeverity?: 'info' | 'warning' | 'critical'; + }; + retryPolicy?: { + maxRetries?: number; + backoffMultiplier?: number; + maxBackoffSeconds?: number; + }; + }; + ListWebhooksInput: { + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + DeleteWebhookInput: { + /** @example example_id_123 */ + webhookId: string; + }; + CreateServiceTokenInput: { + /** + * @description Human-readable name for the service token + * @example Example Name + */ + name: string; + /** + * @description Optional description of the token purpose and usage + * @example string + */ + description?: string; + /** + * @description Number of days until token expiration (max 365). If not provided, token does not expire + * @example 100 + */ + expiresInDays?: number; + /** + * @description Token scope: CUSTOMER (full customer access) or SEAT (scoped to specific seat) + * @default CUSTOMER + * @enum {string} + */ + scope?: 'CUSTOMER' | 'SEAT'; + /** + * @description Seat name (required when scope is SEAT). The seat will be looked up for the customer. + * @example Example Name + */ + seatName?: string; + }; + UpdateServiceTokenInput: { + /** + * Format: int64 + * @description The unique identifier of the service token to update + * @example 100 + */ + id: number; + /** + * @description Updated human-readable name for the service token + * @example Example Name + */ + name?: string; + /** + * @description Updated description of the token purpose and usage + * @example string + */ + description?: string; + /** + * @description Number of days to extend expiration from now (max 365). Updates the expiresAt timestamp + * @example 100 + */ + expiresInDays?: number; + }; + ArchiveServiceTokenInput: { + /** + * Format: int64 + * @description The unique identifier of the service token to archive + * @example 100 + */ + id: number; + }; + GetServiceTokenInput: { + /** + * Format: int64 + * @description The unique identifier of the service token to retrieve + * @example 100 + */ + id: number; + /** + * @description Whether to fetch the access_client_secret from Google Secret Manager. Defaults to false for security + * @default false + */ + includeSecret?: boolean; + }; + ListServiceTokensInput: { + /** + * @description Whether to include archived tokens in the response + * @default false + */ + includeArchived?: boolean; + /** + * Format: int64 + * @description Filter tokens by seat ID + * @example 100 + */ + seatId?: number; + /** + * Format: int64 + * @description Filter tokens by user ID + * @example 100 + */ + userId?: number; + }; + MediaBuyGet: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + tacticId: number; + /** @example 100 */ + customerId: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; + /** @example string */ + status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + TacticGet: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example [] */ + campaignIds?: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + countryCodes: string[]; + /** @example 100 */ + mediaBuyCount?: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + }; + MCPContent: { + /** + * @example text + * @enum {string} + */ + type: 'text'; + /** @example string */ + text: string; + }; + /** @description Bad request error response */ + BadRequest: { + /** @example string */ + error: string; + /** @example string */ + message?: string; + }; + /** @description Unauthorized error response */ + Unauthorized: { + /** @example string */ + error: string; + /** @example string */ + message?: string; + }; + /** @description Internal server error response */ + InternalError: { + /** @example string */ + error: string; + /** @example string */ + message?: string; + }; + ChannelList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + channel: string; + displayName: string; + }[]; + }; + GetCustomerOutput: { + /** + * @description Unique identifier for the customer + * @example 100 + */ + id: number; + /** + * @description Company name + * @example string + */ + company: string; + /** + * @description Customer display name + * @example Example Name + */ + name: string; + /** + * @description Whether the customer is currently active + * @example true + */ + active: boolean; + /** + * Format: date-time + * @description ISO 8601 timestamp when the customer was created + * @example string + */ + createdAt: string; + }; + GetCustomerSeatsOutput: { + /** + * @description The customer ID these seats belong to + * @example 100 + */ + customerId: number; + /** + * @description Array of seats belonging to the customer + * @example [] + */ + seats: { + /** @description Unique identifier for the seat */ + id: string; + /** @description Seat display name */ + name: string; + /** @description Customer ID that owns this seat */ + customerId: number; + /** @description Whether the seat is currently active */ + active: boolean; + }[]; + /** + * @description Total number of seats returned + * @example 100 + */ + count: number; + }; + CreativeSyncSalesAgents: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + creativeId: string; + /** @example example_id_123 */ + campaignId?: string; + }; + CountryList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + key: string; + displayName: string; + }[]; + }; + LanguageList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + key: string; + displayName: string; + }[]; + }; + MediaBuyDelete: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + id: string; + }; + MediaBuyExecute: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + mediaBuyId: string; + /** @example string */ + status: string; + /** @example example_id_123 */ + adcpMediaBuyId?: string; + /** @example string */ + adcpStatus?: string; + }; + MediaBuyList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: components['schemas']['MediaBuyGetOutput'][]; + }; + MediaBuyValidateBudget: { + /** @example true */ + valid: boolean; + /** @example string */ + message?: string; + }; + NotificationsList: { + /** @example 100 */ + total: number; + /** @example true */ + hasMore: boolean; + /** @example [] */ + items: { + id: string; + type: string; + data: { + [key: string]: unknown; + }; + read: boolean; + acknowledged: boolean; + /** Format: date-time */ + createdAt: string; + }[]; + }; + NotificationsMarkRead: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + notificationId: string; + }; + NotificationsMarkAcknowledged: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + notificationId: string; + }; + NotificationsMarkAllRead: { + /** @example true */ + success: boolean; + /** @example 100 */ + count: number; + }; + MediaProductDiscover: { + /** @example true */ + success: boolean; + /** @example 100 */ + productsFound: number; + /** @example 100 */ + productsSaved: number; + /** @example 100 */ + successfulAgents: number; + /** @example 100 */ + failedAgents: number; + /** @example [] */ + products: { + productId: string; + name: string; + publisherName: string; + salesAgentId?: string; + salesAgentName?: string; + /** @enum {string} */ + deliveryType: 'guaranteed' | 'non_guaranteed'; + /** @enum {string} */ + inventoryType: 'premium' | 'run_of_site' | 'targeted_package'; + creativeFormats?: + | string[] + | { + agent_url: string; + id: string; + }[]; + fixedCpm?: number; + floorCpm?: number; + targetCpm?: number; + }[]; + }; + MediaProductSave: { + /** @example example_id_123 */ + id: string; + /** @example example_id_123 */ + productId: string; + /** @example Example Name */ + name: string; + /** @example example_id_123 */ + publisherId: string; + /** @example Example Name */ + publisherName: string; + /** @example 100 */ + customerId: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + MediaProductList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + id: string; + productId: string; + name: string; + salesAgent?: string; + salesAgentId?: string; + salesAgentName?: string; + /** @enum {string} */ + deliveryType: 'guaranteed' | 'non_guaranteed'; + format?: string; + creativeFormats?: + | string[] + | { + agent_url: string; + id: string; + }[]; + }[]; + }; + MediaProductSync: { + /** @example true */ + success: boolean; + /** @example 100 */ + productsSaved: number; + }; + AgentGet: + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + authenticationType: string; + description?: string; + organizationId?: string; + registeredBy?: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + } + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + authenticationType: string; + description?: string; + organizationId?: string; + registeredBy?: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + customerAccountCount: number; + }; + AgentList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: ( + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + } + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + customerAccountCount: number; + } + )[]; + }; + AgentRegister: { + /** @example example_id_123 */ + agentId: string; + /** @example Example Name */ + name: string; + /** + * @example SALES + * @enum {string} + */ + type: 'SALES' | 'OUTCOME'; + /** @example string */ + status: string; + /** @example https://example.com */ + endpointUrl: string; + }; + AgentUnregister: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + agentId: string; + /** + * @example SALES + * @enum {string} + */ + type: 'SALES' | 'OUTCOME'; + }; + AgentUpdate: { + /** @example example_id_123 */ + agentId: string; + /** @example Example Name */ + name: string; + /** + * @example SALES + * @enum {string} + */ + type: 'SALES' | 'OUTCOME'; + /** @example string */ + status: string; + }; + TacticCreate: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example example_id_123 */ + campaignId: string; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + countryCodes: string[]; + /** + * Format: date-time + * @example string + */ + createdAt: string; + }; + TacticDelete: { + /** @example true */ + success: boolean; + /** @example 100 */ + tacticId: number; + }; + TacticList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: components['schemas']['TacticGetOutput'][]; + }; + TacticLinkCampaign: { + /** @example true */ + success: boolean; + /** @example 100 */ + tacticId: number; + /** @example example_id_123 */ + campaignId: string; + }; + TacticUnlinkCampaign: { + /** @example true */ + success: boolean; + /** @example 100 */ + tacticId: number; + /** @example example_id_123 */ + campaignId: string; + }; + WebhookRegister: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + brandAgentId?: number; + endpoint: { + url: string; + method: string; + authenticationType?: string; + }; + /** @example [] */ + eventTypes: string[]; + filters?: { + campaigns?: string[]; + tactics?: string[]; + creatives?: string[]; + mediaBuys?: string[]; + metrics?: string[]; + minSeverity?: string; + }; + retryPolicy: { + maxRetries: number; + backoffMultiplier: number; + maxBackoffSeconds: number; + }; + /** @example string */ + status: string; + testResult: { + success: boolean; + statusCode?: number; + error?: string; + }; + }; + WebhookList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + id: string; + status: string; + endpoint: { + url: string; + method: string; + authenticationType?: string; + }; + eventTypes: string[]; + brandAgentId?: number; + failureCount: number; + /** Format: date-time */ + lastSuccess?: string | null; + /** Format: date-time */ + lastFailure?: string | null; + /** Format: date-time */ + createdAt: string; + }[]; + }; + WebhookDelete: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + webhookId: string; + }; + CreateServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the service token + * @example 100 + */ + id: number; + /** + * @description Customer ID that owns this token + * @example 100 + */ + customerId: number; + /** + * Format: int64 + * @description Seat ID if token is scoped to a specific seat + * @example 100 + */ + seatId?: number; + /** + * Format: int64 + * @description User ID if token is scoped to a specific user + * @example 100 + */ + userId?: number; + /** + * @description Optional organization identifier for scoping the token + * @example example_id_123 + */ + organizationId?: string; + /** + * @description Human-readable name of the token + * @example Example Name + */ + name: string; + /** + * @description Description of the token purpose + * @example string + */ + description?: string; + /** + * @description The public client ID portion of the token credentials (safe to log) + * @example example_id_123 + */ + accessClientId: string; + /** + * @description The secret portion of the token credentials. ONLY returned on creation, never retrievable again! + * @example string + */ + accessClientSecret: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if set + * @example string + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was created + * @example string + */ + createdAt: string; + }; + UpdateServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the service token + * @example 100 + */ + id: number; + /** + * @description Updated human-readable name of the token + * @example Example Name + */ + name: string; + /** + * @description Updated description of the token purpose + * @example string + */ + description?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if updated + * @example string + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was last updated + * @example string + */ + updatedAt: string; + }; + ArchiveServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the archived token + * @example 100 + */ + id: number; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was archived + * @example string + */ + archivedAt: string; + }; + GetServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the service token + * @example 100 + */ + id: number; + /** + * @description Customer ID that owns this token + * @example 100 + */ + customerId: number; + /** + * Format: int64 + * @description Seat ID if token is scoped to a specific seat + * @example 100 + */ + seatId?: number; + /** + * Format: int64 + * @description User ID if token is scoped to a specific user + * @example 100 + */ + userId?: number; + /** + * @description Optional organization identifier for scoping the token + * @example example_id_123 + */ + organizationId?: string; + /** + * @description Human-readable name of the token + * @example Example Name + */ + name: string; + /** + * @description Description of the token purpose + * @example string + */ + description?: string; + /** + * @description The public client ID portion of the token credentials (safe to log) + * @example example_id_123 + */ + accessClientId: string; + /** + * @description The secret portion of the token credentials. Only included if includeSecret=true was passed + * @example string + */ + accessClientSecret?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if set + * @example string + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was created + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was last updated + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was archived, if archived + * @example string + */ + archivedAt?: string; + }; + ListServiceTokensOutput: { + /** + * @description Array of service tokens. Note: accessClientSecret is never included in list responses + * @example [] + */ + tokens: { + /** + * Format: int64 + * @description Unique identifier for the service token + */ + id: number; + /** @description Customer ID that owns this token */ + customerId: number; + /** + * Format: int64 + * @description Seat ID if token is scoped to a specific seat + */ + seatId?: number; + /** @description Seat name if token is scoped to a specific seat */ + seatName?: string; + /** + * Format: int64 + * @description User ID if token is scoped to a specific user + */ + userId?: number; + /** @description Optional organization identifier for scoping the token */ + organizationId?: string; + /** @description Human-readable name of the token */ + name: string; + /** @description Description of the token purpose */ + description?: string; + /** @description The public client ID portion of the token credentials (safe to log) */ + accessClientId: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if set + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was created + */ + createdAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was last updated + */ + updatedAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was archived, if archived + */ + archivedAt?: string; + }[]; + /** + * @description Total number of tokens returned + * @example 100 + */ + count: number; + }; + MediaBuyGetOutput: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + tacticId: number; + /** @example 100 */ + customerId: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; + /** @example string */ + status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + TacticGetOutput: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example [] */ + campaignIds?: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + countryCodes: string[]; + /** @example 100 */ + mediaBuyCount?: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + }; + MediaBuyCreate: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + tacticId: number; + /** @example 100 */ + customerId: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; + /** @example string */ + status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + MediaBuyUpdate: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + tacticId: number; + /** @example 100 */ + customerId: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; + /** @example string */ + status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + TacticUpdate: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example [] */ + campaignIds?: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + countryCodes: string[]; + /** @example 100 */ + mediaBuyCount?: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type $defs = Record; + +export type external = Record; + +export interface operations { + /** + * Initialize MCP session + * @description Initialize a new MCP session. This must be called before using any tools. The session ID should be generated as a UUID and included in the mcp-session-id header for all subsequent requests. + */ + mcp_initialize: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Generate a new UUID for session initialization. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + jsonrpc: '2.0'; + id: string | number; + /** @enum {string} */ + method: 'initialize'; + params: { + /** @example 2024-11-05 */ + protocolVersion: string; + capabilities: Record; + clientInfo: { + name: string; + version: string; + }; + }; + }; + }; + }; + responses: { + /** @description Session initialized successfully */ + 200: { + content: { + 'application/json': { + /** @enum {string} */ + jsonrpc?: '2.0'; + id?: string | number; + result?: { + protocolVersion?: string; + capabilities?: Record; + serverInfo?: { + name?: string; + version?: string; + }; + }; + }; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + }; + }; + /** + * List channels + * @description List all available advertising channels and platforms. + */ + channel_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for channel_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "channel_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'channel_list'; + arguments: components['schemas']['ListChannelsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['ChannelList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List countries + * @description Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + */ + country_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for country_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "country_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'country_list'; + arguments: components['schemas']['ListCountriesInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CountryList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List languages + * @description Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + */ + language_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for language_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "language_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'language_list'; + arguments: components['schemas']['ListLanguagesInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['LanguageList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Sync creatives to sales agents + * @description Synchronize creatives to connected sales agents (DSPs, publisher platforms). + */ + creative_sync_sales_agents: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_sync_sales_agents */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_sync_sales_agents", + * "arguments": { + * "creativeId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_sync_sales_agents'; + arguments: components['schemas']['SyncSalesAgentsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeSyncSalesAgents']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create media buy + * @description Create a new media buy with budget, targeting, and creative specifications. + */ + media_buy_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_create", + * "arguments": { + * "tacticId": 100, + * "agentId": "example_id_123", + * "name": "Example Name", + * "products": [] + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_create'; + arguments: components['schemas']['CreateMediaBuyInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update media buy + * @description Update an existing media buy with new budget, targeting, or creative assignments. + */ + media_buy_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_update", + * "arguments": { + * "mediaBuyId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_update'; + arguments: components['schemas']['UpdateMediaBuyInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete media buy + * @description Delete a media buy and cancel any active placements. + */ + media_buy_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_delete", + * "arguments": { + * "mediaBuyId": "example_id_123", + * "confirm": true + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_delete'; + arguments: components['schemas']['DeleteMediaBuyInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Execute media buy + * @description Execute a media buy, sending it to the configured sales agents for placement. + */ + media_buy_execute: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_execute */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_execute", + * "arguments": { + * "mediaBuyId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_execute'; + arguments: components['schemas']['ExecuteMediaBuyInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyExecute']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get media buy + * @description Get detailed information about a specific media buy. + */ + media_buy_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_get", + * "arguments": { + * "mediaBuyId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_get'; + arguments: components['schemas']['GetMediaBuyInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List media buys + * @description List all media buys with optional filtering by brand agent, campaign, or status. + */ + media_buy_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_list'; + arguments: components['schemas']['ListMediaBuysInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Validate media buy budget + * @description Validate a media buy budget against campaign constraints and available funds. + */ + media_buy_validate_budget: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_validate_budget */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_validate_budget", + * "arguments": { + * "tacticId": 100, + * "newBudgetAmount": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_validate_budget'; + arguments: components['schemas']['ValidateMediaBuyBudgetInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyValidateBudget']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List notifications + * @description List notifications for the authenticated user with optional filtering by status. + */ + notifications_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for notifications_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "notifications_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'notifications_list'; + arguments: components['schemas']['ListNotificationsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['NotificationsList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Mark notification as read + * @description Mark a specific notification as read. + */ + notifications_mark_read: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for notifications_mark_read */ + requestBody: { + content: { + /** + * @example { + * "tool": "notifications_mark_read", + * "arguments": { + * "notificationId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'notifications_mark_read'; + arguments: components['schemas']['MarkNotificationReadInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['NotificationsMarkRead']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Mark notification as acknowledged + * @description Mark a specific notification as acknowledged. + */ + notifications_mark_acknowledged: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for notifications_mark_acknowledged */ + requestBody: { + content: { + /** + * @example { + * "tool": "notifications_mark_acknowledged", + * "arguments": { + * "notificationId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'notifications_mark_acknowledged'; + arguments: components['schemas']['MarkNotificationAcknowledgedInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['NotificationsMarkAcknowledged']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Mark all notifications as read + * @description Mark all notifications for the authenticated user as read. + */ + notifications_mark_all_read: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for notifications_mark_all_read */ + requestBody: { + content: { + /** + * @example { + * "tool": "notifications_mark_all_read", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'notifications_mark_all_read'; + arguments: components['schemas']['MarkAllNotificationsReadInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['NotificationsMarkAllRead']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Discover media products + * @description Discover available media products from connected sales agents based on targeting criteria. + */ + media_product_discover: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_product_discover */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_product_discover", + * "arguments": { + * "brief": "string", + * "brandManifestUrl": "https://example.com" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_product_discover'; + arguments: components['schemas']['DiscoverProductsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaProductDiscover']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Save media product + * @description Save a discovered media product for future use in media buys. + */ + media_product_save: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_product_save */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_product_save", + * "arguments": { + * "productId": "example_id_123", + * "name": "Example Name", + * "description": "string", + * "publisherId": "example_id_123", + * "publisherName": "Example Name", + * "deliveryType": "guaranteed", + * "inventoryType": "premium", + * "pricingModel": "auction" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_product_save'; + arguments: components['schemas']['SaveProductInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaProductSave']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List media products + * @description List saved media products with optional filtering. + */ + media_product_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_product_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_product_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_product_list'; + arguments: components['schemas']['ListProductsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaProductList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Sync media products + * @description Synchronize media product catalog from connected sales agents. + */ + media_product_sync: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_product_sync */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_product_sync", + * "arguments": { + * "sourceId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_product_sync'; + arguments: components['schemas']['SyncProductsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaProductSync']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get agent + * @description Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + agent_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_get", + * "arguments": { + * "agentId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_get'; + arguments: components['schemas']['GetAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentGet']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List agents + * @description List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + agent_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_list'; + arguments: components['schemas']['ListAgentsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Register agent + * @description Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). + */ + agent_register: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_register */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_register", + * "arguments": { + * "type": "SALES", + * "name": "Example Name", + * "endpointUrl": "https://example.com", + * "protocol": "MCP" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_register'; + arguments: components['schemas']['RegisterAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentRegister']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Unregister agent + * @description Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. + */ + agent_unregister: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_unregister */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_unregister", + * "arguments": { + * "agentId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_unregister'; + arguments: components['schemas']['UnregisterAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentUnregister']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update agent + * @description Update agent configuration and credentials. Type is automatically inferred from the agent ID. + */ + agent_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_update", + * "arguments": { + * "agentId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_update'; + arguments: components['schemas']['UpdateAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentUpdate']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create tactic + * @description Create a new tactic defining how to achieve campaign objectives. + */ + tactic_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_create", + * "arguments": { + * "campaignId": "example_id_123", + * "name": "Example Name" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_create'; + arguments: components['schemas']['CreateTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticCreate']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update tactic + * @description Update an existing tactic with new targeting, budget, or creative requirements. + */ + tactic_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_update", + * "arguments": { + * "tacticId": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_update'; + arguments: components['schemas']['UpdateTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete tactic + * @description Delete a tactic and all associated media buys. + */ + tactic_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_delete", + * "arguments": { + * "tacticId": 100, + * "confirm": true + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_delete'; + arguments: components['schemas']['DeleteTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get tactic + * @description Get detailed information about a specific tactic. + */ + tactic_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_get", + * "arguments": { + * "tacticId": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_get'; + arguments: components['schemas']['GetTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List tactics + * @description List all tactics with optional filtering by brand agent or campaign. + */ + tactic_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_list'; + arguments: components['schemas']['ListTacticsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Link tactic to campaign + * @description Link a tactic to a campaign. + */ + tactic_link_campaign: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_link_campaign */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_link_campaign", + * "arguments": { + * "tacticId": 100, + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_link_campaign'; + arguments: components['schemas']['LinkCampaignToTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticLinkCampaign']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Unlink tactic from campaign + * @description Unlink a tactic from a campaign. + */ + tactic_unlink_campaign: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_unlink_campaign */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_unlink_campaign", + * "arguments": { + * "tacticId": 100, + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_unlink_campaign'; + arguments: components['schemas']['UnlinkCampaignFromTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticUnlinkCampaign']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Register webhook + * @description Register a webhook to receive real-time notifications about events. + */ + webhook_register: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for webhook_register */ + requestBody: { + content: { + /** + * @example { + * "tool": "webhook_register", + * "arguments": { + * "endpoint": { + * "url": "https://example.com", + * "method": "POST" + * }, + * "eventTypes": [] + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'webhook_register'; + arguments: components['schemas']['RegisterWebhookInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['WebhookRegister']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List webhooks + * @description List all registered webhooks. + */ + webhook_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for webhook_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "webhook_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'webhook_list'; + arguments: components['schemas']['ListWebhooksInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['WebhookList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete webhook + * @description Delete a registered webhook. + */ + webhook_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for webhook_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "webhook_delete", + * "arguments": { + * "webhookId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'webhook_delete'; + arguments: components['schemas']['DeleteWebhookInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['WebhookDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create service token + * @description Create a new service token for API authentication. Returns the full token which should be stored securely as it cannot be retrieved later. + */ + service_token_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_create", + * "arguments": { + * "name": "Example Name" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_create'; + arguments: components['schemas']['CreateServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreateServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List service tokens + * @description List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + */ + service_token_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_list'; + arguments: components['schemas']['ListServiceTokensInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['ListServiceTokensOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get service token + * @description Get detailed information about a specific service token. The secret is never returned. + */ + service_token_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_get", + * "arguments": { + * "id": "1234567890" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_get'; + arguments: components['schemas']['GetServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['GetServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update service token + * @description Update a service token. Only name, description, and expiration can be modified. + */ + service_token_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_update", + * "arguments": { + * "id": "1234567890" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_update'; + arguments: components['schemas']['UpdateServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['UpdateServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Archive service token + * @description Archive (soft delete) a service token. This immediately invalidates the token for authentication. + */ + service_token_archive: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_archive */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_archive", + * "arguments": { + * "id": "1234567890" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_archive'; + arguments: components['schemas']['ArchiveServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['ArchiveServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get customer info + * @description Get detailed information about a customer from the core database. + */ + customer_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for customer_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "customer_get", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'customer_get'; + arguments: components['schemas']['GetCustomerInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['GetCustomerOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get customer seats + * @description Get all seats associated with a customer from the core database. + */ + customer_get_seats: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for customer_get_seats */ + requestBody: { + content: { + /** + * @example { + * "tool": "customer_get_seats", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'customer_get_seats'; + arguments: components['schemas']['GetCustomerSeatsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['GetCustomerSeatsOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; +} diff --git a/src/types/platform-api.ts b/src/types/platform-api.ts new file mode 100644 index 0000000..2449ff6 --- /dev/null +++ b/src/types/platform-api.ts @@ -0,0 +1,5420 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/mcp-initialize': { + /** + * Initialize MCP session + * @description Initialize a new MCP session. This must be called before using any tools. The session ID should be generated as a UUID and included in the mcp-session-id header for all subsequent requests. + */ + post: operations['mcp_initialize']; + }; + '/brand-agent-list': { + /** + * List brand agents + * @description List all brand agents (advertiser accounts) for the authenticated customer. Authentication is automatic - no parameters required. + */ + post: operations['brand_agent_list']; + }; + '/brand-agent-get': { + /** + * Get brand agent + * @description Get detailed information about a specific brand agent (advertiser account) by ID. + */ + post: operations['brand_agent_get']; + }; + '/brand-agent-create': { + /** + * Create brand agent + * @description Create a new brand agent (advertiser account). This creates the top-level container that will own campaigns, creatives, audiences, standards, and measurement sources. + */ + post: operations['brand_agent_create']; + }; + '/brand-agent-update': { + /** + * Update brand agent + * @description Update an existing brand agent with new information. + */ + post: operations['brand_agent_update']; + }; + '/brand-agent-delete': { + /** + * Delete brand agent + * @description Delete a brand agent. This will also delete all associated campaigns, creatives, and other resources. + */ + post: operations['brand_agent_delete']; + }; + '/campaign-list': { + /** + * List campaigns + * @description List all campaigns with optional filtering by brand agent. + */ + post: operations['campaign_list']; + }; + '/campaign-create': { + /** + * Create campaign + * @description Create a new campaign with natural language prompt. The backend will parse the prompt to extract targeting, budget, and creative requirements. + */ + post: operations['campaign_create']; + }; + '/campaign-get': { + /** + * Get campaign + * @description Get detailed information about a specific campaign. + */ + post: operations['campaign_get']; + }; + '/campaign-update': { + /** + * Update campaign + * @description Update an existing campaign with new information. + */ + post: operations['campaign_update']; + }; + '/campaign-delete': { + /** + * Delete campaign + * @description Delete a campaign and all associated resources. + */ + post: operations['campaign_delete']; + }; + '/campaign-get-summary': { + /** + * Get campaign summary + * @description Get a high-level summary of a campaign including key metrics and status. + */ + post: operations['campaign_get_summary']; + }; + '/campaign-list-tactics': { + /** + * List campaign tactics + * @description List all tactics associated with a specific campaign. + */ + post: operations['campaign_list_tactics']; + }; + '/campaign-validate-brief': { + /** + * Validate campaign brief + * @description Validate a campaign brief to ensure it contains all necessary information for campaign creation. + */ + post: operations['campaign_validate_brief']; + }; + '/asset-list': { + /** + * List assets + * @description List all uploaded assets with optional filtering by brand agent. + */ + post: operations['asset_list']; + }; + '/brand-standards-create': { + /** + * Create brand standards + * @description Create brand standards including guidelines, tone of voice, visual requirements, and content rules for a brand agent. + */ + post: operations['brand_standards_create']; + }; + '/brand-standards-delete': { + /** + * Delete brand standards + * @description Delete brand standards for a brand agent. + */ + post: operations['brand_standards_delete']; + }; + '/brand-standards-list': { + /** + * List brand standards + * @description List all brand standards with optional filtering by brand agent. + */ + post: operations['brand_standards_list']; + }; + '/brand-story-create': { + /** + * Create brand story + * @description Create a brand story containing the narrative, history, values, and key messaging for a brand agent. + */ + post: operations['brand_story_create']; + }; + '/brand-story-update': { + /** + * Update brand story + * @description Update an existing brand story with new information. + */ + post: operations['brand_story_update']; + }; + '/brand-story-delete': { + /** + * Delete brand story + * @description Delete a brand story. + */ + post: operations['brand_story_delete']; + }; + '/brand-story-list': { + /** + * List brand stories + * @description List all brand stories with optional filtering by brand agent. + */ + post: operations['brand_story_list']; + }; + '/channel-list': { + /** + * List channels + * @description List all available advertising channels and platforms. + */ + post: operations['channel_list']; + }; + '/country-list': { + /** + * List countries + * @description Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + */ + post: operations['country_list']; + }; + '/language-list': { + /** + * List languages + * @description Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + */ + post: operations['language_list']; + }; + '/creative-assign': { + /** + * Assign creative + * @description Assign a creative to a tactic or media buy. + */ + post: operations['creative_assign']; + }; + '/creative-create': { + /** + * Create creative + * @description Create a new creative with assets, copy, and targeting specifications. + */ + post: operations['creative_create']; + }; + '/creative-update': { + /** + * Update creative + * @description Update an existing creative with new assets, copy, or specifications. + */ + post: operations['creative_update']; + }; + '/creative-delete': { + /** + * Delete creative + * @description Delete a creative and remove it from any associated tactics or media buys. + */ + post: operations['creative_delete']; + }; + '/creative-get': { + /** + * Get creative + * @description Get detailed information about a specific creative. + */ + post: operations['creative_get']; + }; + '/creative-list': { + /** + * List creatives + * @description List all creatives with optional filtering by brand agent or campaign. + */ + post: operations['creative_list']; + }; + '/media-buy-get': { + /** + * Get media buy + * @description Get detailed information about a specific media buy. + */ + post: operations['media_buy_get']; + }; + '/media-buy-list': { + /** + * List media buys + * @description List all media buys with optional filtering by brand agent, campaign, or status. + */ + post: operations['media_buy_list']; + }; + '/media-product-list': { + /** + * List media products + * @description List saved media products with optional filtering. + */ + post: operations['media_product_list']; + }; + '/agent-get': { + /** + * Get agent + * @description Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + post: operations['agent_get']; + }; + '/agent-list': { + /** + * List agents + * @description List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + post: operations['agent_list']; + }; + '/tactic-get': { + /** + * Get tactic + * @description Get detailed information about a specific tactic. + */ + post: operations['tactic_get']; + }; + '/tactic-list': { + /** + * List tactics + * @description List all tactics with optional filtering by brand agent or campaign. + */ + post: operations['tactic_list']; + }; + '/outcomes-agent-get-proposals': { + /** + * Get proposals from outcome agents + * @description Request tactical proposals from outcome agents for a campaign. Outcome agents analyze the campaign brief and budget to propose execution strategies. + */ + post: operations['outcomes_agent_get_proposals']; + }; + '/outcomes-agent-accept-proposal': { + /** + * Accept outcome agent proposal + * @description Accept a proposal from an outcome agent, creating a tactic and assigning it to the agent for management. + */ + post: operations['outcomes_agent_accept_proposal']; + }; + '/outcomes-agent-list-tactics': { + /** + * List tactics by outcome agent + * @description List all tactics managed by a specific outcome agent. + */ + post: operations['outcomes_agent_list_tactics']; + }; + '/service-token-create': { + /** + * Create service token + * @description Create a new service token for API authentication. Returns the full token which should be stored securely as it cannot be retrieved later. + */ + post: operations['service_token_create']; + }; + '/service-token-list': { + /** + * List service tokens + * @description List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + */ + post: operations['service_token_list']; + }; + '/service-token-get': { + /** + * Get service token + * @description Get detailed information about a specific service token. The secret is never returned. + */ + post: operations['service_token_get']; + }; + '/service-token-update': { + /** + * Update service token + * @description Update a service token. Only name, description, and expiration can be modified. + */ + post: operations['service_token_update']; + }; + '/service-token-archive': { + /** + * Archive service token + * @description Archive (soft delete) a service token. This immediately invalidates the token for authentication. + */ + post: operations['service_token_archive']; + }; + '/customer-get': { + /** + * Get customer info + * @description Get detailed information about a customer from the core database. + */ + post: operations['customer_get']; + }; + '/customer-get-seats': { + /** + * Get customer seats + * @description Get all seats associated with a customer from the core database. + */ + post: operations['customer_get_seats']; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + /** @description Budget range for campaign planning */ + BudgetRange: { + /** + * @description Minimum budget available + * @example 50000 + */ + min: number; + /** + * @description Maximum budget available + * @example 150000 + */ + max: number; + /** + * @description Currency for budget (ISO 4217 code) + * @default USD + * @example USD + */ + currency?: string; + }; + /** @description Visual card data for rendering proposals in marketplace UI, following ADCP product card pattern */ + ProposalCard: { + /** + * @description Proposal name/title + * @example Premium Display Campaign + */ + title: string; + /** + * @description What the proposal offers + * @example Target premium inventory at $2.50 vCPM with 85% viewability guarantee + */ + description: string; + /** + * @description Optional array of image URLs showcasing the approach + * @example [ + * "https://example.com/chart1.png", + * "https://example.com/viz2.png" + * ] + */ + image_carousel?: string[]; + /** + * @description Markdown-formatted detailed execution plan and specifications + * @example ## Execution Strategy + * + * We will target... + */ + details?: string; + /** @description Pricing information for comparison */ + pricing_summary: { + /** + * @description Human-readable pricing method + * @example 15% revenue share + */ + method: string; + /** + * @description Human-readable budget capacity + * @example $50,000 maximum + */ + budget_capacity: string; + /** + * @description Optional estimated cost calculation + * @example $7,500 estimated fee + */ + estimated_cost?: string; + }; + }; + ListAssetsInput: { + /** + * @description Optional brand agent ID to filter assets + * @example 100 + */ + brandAgentId?: number; + }; + /** @description Parameters for listing brand agents. Authentication is automatic. */ + ListBrandAgentsInput: { + /** @description Prisma-style where clause for filtering agents */ + where?: { + [key: string]: unknown; + }; + /** @description Prisma-style orderBy clause */ + orderBy?: { + [key: string]: unknown; + }; + /** + * @description Number of records to return + * @example 10 + */ + take?: number; + /** + * @description Number of records to skip + * @example 0 + */ + skip?: number; + /** + * @description Fields to use for distinct selection + * @example [] + */ + distinct?: string[]; + }; + /** @description Parameters for retrieving a specific brand agent */ + GetBrandAgentInput: { + /** + * @description The unique identifier for the brand agent + * @example 123 + */ + brandAgentId: number; + }; + /** @description Parameters for creating a new brand agent */ + CreateBrandAgentInput: { + /** + * @description Name of the brand agent (advertiser account) + * @example Nike Global Campaigns + */ + name: string; + /** + * @description Optional description of the brand agent + * @example Brand agent for Nike global advertising campaigns + */ + description?: string; + /** + * Format: uri + * @description URL to the brand manifest + * @example https://example.com/brand-manifest + */ + manifestUrl?: string; + /** + * @description Country codes (ISO 3166-1 alpha-2) + * @example [ + * "US", + * "CA", + * "GB" + * ] + */ + countryCodes?: string[]; + }; + /** @description Parameters for updating a brand agent */ + UpdateBrandAgentInput: { + /** + * @description The unique identifier for the brand agent + * @example 123 + */ + brandAgentId: number; + /** + * @description Updated name of the brand agent + * @example Example Name + */ + name?: string; + /** + * @description Updated description + * @example string + */ + description?: string; + /** + * Format: uri + * @description Updated URL to the brand manifest + * @example https://example.com/brand-manifest + */ + manifestUrl?: string; + /** + * @description Updated country codes + * @example [] + */ + countryCodes?: string[]; + }; + /** @description Parameters for deleting a brand agent */ + DeleteBrandAgentInput: { + /** + * @description The unique identifier for the brand agent to delete + * @example 123 + */ + brandAgentId: number; + }; + CreateBrandStandardInput: { + /** + * @description Brand agent ID + * @example 100 + */ + brandAgentId: number; + /** + * @description Standard name + * @example Example Name + */ + name?: string; + /** + * @description Standard description + * @example string + */ + description?: string; + /** + * @description Brand standards prompt + * @example string + */ + prompt: string; + /** + * @description Whether this is the primary standard + * @example true + */ + isPrimary?: boolean; + /** + * @description Country codes + * @example [] + */ + countries?: string[]; + /** + * @description Channel types + * @example [] + */ + channels?: ('ctv' | 'video' | 'display' | 'app' | 'social')[]; + /** + * @description Brand names + * @example [] + */ + brands?: string[]; + }; + DeleteBrandStandardInput: { + /** + * @description Brand standard ID + * @example example_id_123 + */ + brandStandardId: string; + }; + ListBrandStandardsInput: { + /** + * @description Optional brand agent ID to filter brand standards by + * @example 100 + */ + brandAgentId?: number; + /** @description Prisma-style where clause for filtering standards */ + where?: { + [key: string]: unknown; + }; + /** @description Prisma-style orderBy clause */ + orderBy?: { + [key: string]: unknown; + }; + /** + * @description Number of records to return + * @example 100 + */ + take?: number; + /** + * @description Number of records to skip + * @example 100 + */ + skip?: number; + /** + * @description Fields to use for distinct selection + * @example [] + */ + distinct?: string[]; + }; + CreateBrandStoryInput: { + /** @description Brand agent ID (bigint or string) */ + brandAgentId: number | string; + /** + * @description Story name + * @example Example Name + */ + name: string; + /** + * @description Brand story prompt + * @example string + */ + prompt?: string; + /** + * @description Brand names + * @example [] + */ + brands?: string[]; + /** + * @description Language codes (use language_list tool to see available options) + * @example [] + */ + languages: string[]; + }; + UpdateBrandStoryInput: { + /** + * @description Brand story ID + * @example example_id_123 + */ + brandStoryId: string; + /** + * @description Story name + * @example Example Name + */ + name?: string; + /** + * @description Updated brand story prompt + * @example string + */ + prompt: string; + }; + DeleteBrandStoryInput: { + /** + * @description Brand story ID + * @example example_id_123 + */ + brandStoryId: string; + }; + ListBrandStoriesInput: { + /** + * @description Optional brand agent ID to filter brand stories by + * @example 100 + */ + brandAgentId?: number; + /** @description Filtering criteria */ + where?: { + [key: string]: unknown; + }; + /** @description Ordering criteria */ + orderBy?: { + [key: string]: unknown; + }; + /** + * @description Number of records to return + * @example 100 + */ + take?: number; + /** + * @description Number of records to skip + * @example 100 + */ + skip?: number; + /** + * @description Fields to use for distinct selection + * @example [] + */ + distinct?: string[]; + }; + /** @description Parameters for listing campaigns */ + ListCampaignsInput: { + /** + * @description Filter by brand agent ID + * @example 123 + */ + brandAgentId?: number; + /** + * @description Filter by campaign status + * @example ACTIVE + * @enum {string} + */ + status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED' | 'DRAFT'; + /** + * @description Number of results to return + * @example 50 + */ + limit?: number; + /** + * @description Number of results to skip for pagination + * @example 0 + */ + offset?: number; + }; + /** @description Parameters for creating a new campaign */ + CreateCampaignInput: { + /** + * @description Brand agent ID that will own this campaign + * @example 123 + */ + brandAgentId: number; + /** + * @description Optional name for the campaign (auto-generated if not provided) + * @example Summer 2025 Tech Campaign + */ + name?: string; + /** + * @description Natural language description of campaign requirements. The backend will parse this to extract targeting, budget, and creative requirements. + * @example Create a video campaign targeting tech enthusiasts aged 25-45 with $50k budget + */ + prompt: string; + /** @description Budget configuration for the campaign */ + budget?: { + total: number; + /** @default USD */ + currency?: string; + dailyCap?: number; + /** @enum {string} */ + pacing?: 'EVEN' | 'ASAP' | 'FRONTLOADED'; + }; + /** + * Format: date-time + * @description Campaign start date (ISO 8601 format) + * @example 2025-01-15T00:00:00Z + */ + startDate?: string; + /** + * Format: date-time + * @description Campaign end date (ISO 8601 format) + * @example 2025-03-31T23:59:59Z + */ + endDate?: string; + /** @description Scoring weights for campaign optimization */ + scoringWeights?: { + affinity?: number; + outcome?: number; + quality?: number; + }; + /** + * @description Number of days for outcome measurement window + * @example 30 + */ + outcomeScoreWindowDays?: number; + /** + * @description Initial campaign status + * @example ACTIVE + * @enum {string} + */ + status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED' | 'DRAFT'; + }; + /** @description Parameters for retrieving a specific campaign */ + GetCampaignInput: { + /** + * @description The unique identifier for the campaign + * @example cmp_987654321 + */ + campaignId: string; + }; + /** @description Parameters for updating a campaign */ + UpdateCampaignInput: { + /** + * @description The unique identifier for the campaign + * @example cmp_987654321 + */ + campaignId: string; + /** + * @description Updated campaign name + * @example Example Name + */ + name?: string; + /** + * @description Updated campaign prompt + * @example string + */ + prompt?: string; + /** @description Updated budget configuration */ + budget?: { + total?: number; + /** @default USD */ + currency?: string; + dailyCap?: number; + /** @enum {string} */ + pacing?: 'EVEN' | 'ASAP' | 'FRONTLOADED'; + }; + /** + * Format: date-time + * @description Updated start date + * @example string + */ + startDate?: string; + /** + * Format: date-time + * @description Updated end date + * @example string + */ + endDate?: string; + /** @description Updated scoring weights */ + scoringWeights?: { + affinity?: number; + outcome?: number; + quality?: number; + }; + /** + * @description Updated outcome score window days + * @example 100 + */ + outcomeScoreWindowDays?: number; + /** + * @description Updated campaign status + * @example ACTIVE + * @enum {string} + */ + status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED' | 'DRAFT'; + }; + /** @description Parameters for deleting a campaign */ + DeleteCampaignInput: { + /** + * @description The unique identifier for the campaign to delete + * @example cmp_987654321 + */ + campaignId: string; + /** + * @description If true, permanently delete the campaign. Default: false (soft delete/archive) + * @example true + */ + hardDelete?: boolean; + }; + GetCampaignSummaryInput: { + /** + * @description Campaign ID + * @example example_id_123 + */ + campaignId: string; + }; + ListCampaignTacticsInput: { + /** + * @description Campaign ID + * @example example_id_123 + */ + campaignId: string; + }; + ValidateBriefInput: { + /** + * @description Campaign brief text + * @example string + */ + brief: string; + }; + ListChannelsInput: Record; + GetCustomerInput: { + /** + * @description The unique identifier of the customer to retrieve. If not provided, uses the authenticated users customer ID. + * @example 100 + */ + customerId?: number; + }; + GetCustomerSeatsInput: { + /** + * @description The unique identifier of the customer whose seats to retrieve. If not provided, uses the authenticated users customer ID. + * @example 100 + */ + customerId?: number; + }; + AssignCreativeInput: { + /** @example example_id_123 */ + creativeId: string; + /** @example example_id_123 */ + campaignId: string; + }; + CreateCreativeInput: { + /** @example 100 */ + brandAgentId: number; + /** @example example_id_123 */ + organizationId?: string; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** + * @example ADCP + * @enum {string} + */ + formatSource?: 'ADCP' | 'CREATIVE_AGENT' | 'PUBLISHER'; + /** + * @description Format identifier. For ADCP sources, this should be a format ID string recognized by the target sales agent (e.g., display_300x250, video_1920x1080). Valid formats are agent-specific. + * @example example_id_123 + */ + formatId?: string; + /** @example https://example.com */ + mediaUrl?: string; + /** + * @description Optional: Upload assets inline with the creative. Each asset requires: name, contentType, data (base64), and assetType. + * @example [] + */ + assets?: { + /** @description Filename (e.g., banner.png) */ + name: string; + /** @description MIME type (e.g., image/png, image/jpeg) */ + contentType: string; + /** + * Format: byte + * @description Base64-encoded file data (without data:image/png;base64, prefix) + */ + data: string; + /** + * @description Type of asset + * @enum {string} + */ + assetType: 'image' | 'video' | 'audio' | 'logo' | 'font'; + /** @description Optional tags */ + tags?: string[]; + }[]; + content?: { + [key: string]: unknown; + }; + /** + * @example CREATIVE_AGENT + * @enum {string} + */ + assemblyMethod?: 'CREATIVE_AGENT' | 'ACTIVATION' | 'PUBLISHER'; + /** + * @description Optional campaign ID (object ID) to assign creative to + * @example example_id_123 + */ + campaignId?: string; + }; + UpdateCreativeInput: { + /** @example example_id_123 */ + creativeId: string; + /** @example Example Name */ + name?: string; + /** @example string */ + status?: string; + }; + DeleteCreativeInput: { + /** @example example_id_123 */ + creativeId: string; + }; + GetCreativeInput: { + /** @example example_id_123 */ + creativeId: string; + }; + ListCreativesInput: { + /** @example 100 */ + campaignId?: number; + /** @example 100 */ + brandAgentId?: number; + /** + * @example ADCP + * @enum {string} + */ + formatSource?: 'ADCP' | 'CREATIVE_AGENT' | 'PUBLISHER'; + /** + * @example ACTIVE + * @enum {string} + */ + status?: 'ACTIVE' | 'PAUSED' | 'ARCHIVED' | 'DRAFT'; + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + ListCountriesInput: Record; + ListLanguagesInput: Record; + GetMediaBuyInput: { + /** @example example_id_123 */ + mediaBuyId: string; + }; + ListMediaBuysInput: { + /** @example 100 */ + tacticId?: number; + /** + * @example DRAFT + * @enum {string} + */ + status?: + | 'DRAFT' + | 'PENDING_APPROVAL' + | 'ACTIVE' + | 'PAUSED' + | 'COMPLETED' + | 'FAILED' + | 'REJECTED'; + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + OutcomesAgentGetProposalsInput: { + /** + * @description Campaign ID to get proposals for + * @example camp_123 + */ + campaignId: string; + /** + * @description Optional: Specific outcome agent IDs to query. If omitted, queries all outcome agents. + * @example [ + * "agent_123", + * "agent_456" + * ] + */ + agentIds?: string[]; + budgetRange?: components['schemas']['BudgetRange']; + /** + * Format: date-time + * @description Campaign start date (ISO 8601) + * @example 2025-01-01T00:00:00Z + */ + startDate?: string; + /** + * Format: date-time + * @description Campaign end date (ISO 8601) + * @example 2025-01-31T23:59:59Z + */ + endDate?: string; + /** + * @description Advertising channels + * @example [ + * "display", + * "video" + * ] + */ + channels?: ('ctv' | 'video' | 'display' | 'app' | 'social')[]; + /** + * @description ISO 3166-1 alpha-2 country codes + * @example [ + * "US", + * "CA" + * ] + */ + countries?: string[]; + /** + * @description Campaign brief text + * @example string + */ + brief?: string; + }; + OutcomesAgentAcceptProposalInput: { + /** + * @description Database ID of the proposal to accept + * @example 123 + */ + proposalId: string; + /** + * @description Optional: Name for the tactic/strategy that will be created. If not provided, a unique identifier will be generated. + * @example Premium Display Campaign + */ + tacticName?: string; + /** @description Optional custom fields required by the outcome agent */ + customFields?: { + [key: string]: unknown; + }; + }; + OutcomesAgentListTacticsInput: { + /** + * @description ID of the outcome agent to list tactics for + * @example 123 + */ + outcomeAgentId: string; + }; + ListProductsInput: { + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + GetAgentInput: { + /** + * @description The agent ID to retrieve + * @example example_id_123 + */ + agentId: string; + }; + ListAgentsInput: { + /** + * @description Filter by agent type (SALES or OUTCOME) + * @example SALES + * @enum {string} + */ + type?: 'SALES' | 'OUTCOME'; + /** + * @description Filter by status (PENDING, ACTIVE, DISABLED) + * @example PENDING + * @enum {string} + */ + status?: 'PENDING' | 'ACTIVE' | 'DISABLED'; + /** + * @description Filter by organization ID + * @example example_id_123 + */ + organizationId?: string; + /** + * @description Filter by relationship (SELF = owned by you, SCOPE3 = Scope3-provided, MARKETPLACE = third-party marketplace agents) + * @example SELF + * @enum {string} + */ + relationship?: 'SELF' | 'SCOPE3' | 'MARKETPLACE'; + /** + * @description Filter by agent name (partial match) + * @example Example Name + */ + name?: string; + }; + GetTacticInput: { + /** @example 100 */ + tacticId: number; + }; + ListTacticsInput: { + /** @example example_id_123 */ + campaignId?: string; + /** @example 100 */ + take?: number; + /** @example 100 */ + skip?: number; + }; + CreateServiceTokenInput: { + /** + * @description Human-readable name for the service token + * @example Example Name + */ + name: string; + /** + * @description Optional description of the token purpose and usage + * @example string + */ + description?: string; + /** + * @description Number of days until token expiration (max 365). If not provided, token does not expire + * @example 100 + */ + expiresInDays?: number; + /** + * @description Token scope: CUSTOMER (full customer access) or SEAT (scoped to specific seat) + * @default CUSTOMER + * @enum {string} + */ + scope?: 'CUSTOMER' | 'SEAT'; + /** + * @description Seat name (required when scope is SEAT). The seat will be looked up for the customer. + * @example Example Name + */ + seatName?: string; + }; + UpdateServiceTokenInput: { + /** + * Format: int64 + * @description The unique identifier of the service token to update + * @example 100 + */ + id: number; + /** + * @description Updated human-readable name for the service token + * @example Example Name + */ + name?: string; + /** + * @description Updated description of the token purpose and usage + * @example string + */ + description?: string; + /** + * @description Number of days to extend expiration from now (max 365). Updates the expiresAt timestamp + * @example 100 + */ + expiresInDays?: number; + }; + ArchiveServiceTokenInput: { + /** + * Format: int64 + * @description The unique identifier of the service token to archive + * @example 100 + */ + id: number; + }; + GetServiceTokenInput: { + /** + * Format: int64 + * @description The unique identifier of the service token to retrieve + * @example 100 + */ + id: number; + /** + * @description Whether to fetch the access_client_secret from Google Secret Manager. Defaults to false for security + * @default false + */ + includeSecret?: boolean; + }; + ListServiceTokensInput: { + /** + * @description Whether to include archived tokens in the response + * @default false + */ + includeArchived?: boolean; + /** + * Format: int64 + * @description Filter tokens by seat ID + * @example 100 + */ + seatId?: number; + /** + * Format: int64 + * @description Filter tokens by user ID + * @example 100 + */ + userId?: number; + }; + BrandAgentUpdate: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** + * Format: uri + * @example https://example.com + */ + manifestUrl?: string; + /** @example 100 */ + customerId: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + BrandStandardsCreate: { + /** @example example_id_123 */ + id: string; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + countryCodes: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + brands: string[]; + /** @example [] */ + models: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }[]; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CampaignUpdate: { + /** @example example_id_123 */ + campaignId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CreativeGet: { + /** @example example_id_123 */ + creativeId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** @example example_id_123 */ + campaignId?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + MediaBuyGet: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + tacticId: number; + /** @example 100 */ + customerId: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; + /** @example string */ + status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + TacticGet: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example [] */ + campaignIds?: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + countryCodes: string[]; + /** @example 100 */ + mediaBuyCount?: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + }; + MCPContent: { + /** + * @example text + * @enum {string} + */ + type: 'text'; + /** @example string */ + text: string; + }; + /** @description Bad request error response */ + BadRequest: { + /** @example string */ + error: string; + /** @example string */ + message?: string; + }; + /** @description Unauthorized error response */ + Unauthorized: { + /** @example string */ + error: string; + /** @example string */ + message?: string; + }; + /** @description Internal server error response */ + InternalError: { + /** @example string */ + error: string; + /** @example string */ + message?: string; + }; + AssetList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + assetId: string; + originalFilename: string; + assetType: string; + size: number; + brandAgentId: string; + customerId: number; + signedUrl: string; + tags?: string[]; + }[]; + }; + BrandAgentList: { + /** @example [] */ + brandAgents: components['schemas']['BrandAgentUpdateOutput'][]; + /** @example 100 */ + total: number; + }; + BrandAgentDelete: { + /** @example true */ + success: boolean; + /** @example 100 */ + deletedId: number; + }; + BrandStandardsDelete: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + id: string; + }; + BrandStandardsList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: components['schemas']['BrandStandardsCreateOutput'][]; + }; + BrandStoryCreate: { + /** @example example_id_123 */ + id: string; + /** @example Example Name */ + name: string; + /** @example example_id_123 */ + brandAgentId?: string; + /** @example [] */ + countryCodes?: string[]; + /** @example [] */ + channelCodes?: string[]; + /** @example [] */ + languages?: string[]; + /** @example [] */ + brands?: string[]; + currentModel?: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + BrandStoryUpdate: { + /** @example example_id_123 */ + id: string; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example string */ + status?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + BrandStoryDelete: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + id: string; + }; + BrandStoryList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + id: string; + name: string; + description?: string; + status: string; + type: string; + languages: string[]; + currentModel?: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }[]; + }; + CampaignList: { + /** @example [] */ + campaigns: components['schemas']['CampaignUpdateOutput'][]; + /** @example 100 */ + total: number; + }; + CampaignDelete: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + deletedId: string; + }; + CampaignGetSummary: { + /** @example example_id_123 */ + campaignId: string; + summary: { + [key: string]: unknown; + }; + }; + CampaignListTactics: { + /** @example [] */ + tactics: unknown[]; + /** @example 100 */ + total: number; + }; + CampaignValidateBrief: { + /** @example true */ + valid: boolean; + /** @example string */ + feedback?: string; + }; + ChannelList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + channel: string; + displayName: string; + }[]; + }; + GetCustomerOutput: { + /** + * @description Unique identifier for the customer + * @example 100 + */ + id: number; + /** + * @description Company name + * @example string + */ + company: string; + /** + * @description Customer display name + * @example Example Name + */ + name: string; + /** + * @description Whether the customer is currently active + * @example true + */ + active: boolean; + /** + * Format: date-time + * @description ISO 8601 timestamp when the customer was created + * @example string + */ + createdAt: string; + }; + GetCustomerSeatsOutput: { + /** + * @description The customer ID these seats belong to + * @example 100 + */ + customerId: number; + /** + * @description Array of seats belonging to the customer + * @example [] + */ + seats: { + /** @description Unique identifier for the seat */ + id: string; + /** @description Seat display name */ + name: string; + /** @description Customer ID that owns this seat */ + customerId: number; + /** @description Whether the seat is currently active */ + active: boolean; + }[]; + /** + * @description Total number of seats returned + * @example 100 + */ + count: number; + }; + CreativeAssign: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + creativeId: string; + /** @example example_id_123 */ + campaignId: string; + }; + CreativeDelete: { + /** @example true */ + success: boolean; + /** @example example_id_123 */ + id: string; + }; + CreativeList: { + /** @example [] */ + items: components['schemas']['CreativeGetOutput'][]; + /** @example 100 */ + total: number; + }; + CountryList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + key: string; + displayName: string; + }[]; + }; + LanguageList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + key: string; + displayName: string; + }[]; + }; + MediaBuyList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: components['schemas']['MediaBuyGetOutput'][]; + }; + OutcomesAgentGetProposals: { + /** + * @description Total number of proposals returned + * @example 100 + */ + total: number; + /** + * @description List of proposals from outcome agents + * @example [] + */ + proposals: { + /** @description Database ID of the proposal */ + id: string; + /** @description Outcome agent generated proposal ID */ + proposalId: string; + /** @description ID of the outcome agent that created this proposal */ + outcomeAgentId: string; + /** @description Name of the outcome agent */ + outcomeAgentName: string; + /** @description How the proposal would be executed */ + execution: string; + /** @description Maximum budget the agent can manage */ + budgetCapacity: number; + /** @description Pricing model for the proposal */ + pricing: { + /** @enum {string} */ + method: 'revshare' | 'cost_per_unit'; + rate: number; + /** @enum {string} */ + pricing_model?: 'cpm' | 'cpc' | 'cpa' | 'cpv' | 'cpcv'; + currency: string; + }; + /** @description Tactic type identifier */ + sku?: string; + /** + * @description Current status of the proposal + * @enum {string} + */ + status: 'pending' | 'accepted' | 'rejected' | 'expired'; + /** @description Visual card data for rendering in UI */ + proposalCard?: components['schemas']['ProposalCardOutput']; + /** + * Format: date-time + * @description When the proposal was created + */ + createdAt: string; + }[]; + }; + OutcomesAgentAcceptProposal: { + /** + * @description ID of the created tactic/strategy + * @example example_id_123 + */ + tacticId: string; + /** + * @description Name of the created tactic (user-provided or auto-generated) + * @example Example Name + */ + tacticName: string; + /** + * @description ID of the accepted proposal + * @example example_id_123 + */ + proposalId: string; + /** + * @description ID of the outcome agent managing this tactic + * @example example_id_123 + */ + outcomeAgentId: string; + /** + * @description Whether the outcome agent acknowledged the assignment + * @example true + */ + acknowledged: boolean; + /** + * @description Optional message from the outcome agent + * @example string + */ + message?: string; + }; + OutcomesAgentListTactics: { + /** + * @description ID of the outcome agent + * @example example_id_123 + */ + outcomeAgentId: string; + /** + * @description Name of the outcome agent + * @example Example Name + */ + outcomeAgentName: string; + /** + * @description Total number of tactics managed by this agent + * @example 100 + */ + total: number; + /** + * @description List of tactics managed by this outcome agent + * @example [] + */ + tactics: { + /** @description ID of the tactic (strategy) */ + tacticId: string; + /** @description Name of the tactic */ + tacticName: string; + /** @description ID of the original proposal */ + proposalId: string; + /** @description When the proposal was accepted (ISO 8601) */ + acceptedAt: string; + /** @description Campaign ID if linked to a campaign */ + campaignId: string | null; + }[]; + }; + MediaProductList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: { + id: string; + productId: string; + name: string; + salesAgent?: string; + salesAgentId?: string; + salesAgentName?: string; + /** @enum {string} */ + deliveryType: 'guaranteed' | 'non_guaranteed'; + format?: string; + creativeFormats?: + | string[] + | { + agent_url: string; + id: string; + }[]; + }[]; + }; + AgentGet: + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + authenticationType: string; + description?: string; + organizationId?: string; + registeredBy?: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + } + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + authenticationType: string; + description?: string; + organizationId?: string; + registeredBy?: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + customerAccountCount: number; + }; + AgentList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: ( + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + } + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + customerAccountCount: number; + } + )[]; + }; + TacticList: { + /** @example 100 */ + total: number; + /** @example [] */ + items: components['schemas']['TacticGetOutput'][]; + }; + CreateServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the service token + * @example 100 + */ + id: number; + /** + * @description Customer ID that owns this token + * @example 100 + */ + customerId: number; + /** + * Format: int64 + * @description Seat ID if token is scoped to a specific seat + * @example 100 + */ + seatId?: number; + /** + * Format: int64 + * @description User ID if token is scoped to a specific user + * @example 100 + */ + userId?: number; + /** + * @description Optional organization identifier for scoping the token + * @example example_id_123 + */ + organizationId?: string; + /** + * @description Human-readable name of the token + * @example Example Name + */ + name: string; + /** + * @description Description of the token purpose + * @example string + */ + description?: string; + /** + * @description The public client ID portion of the token credentials (safe to log) + * @example example_id_123 + */ + accessClientId: string; + /** + * @description The secret portion of the token credentials. ONLY returned on creation, never retrievable again! + * @example string + */ + accessClientSecret: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if set + * @example string + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was created + * @example string + */ + createdAt: string; + }; + UpdateServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the service token + * @example 100 + */ + id: number; + /** + * @description Updated human-readable name of the token + * @example Example Name + */ + name: string; + /** + * @description Updated description of the token purpose + * @example string + */ + description?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if updated + * @example string + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was last updated + * @example string + */ + updatedAt: string; + }; + ArchiveServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the archived token + * @example 100 + */ + id: number; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was archived + * @example string + */ + archivedAt: string; + }; + GetServiceTokenOutput: { + /** + * Format: int64 + * @description Unique identifier for the service token + * @example 100 + */ + id: number; + /** + * @description Customer ID that owns this token + * @example 100 + */ + customerId: number; + /** + * Format: int64 + * @description Seat ID if token is scoped to a specific seat + * @example 100 + */ + seatId?: number; + /** + * Format: int64 + * @description User ID if token is scoped to a specific user + * @example 100 + */ + userId?: number; + /** + * @description Optional organization identifier for scoping the token + * @example example_id_123 + */ + organizationId?: string; + /** + * @description Human-readable name of the token + * @example Example Name + */ + name: string; + /** + * @description Description of the token purpose + * @example string + */ + description?: string; + /** + * @description The public client ID portion of the token credentials (safe to log) + * @example example_id_123 + */ + accessClientId: string; + /** + * @description The secret portion of the token credentials. Only included if includeSecret=true was passed + * @example string + */ + accessClientSecret?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if set + * @example string + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was created + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was last updated + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was archived, if archived + * @example string + */ + archivedAt?: string; + }; + ListServiceTokensOutput: { + /** + * @description Array of service tokens. Note: accessClientSecret is never included in list responses + * @example [] + */ + tokens: { + /** + * Format: int64 + * @description Unique identifier for the service token + */ + id: number; + /** @description Customer ID that owns this token */ + customerId: number; + /** + * Format: int64 + * @description Seat ID if token is scoped to a specific seat + */ + seatId?: number; + /** @description Seat name if token is scoped to a specific seat */ + seatName?: string; + /** + * Format: int64 + * @description User ID if token is scoped to a specific user + */ + userId?: number; + /** @description Optional organization identifier for scoping the token */ + organizationId?: string; + /** @description Human-readable name of the token */ + name: string; + /** @description Description of the token purpose */ + description?: string; + /** @description The public client ID portion of the token credentials (safe to log) */ + accessClientId: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token expires, if set + */ + expiresAt?: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was created + */ + createdAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was last updated + */ + updatedAt: string; + /** + * Format: date-time + * @description ISO 8601 timestamp when the token was archived, if archived + */ + archivedAt?: string; + }[]; + /** + * @description Total number of tokens returned + * @example 100 + */ + count: number; + }; + /** @description Visual card data for rendering proposals in marketplace UI, following ADCP product card pattern */ + ProposalCardOutput: { + /** + * @description Proposal name/title + * @example Premium Display Campaign + */ + title: string; + /** + * @description What the proposal offers + * @example Target premium inventory at $2.50 vCPM with 85% viewability guarantee + */ + description: string; + /** + * @description Optional array of image URLs showcasing the approach + * @example [ + * "https://example.com/chart1.png", + * "https://example.com/viz2.png" + * ] + */ + image_carousel?: string[]; + /** + * @description Markdown-formatted detailed execution plan and specifications + * @example ## Execution Strategy + * + * We will target... + */ + details?: string; + /** @description Pricing information for comparison */ + pricing_summary: { + /** + * @description Human-readable pricing method + * @example 15% revenue share + */ + method: string; + /** + * @description Human-readable budget capacity + * @example $50,000 maximum + */ + budget_capacity: string; + /** + * @description Optional estimated cost calculation + * @example $7,500 estimated fee + */ + estimated_cost?: string; + }; + }; + /** @description Budget range for campaign planning */ + BudgetRangeOutput: { + /** + * @description Minimum budget available + * @example 50000 + */ + min: number; + /** + * @description Maximum budget available + * @example 150000 + */ + max: number; + /** + * @description Currency for budget (ISO 4217 code) + * @default USD + * @example USD + */ + currency: string; + }; + BrandAgentUpdateOutput: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** + * Format: uri + * @example https://example.com + */ + manifestUrl?: string; + /** @example 100 */ + customerId: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + BrandStandardsCreateOutput: { + /** @example example_id_123 */ + id: string; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + countryCodes: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + brands: string[]; + /** @example [] */ + models: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }[]; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CampaignUpdateOutput: { + /** @example example_id_123 */ + campaignId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CreativeGetOutput: { + /** @example example_id_123 */ + creativeId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** @example example_id_123 */ + campaignId?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + MediaBuyGetOutput: { + /** @example example_id_123 */ + id: string; + /** @example 100 */ + tacticId: number; + /** @example 100 */ + customerId: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** @example [] */ + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + /** @example [] */ + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; + /** @example string */ + status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + TacticGetOutput: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + prompt?: string; + /** @example [] */ + campaignIds?: string[]; + /** @example [] */ + channelCodes: string[]; + /** @example [] */ + countryCodes: string[]; + /** @example 100 */ + mediaBuyCount?: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + /** + * Format: date-time + * @example string + */ + archivedAt?: string; + }; + BrandAgentGet: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** + * Format: uri + * @example https://example.com + */ + manifestUrl?: string; + /** @example 100 */ + customerId: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + BrandAgentCreate: { + /** @example 100 */ + id: number; + /** @example Example Name */ + name: string; + /** @example string */ + description?: string; + /** + * Format: uri + * @example https://example.com + */ + manifestUrl?: string; + /** @example 100 */ + customerId: number; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CampaignCreate: { + /** @example example_id_123 */ + campaignId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CampaignGet: { + /** @example example_id_123 */ + campaignId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CreativeCreate: { + /** @example example_id_123 */ + creativeId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** @example example_id_123 */ + campaignId?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + CreativeUpdate: { + /** @example example_id_123 */ + creativeId: string; + /** @example Example Name */ + name: string; + /** @example string */ + status: string; + /** @example example_id_123 */ + campaignId?: string; + /** + * Format: date-time + * @example string + */ + createdAt: string; + /** + * Format: date-time + * @example string + */ + updatedAt: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type $defs = Record; + +export type external = Record; + +export interface operations { + /** + * Initialize MCP session + * @description Initialize a new MCP session. This must be called before using any tools. The session ID should be generated as a UUID and included in the mcp-session-id header for all subsequent requests. + */ + mcp_initialize: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Generate a new UUID for session initialization. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + jsonrpc: '2.0'; + id: string | number; + /** @enum {string} */ + method: 'initialize'; + params: { + /** @example 2024-11-05 */ + protocolVersion: string; + capabilities: Record; + clientInfo: { + name: string; + version: string; + }; + }; + }; + }; + }; + responses: { + /** @description Session initialized successfully */ + 200: { + content: { + 'application/json': { + /** @enum {string} */ + jsonrpc?: '2.0'; + id?: string | number; + result?: { + protocolVersion?: string; + capabilities?: Record; + serverInfo?: { + name?: string; + version?: string; + }; + }; + }; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + }; + }; + /** + * List brand agents + * @description List all brand agents (advertiser accounts) for the authenticated customer. Authentication is automatic - no parameters required. + */ + brand_agent_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_agent_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_agent_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_agent_list'; + arguments: components['schemas']['ListBrandAgentsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandAgentList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get brand agent + * @description Get detailed information about a specific brand agent (advertiser account) by ID. + */ + brand_agent_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_agent_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_agent_get", + * "arguments": { + * "brandAgentId": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_agent_get'; + arguments: components['schemas']['GetBrandAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandAgentUpdateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create brand agent + * @description Create a new brand agent (advertiser account). This creates the top-level container that will own campaigns, creatives, audiences, standards, and measurement sources. + */ + brand_agent_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_agent_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_agent_create", + * "arguments": { + * "name": "Example Name" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_agent_create'; + arguments: components['schemas']['CreateBrandAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandAgentUpdateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update brand agent + * @description Update an existing brand agent with new information. + */ + brand_agent_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_agent_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_agent_update", + * "arguments": { + * "brandAgentId": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_agent_update'; + arguments: components['schemas']['UpdateBrandAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandAgentUpdateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete brand agent + * @description Delete a brand agent. This will also delete all associated campaigns, creatives, and other resources. + */ + brand_agent_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_agent_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_agent_delete", + * "arguments": { + * "brandAgentId": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_agent_delete'; + arguments: components['schemas']['DeleteBrandAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandAgentDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List campaigns + * @description List all campaigns with optional filtering by brand agent. + */ + campaign_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_list'; + arguments: components['schemas']['ListCampaignsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create campaign + * @description Create a new campaign with natural language prompt. The backend will parse the prompt to extract targeting, budget, and creative requirements. + */ + campaign_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_create", + * "arguments": { + * "brandAgentId": 100, + * "prompt": "string" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_create'; + arguments: components['schemas']['CreateCampaignInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignUpdateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get campaign + * @description Get detailed information about a specific campaign. + */ + campaign_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_get", + * "arguments": { + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_get'; + arguments: components['schemas']['GetCampaignInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignUpdateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update campaign + * @description Update an existing campaign with new information. + */ + campaign_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_update", + * "arguments": { + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_update'; + arguments: components['schemas']['UpdateCampaignInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignUpdateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete campaign + * @description Delete a campaign and all associated resources. + */ + campaign_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_delete", + * "arguments": { + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_delete'; + arguments: components['schemas']['DeleteCampaignInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get campaign summary + * @description Get a high-level summary of a campaign including key metrics and status. + */ + campaign_get_summary: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_get_summary */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_get_summary", + * "arguments": { + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_get_summary'; + arguments: components['schemas']['GetCampaignSummaryInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignGetSummary']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List campaign tactics + * @description List all tactics associated with a specific campaign. + */ + campaign_list_tactics: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_list_tactics */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_list_tactics", + * "arguments": { + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_list_tactics'; + arguments: components['schemas']['ListCampaignTacticsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignListTactics']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Validate campaign brief + * @description Validate a campaign brief to ensure it contains all necessary information for campaign creation. + */ + campaign_validate_brief: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for campaign_validate_brief */ + requestBody: { + content: { + /** + * @example { + * "tool": "campaign_validate_brief", + * "arguments": { + * "brief": "string" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'campaign_validate_brief'; + arguments: components['schemas']['ValidateBriefInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CampaignValidateBrief']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List assets + * @description List all uploaded assets with optional filtering by brand agent. + */ + asset_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for asset_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "asset_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'asset_list'; + arguments: components['schemas']['ListAssetsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AssetList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create brand standards + * @description Create brand standards including guidelines, tone of voice, visual requirements, and content rules for a brand agent. + */ + brand_standards_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_standards_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_standards_create", + * "arguments": { + * "brandAgentId": 100, + * "prompt": "string" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_standards_create'; + arguments: components['schemas']['CreateBrandStandardInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStandardsCreateOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete brand standards + * @description Delete brand standards for a brand agent. + */ + brand_standards_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_standards_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_standards_delete", + * "arguments": { + * "brandStandardId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_standards_delete'; + arguments: components['schemas']['DeleteBrandStandardInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStandardsDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List brand standards + * @description List all brand standards with optional filtering by brand agent. + */ + brand_standards_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_standards_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_standards_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_standards_list'; + arguments: components['schemas']['ListBrandStandardsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStandardsList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create brand story + * @description Create a brand story containing the narrative, history, values, and key messaging for a brand agent. + */ + brand_story_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_story_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_story_create", + * "arguments": { + * "brandAgentId": null, + * "name": "Example Name", + * "languages": [] + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_story_create'; + arguments: components['schemas']['CreateBrandStoryInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStoryCreate']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update brand story + * @description Update an existing brand story with new information. + */ + brand_story_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_story_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_story_update", + * "arguments": { + * "brandStoryId": "example_id_123", + * "prompt": "string" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_story_update'; + arguments: components['schemas']['UpdateBrandStoryInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStoryUpdate']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete brand story + * @description Delete a brand story. + */ + brand_story_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_story_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_story_delete", + * "arguments": { + * "brandStoryId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_story_delete'; + arguments: components['schemas']['DeleteBrandStoryInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStoryDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List brand stories + * @description List all brand stories with optional filtering by brand agent. + */ + brand_story_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for brand_story_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "brand_story_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'brand_story_list'; + arguments: components['schemas']['ListBrandStoriesInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['BrandStoryList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List channels + * @description List all available advertising channels and platforms. + */ + channel_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for channel_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "channel_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'channel_list'; + arguments: components['schemas']['ListChannelsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['ChannelList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List countries + * @description Get all available countries for targeting. Use this to get valid country codes before creating brand agents. + */ + country_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for country_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "country_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'country_list'; + arguments: components['schemas']['ListCountriesInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CountryList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List languages + * @description Get all available languages for targeting. Use this to get valid language codes before creating brand stories. + */ + language_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for language_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "language_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'language_list'; + arguments: components['schemas']['ListLanguagesInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['LanguageList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Assign creative + * @description Assign a creative to a tactic or media buy. + */ + creative_assign: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_assign */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_assign", + * "arguments": { + * "creativeId": "example_id_123", + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_assign'; + arguments: components['schemas']['AssignCreativeInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeAssign']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create creative + * @description Create a new creative with assets, copy, and targeting specifications. + */ + creative_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_create", + * "arguments": { + * "brandAgentId": 100, + * "name": "Example Name" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_create'; + arguments: components['schemas']['CreateCreativeInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update creative + * @description Update an existing creative with new assets, copy, or specifications. + */ + creative_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_update", + * "arguments": { + * "creativeId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_update'; + arguments: components['schemas']['UpdateCreativeInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Delete creative + * @description Delete a creative and remove it from any associated tactics or media buys. + */ + creative_delete: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_delete */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_delete", + * "arguments": { + * "creativeId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_delete'; + arguments: components['schemas']['DeleteCreativeInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeDelete']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get creative + * @description Get detailed information about a specific creative. + */ + creative_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_get", + * "arguments": { + * "creativeId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_get'; + arguments: components['schemas']['GetCreativeInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List creatives + * @description List all creatives with optional filtering by brand agent or campaign. + */ + creative_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for creative_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "creative_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'creative_list'; + arguments: components['schemas']['ListCreativesInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreativeList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get media buy + * @description Get detailed information about a specific media buy. + */ + media_buy_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_get", + * "arguments": { + * "mediaBuyId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_get'; + arguments: components['schemas']['GetMediaBuyInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List media buys + * @description List all media buys with optional filtering by brand agent, campaign, or status. + */ + media_buy_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_buy_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_buy_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_buy_list'; + arguments: components['schemas']['ListMediaBuysInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaBuyList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List media products + * @description List saved media products with optional filtering. + */ + media_product_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for media_product_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "media_product_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'media_product_list'; + arguments: components['schemas']['ListProductsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['MediaProductList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get agent + * @description Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + agent_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_get", + * "arguments": { + * "agentId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_get'; + arguments: components['schemas']['GetAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentGet']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List agents + * @description List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + agent_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for agent_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "agent_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'agent_list'; + arguments: components['schemas']['ListAgentsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get tactic + * @description Get detailed information about a specific tactic. + */ + tactic_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_get", + * "arguments": { + * "tacticId": 100 + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_get'; + arguments: components['schemas']['GetTacticInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticGetOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List tactics + * @description List all tactics with optional filtering by brand agent or campaign. + */ + tactic_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for tactic_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "tactic_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'tactic_list'; + arguments: components['schemas']['ListTacticsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['TacticList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get proposals from outcome agents + * @description Request tactical proposals from outcome agents for a campaign. Outcome agents analyze the campaign brief and budget to propose execution strategies. + */ + outcomes_agent_get_proposals: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for outcomes_agent_get_proposals */ + requestBody: { + content: { + /** + * @example { + * "tool": "outcomes_agent_get_proposals", + * "arguments": { + * "campaignId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'outcomes_agent_get_proposals'; + arguments: components['schemas']['OutcomesAgentGetProposalsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['OutcomesAgentGetProposals']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Accept outcome agent proposal + * @description Accept a proposal from an outcome agent, creating a tactic and assigning it to the agent for management. + */ + outcomes_agent_accept_proposal: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for outcomes_agent_accept_proposal */ + requestBody: { + content: { + /** + * @example { + * "tool": "outcomes_agent_accept_proposal", + * "arguments": { + * "proposalId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'outcomes_agent_accept_proposal'; + arguments: components['schemas']['OutcomesAgentAcceptProposalInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['OutcomesAgentAcceptProposal']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List tactics by outcome agent + * @description List all tactics managed by a specific outcome agent. + */ + outcomes_agent_list_tactics: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for outcomes_agent_list_tactics */ + requestBody: { + content: { + /** + * @example { + * "tool": "outcomes_agent_list_tactics", + * "arguments": { + * "outcomeAgentId": "example_id_123" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'outcomes_agent_list_tactics'; + arguments: components['schemas']['OutcomesAgentListTacticsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['OutcomesAgentListTactics']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Create service token + * @description Create a new service token for API authentication. Returns the full token which should be stored securely as it cannot be retrieved later. + */ + service_token_create: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_create */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_create", + * "arguments": { + * "name": "Example Name" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_create'; + arguments: components['schemas']['CreateServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['CreateServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List service tokens + * @description List all service tokens for the authenticated customer. Secrets are never returned, only metadata. + */ + service_token_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_list */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_list", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_list'; + arguments: components['schemas']['ListServiceTokensInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['ListServiceTokensOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get service token + * @description Get detailed information about a specific service token. The secret is never returned. + */ + service_token_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_get", + * "arguments": { + * "id": "1234567890" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_get'; + arguments: components['schemas']['GetServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['GetServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update service token + * @description Update a service token. Only name, description, and expiration can be modified. + */ + service_token_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_update */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_update", + * "arguments": { + * "id": "1234567890" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_update'; + arguments: components['schemas']['UpdateServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['UpdateServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Archive service token + * @description Archive (soft delete) a service token. This immediately invalidates the token for authentication. + */ + service_token_archive: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for service_token_archive */ + requestBody: { + content: { + /** + * @example { + * "tool": "service_token_archive", + * "arguments": { + * "id": "1234567890" + * } + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'service_token_archive'; + arguments: components['schemas']['ArchiveServiceTokenInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['ArchiveServiceTokenOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get customer info + * @description Get detailed information about a customer from the core database. + */ + customer_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for customer_get */ + requestBody: { + content: { + /** + * @example { + * "tool": "customer_get", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'customer_get'; + arguments: components['schemas']['GetCustomerInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['GetCustomerOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get customer seats + * @description Get all seats associated with a customer from the core database. + */ + customer_get_seats: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + /** @description Request body for customer_get_seats */ + requestBody: { + content: { + /** + * @example { + * "tool": "customer_get_seats", + * "arguments": {} + * } + */ + 'application/json': { + /** @enum {string} */ + tool: 'customer_get_seats'; + arguments: components['schemas']['GetCustomerSeatsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['GetCustomerSeatsOutput']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; +} diff --git a/test-media-agent.ts b/test-media-agent.ts index 876c8e6..9b677bf 100644 --- a/test-media-agent.ts +++ b/test-media-agent.ts @@ -8,7 +8,7 @@ * SCOPE3_API_KEY=your_key npx ts-node test-media-agent.ts */ -import { Scope3AgenticClient } from './src/sdk'; +import { PlatformClient } from './src/platform-client'; import { getProposedTactics } from './src/simple-media-agent/get-proposed-tactics'; import { manageTactic } from './src/simple-media-agent/manage-tactic'; @@ -20,7 +20,7 @@ async function testMediaAgent() { process.exit(1); } - const scope3 = new Scope3AgenticClient({ + const scope3 = new PlatformClient({ apiKey, baseUrl: 'https://api.agentic.scope3.com', }); diff --git a/tsconfig.json b/tsconfig.json index 3ca9e4b..56709ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,5 +17,10 @@ "types": ["node", "jest"] }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "**/*.test.ts"] + "exclude": [ + "node_modules", + "dist", + "**/*.test.ts", + "src/types/outcome-agent-api.ts" + ] }