{"openapi":"3.1.0","info":{"title":"HubSpot Marketing Campaigns (BYOK) API","version":"0.1.0","description":"HubSpot Marketing Campaigns (BYOK) lets an AI assistant read your own HubSpot Marketing Campaigns data through the HubSpot Marketing Campaigns API with a key you supply (HubSpot private app access token (scope: marketing.campaigns.read; revenue report also marketing.campaigns.revenue.read)). Read-only: 6 tools (list_campaigns, get_campaign, get_campaign_metrics, get_campaign_revenue,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-hubspot-marketing-campaigns.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-hubspot-marketing-campaigns/docs"},"termsOfService":"https://connectorbay.com/byok-hubspot-marketing-campaigns/terms"},"servers":[{"url":"https://byok-hubspot-marketing-campaigns.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-hubspot-marketing-campaigns/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_campaigns":{"post":{"operationId":"list_campaigns","summary":"List marketing campaigns with name, status, dates, audience, budget and spend totals. Marketing Hub Professional or Ente","description":"List marketing campaigns with name, status, dates, audience, budget and spend totals. Marketing Hub Professional or Enterprise. Use for \"Which marketing campaigns are active in HubSpot\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many campaigns to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: paging.next.after from the previous answer. Leave out for the first page.","title":"After"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only campaigns whose name matches this text.","title":"Name"},"sort":{"anyOf":[{"enum":["hs_name","-hs_name","createdAt","-createdAt","updatedAt","-updatedAt"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by hs_name, createdAt or updatedAt; prefix with - for descending, for example -updatedAt.","title":"Sort"},"properties":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"default":"hs_name,hs_start_date,hs_end_date,hs_campaign_status,hs_audience,hs_budget_items_sum_amount,hs_spend_items_sum_amount,hs_currency_code","description":"Comma-separated campaign property names to return, for example hs_name,hs_campaign_status,hs_owner.","title":"Properties"}},"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 campaign's properties and the ids of its assets. Give a date range to include asset metrics for that period. Use","description":"Get one campaign's properties and the ids of its assets. Give a date range to include asset metrics for that period. Use for \"Show HubSpot campaign edb9b6c3 with its assets\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_guid":{"description":"Campaign id (a GUID such as 'edb9b6c3-d2e2-4ca8-8396-832262aed0d4'; the id field from list_campaigns).","maxLength":60,"title":"Campaign Guid","type":"string"},"properties":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"default":"hs_name,hs_start_date,hs_end_date,hs_campaign_status,hs_audience,hs_budget_items_sum_amount,hs_spend_items_sum_amount,hs_currency_code","description":"Comma-separated campaign property names to return, for example hs_name,hs_campaign_status,hs_owner.","title":"Properties"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the period as YYYY-MM-DD. Leave out for all time.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period as YYYY-MM-DD. Leave out for all time.","title":"End Date"}},"required":["campaign_guid"],"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/get_campaign_metrics":{"post":{"operationId":"get_campaign_metrics","summary":"Get a campaign's aggregate traffic numbers: sessions, influenced contacts and new contacts by first and last touch. Coun","description":"Get a campaign's aggregate traffic numbers: sessions, influenced contacts and new contacts by first and last touch. Counts only. Use for \"How many sessions did HubSpot campaign edb9b6c3 drive\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_guid":{"description":"Campaign id (a GUID such as 'edb9b6c3-d2e2-4ca8-8396-832262aed0d4'; the id field from list_campaigns).","maxLength":60,"title":"Campaign Guid","type":"string"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the period as YYYY-MM-DD. Leave out for all time.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period as YYYY-MM-DD. Leave out for all time.","title":"End Date"}},"required":["campaign_guid"],"title":"get_campaign_metricsArguments","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_revenue":{"post":{"operationId":"get_campaign_revenue","summary":"Get revenue attributed to a campaign: revenue, deal amount, number of deals and contacts, with a chosen attribution mode","description":"Get revenue attributed to a campaign: revenue, deal amount, number of deals and contacts, with a chosen attribution model. Use for \"How much revenue is attributed to HubSpot campaign edb9b6c3\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_guid":{"description":"Campaign id (a GUID such as 'edb9b6c3-d2e2-4ca8-8396-832262aed0d4'; the id field from list_campaigns).","maxLength":60,"title":"Campaign Guid","type":"string"},"attribution_model":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Attribution model name to apply (the values HubSpot revenue attribution reports use). Leave out for the default.","title":"Attribution Model"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the period as YYYY-MM-DD. Leave out for all time.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period as YYYY-MM-DD. Leave out for all time.","title":"End Date"}},"required":["campaign_guid"],"title":"get_campaign_revenueArguments","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_budget":{"post":{"operationId":"get_campaign_budget","summary":"Get a campaign's budget and spend: totals, remaining budget, and each budget and spend line with name and amount. Use fo","description":"Get a campaign's budget and spend: totals, remaining budget, and each budget and spend line with name and amount. Use for \"What is the budget and spend of HubSpot campaign edb9b6c3\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_guid":{"description":"Campaign id (a GUID such as 'edb9b6c3-d2e2-4ca8-8396-832262aed0d4'; the id field from list_campaigns).","maxLength":60,"title":"Campaign Guid","type":"string"}},"required":["campaign_guid"],"title":"get_campaign_budgetArguments","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_campaign_asset_types":{"post":{"operationId":"list_campaign_asset_types","summary":"List the asset types that can be attached to a campaign (for example marketing emails, landing pages, forms). Use for \"W","description":"List the asset types that can be attached to a campaign (for example marketing emails, landing pages, forms). Use for \"What kinds of assets can a HubSpot campaign hold\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_campaign_asset_typesArguments","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}}}}