{"openapi":"3.1.0","info":{"title":"Megaphone Targeting (BYOK) API","version":"0.1.0","description":"Megaphone Targeting (BYOK) lets an AI assistant read your own Megaphone Targeting data through the Megaphone Targeting API with a key you supply (Megaphone API token). Read-only: 7 tools (list_countries, list_regions, list_dmas, list_cities, list_postal_codes, list_episode_topics, list_audience_interests). The BYOK key travels with each request, is used for that one call only and is never stored,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-megaphone-targeting.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-megaphone-targeting/docs"},"termsOfService":"https://connectorbay.com/byok-megaphone-targeting/terms"},"servers":[{"url":"https://byok-megaphone-targeting.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-megaphone-targeting/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_countries":{"post":{"operationId":"list_countries","summary":"List countries available for Megaphone geo targeting (code and name), optionally filtered by code or name. Use for \"Whic","description":"List countries available for Megaphone geo targeting (code and name), optionally filtered by code or name. Use for \"Which countries can I target 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"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries in this country, as a two-letter code such as US.","title":"Country Code"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to match against the country name, for example 'united'.","title":"Search"},"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_countriesArguments","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_regions":{"post":{"operationId":"list_regions","summary":"List regions (states or provinces) available for Megaphone geo targeting, with the ID to use in order targeting. Use for","description":"List regions (states or provinces) available for Megaphone geo targeting, with the ID to use in order targeting. Use for \"What is the Megaphone region ID for California\".","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"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries in this country, as a two-letter code such as US.","title":"Country Code"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to match against the region name, for example 'cal'.","title":"Search"},"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_regionsArguments","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_dmas":{"post":{"operationId":"list_dmas","summary":"List US Designated Market Areas available for Megaphone geo targeting, with the ID to use in order targeting. Use for \"W","description":"List US Designated Market Areas available for Megaphone geo targeting, with the ID to use in order targeting. Use for \"What is the Megaphone DMA ID for New York\".","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"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries in this country, as a two-letter code such as US.","title":"Country Code"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to match against the market area name, for example 'new york'.","title":"Search"},"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_dmasArguments","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_cities":{"post":{"operationId":"list_cities","summary":"List cities available for Megaphone geo targeting, with the ID to use in order targeting. Use for \"What is the Megaphone","description":"List cities available for Megaphone geo targeting, with the ID to use in order targeting. Use for \"What is the Megaphone city ID for Los Angeles\".","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"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries in this country, as a two-letter code such as US.","title":"Country Code"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to match against the city name, for example 'los'.","title":"Search"},"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_citiesArguments","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_postal_codes":{"post":{"operationId":"list_postal_codes","summary":"List postal codes available for Megaphone geo targeting, with the ID (country:code) to use in order targeting. Use for \"","description":"List postal codes available for Megaphone geo targeting, with the ID (country:code) to use in order targeting. Use for \"Which postal codes starting with 900 can I target 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"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries in this country, as a two-letter code such as US.","title":"Country Code"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to match against the postal code name, for example '900'.","title":"Search"},"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_postal_codesArguments","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_episode_topics":{"post":{"operationId":"list_episode_topics","summary":"List the episode topic taxonomy usable for Megaphone content targeting, with sub-topics (needs Spotify enablement on the","description":"List the episode topic taxonomy usable for Megaphone content targeting, with sub-topics (needs Spotify enablement on the account). Use for \"What episode topics can I target 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"}},"required":["organization_id"],"title":"list_episode_topicsArguments","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_audience_interests":{"post":{"operationId":"list_audience_interests","summary":"List audience interest and demographic segments usable for Megaphone audience targeting (needs Spotify enablement on the","description":"List audience interest and demographic segments usable for Megaphone audience targeting (needs Spotify enablement on the account). Use for \"What audience interests can I target 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"}},"required":["organization_id"],"title":"list_audience_interestsArguments","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}}}}