{"openapi":"3.1.0","info":{"title":"Megaphone Ad Sales (BYOK) API","version":"0.1.0","description":"Megaphone Ad Sales (BYOK) lets an AI assistant read your own Megaphone Ad Sales data through the Megaphone Ad Sales API with a key you supply (Megaphone API token). Read-only: 9 tools (list_advertisers, get_advertiser, list_advertiser_assets, list_campaigns, get_campaign, list_orders, get_order, list_order_advertisements, get_order_advertisement). The BYOK key travels with each request, is used...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-megaphone-ad-sales.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-megaphone-ad-sales/docs"},"termsOfService":"https://connectorbay.com/byok-megaphone-ad-sales/terms"},"servers":[{"url":"https://byok-megaphone-ad-sales.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-megaphone-ad-sales/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_advertisers":{"post":{"operationId":"list_advertisers","summary":"List the advertisers of a Megaphone organization with display name, currency, categories and agency link (Direct Sales A","description":"List the advertisers of a Megaphone organization with display name, currency, categories and agency link (Direct Sales API v2). Use for \"Which advertisers are set up in Megaphone\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["organization_id"],"title":"list_advertisersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_advertiser":{"post":{"operationId":"get_advertiser","summary":"Get one Megaphone advertiser: name, display name, currency, category codes and agency link. Use for \"What currency does ","description":"Get one Megaphone advertiser: name, display name, currency, category codes and agency link. Use for \"What currency does this Megaphone advertiser use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"advertiser_id":{"description":"Megaphone advertiser ID (a UUID), from list_advertisers.","maxLength":40,"title":"Advertiser Id","type":"string"}},"required":["organization_id","advertiser_id"],"title":"get_advertiserArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_advertiser_assets":{"post":{"operationId":"list_advertiser_assets","summary":"List the creative assets recorded for a Megaphone advertiser (name, type, status, file type, size, duration). File URLs ","description":"List the creative assets recorded for a Megaphone advertiser (name, type, status, file type, size, duration). File URLs are not returned. Use for \"Which creative assets does this Megaphone advertiser have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"advertiser_id":{"description":"Megaphone advertiser ID (a UUID), from list_advertisers.","maxLength":40,"title":"Advertiser Id","type":"string"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["organization_id","advertiser_id"],"title":"list_advertiser_assetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_campaigns":{"post":{"operationId":"list_campaigns","summary":"List Megaphone campaigns (Standard, Priority and old Standard) with advertiser, budget, type, status and total CPM. Use ","description":"List Megaphone campaigns (Standard, Priority and old Standard) with advertiser, budget, type, status and total CPM. Use for \"Which Megaphone ad campaigns are delivering right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["organization_id"],"title":"list_campaignsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_campaign":{"post":{"operationId":"get_campaign","summary":"Get one Megaphone campaign: advertiser, external ID, budget, type, status and total CPM. Use for \"What is the budget and","description":"Get one Megaphone campaign: advertiser, external ID, budget, type, status and total CPM. Use for \"What is the budget and status of this Megaphone campaign\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"campaign_id":{"description":"Megaphone campaign ID (a UUID), from list_campaigns.","maxLength":40,"title":"Campaign Id","type":"string"}},"required":["organization_id","campaign_id"],"title":"get_campaignArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_orders":{"post":{"operationId":"list_orders","summary":"List the orders of a Megaphone campaign with flight dates, impression cap, pacing, CPM rate and state. Use for \"What ord","description":"List the orders of a Megaphone campaign with flight dates, impression cap, pacing, CPM rate and state. Use for \"What orders are running under this Megaphone campaign\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"campaign_id":{"description":"Megaphone campaign ID (a UUID), from list_campaigns.","maxLength":40,"title":"Campaign Id","type":"string"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["organization_id","campaign_id"],"title":"list_ordersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_order":{"post":{"operationId":"get_order","summary":"Get one Megaphone order: flight schedule, impression cap, pacing, CPM rate, state and targeting summary (include and exc","description":"Get one Megaphone order: flight schedule, impression cap, pacing, CPM rate, state and targeting summary (include and exclude content targets). Use for \"What are the flight dates and cap of this Megaphone order\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"campaign_id":{"description":"Megaphone campaign ID (a UUID), from list_campaigns.","maxLength":40,"title":"Campaign Id","type":"string"},"order_id":{"description":"Megaphone order ID (a UUID), from list_orders.","maxLength":40,"title":"Order Id","type":"string"}},"required":["organization_id","campaign_id","order_id"],"title":"get_orderArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_order_advertisements":{"post":{"operationId":"list_order_advertisements","summary":"List the advertisements of a Megaphone order with placement, state, weight, flight dates and approval status. Use for \"W","description":"List the advertisements of a Megaphone order with placement, state, weight, flight dates and approval status. Use for \"Which ads are attached to this Megaphone order\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"campaign_id":{"description":"Megaphone campaign ID (a UUID), from list_campaigns.","maxLength":40,"title":"Campaign Id","type":"string"},"order_id":{"description":"Megaphone order ID (a UUID), from list_orders.","maxLength":40,"title":"Order Id","type":"string"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["organization_id","campaign_id","order_id"],"title":"list_order_advertisementsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_order_advertisement":{"post":{"operationId":"get_order_advertisement","summary":"Get one Megaphone order advertisement: placement, ad break, state, weight, flight dates and approval status. Use for \"Is","description":"Get one Megaphone order advertisement: placement, ad break, state, weight, flight dates and approval status. Use for \"Is this Megaphone advertisement approved\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Megaphone organization ID (a UUID), shown in the Megaphone account settings.","maxLength":40,"title":"Organization Id","type":"string"},"campaign_id":{"description":"Megaphone campaign ID (a UUID), from list_campaigns.","maxLength":40,"title":"Campaign Id","type":"string"},"order_id":{"description":"Megaphone order ID (a UUID), from list_orders.","maxLength":40,"title":"Order Id","type":"string"},"advertisement_id":{"description":"Megaphone advertisement ID (a UUID), from list_order_advertisements.","maxLength":40,"title":"Advertisement Id","type":"string"}},"required":["organization_id","campaign_id","order_id","advertisement_id"],"title":"get_order_advertisementArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}