{"openapi":"3.1.0","info":{"title":"HubSpot Marketing Emails (BYOK) API","version":"0.1.0","description":"HubSpot Marketing Emails (BYOK) lets an AI assistant read your own HubSpot Marketing Emails data through the HubSpot Marketing Emails API with a key you supply (HubSpot private app access token (scope: content)). Read-only: 6 tools (list_marketing_emails, get_marketing_email, get_email_statistics, get_email_statistics_histogram, list_email_revisions, get_ab_test_variation). The BYOK key travels...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-hubspot-marketing-emails.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-hubspot-marketing-emails/docs"},"termsOfService":"https://connectorbay.com/byok-hubspot-marketing-emails/terms"},"servers":[{"url":"https://byok-hubspot-marketing-emails.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-hubspot-marketing-emails/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_marketing_emails":{"post":{"operationId":"list_marketing_emails","summary":"List marketing emails in the HubSpot account with name, subject, type, state, publish date and campaign; optional statis","description":"List marketing emails in the HubSpot account with name, subject, type, state, publish date and campaign; optional statistics. Email bodies are not returned. Use for \"Which marketing emails did we publish this quarter\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many emails 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"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for published emails only, false for unpublished ones. Leave out for both.","title":"Is Published"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to list archived emails instead of active ones.","title":"Archived"},"include_stats":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to add open, click and bounce counters and ratios to each email.","title":"Include Stats"},"created_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails created after this ISO 8601 time.","title":"Created After"},"updated_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails updated after this ISO 8601 time.","title":"Updated After"}},"title":"list_marketing_emailsArguments","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_marketing_email":{"post":{"operationId":"get_marketing_email","summary":"Get one marketing email: name, subject, type, state, sender name, campaign, workflows and optionally its statistics. The","description":"Get one marketing email: name, subject, type, state, sender name, campaign, workflows and optionally its statistics. The body is not returned. Use for \"What are the details and open rate of marketing email 12345678\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"email_id":{"description":"Id of the marketing email (a numeric string such as '12345678').","maxLength":200,"title":"Email Id","type":"string"},"include_stats":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to add counters and ratios (sent, opened, clicked).","title":"Include Stats"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to read an archived email.","title":"Archived"}},"required":["email_id"],"title":"get_marketing_emailArguments","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_email_statistics":{"post":{"operationId":"get_email_statistics","summary":"Get aggregated counters (sent, delivered, opened, clicked, bounced) and ratios for all marketing emails sent in a time r","description":"Get aggregated counters (sent, delivered, opened, clicked, bounced) and ratios for all marketing emails sent in a time range. Use for \"How did our marketing emails perform in September\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_timestamp":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the period as an ISO 8601 time, for example 2026-09-01T00:00:00Z.","title":"Start Timestamp"},"end_timestamp":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period as an ISO 8601 time, for example 2026-09-30T23:59:59Z.","title":"End Timestamp"}},"title":"get_email_statisticsArguments","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_email_statistics_histogram":{"post":{"operationId":"get_email_statistics_histogram","summary":"Get email counters and ratios split into time intervals (year to second) over a time range, for trend questions. Use for","description":"Get email counters and ratios split into time intervals (year to second) over a time range, for trend questions. Use for \"Show weekly marketing email opens for the last two months\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"interval":{"anyOf":[{"enum":["YEAR","QUARTER","MONTH","WEEK","DAY","HOUR","QUARTER_HOUR","MINUTE","SECOND"],"type":"string"},{"type":"null"}],"default":"WEEK","description":"Bucket size.","title":"Interval"},"start_timestamp":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the period as an ISO 8601 time, for example 2026-09-01T00:00:00Z.","title":"Start Timestamp"},"end_timestamp":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period as an ISO 8601 time, for example 2026-09-30T23:59:59Z.","title":"End Timestamp"}},"title":"get_email_statistics_histogramArguments","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_email_revisions":{"post":{"operationId":"list_email_revisions","summary":"List earlier saved versions of a marketing email with version id, name, subject, state and update time. Use for \"What ea","description":"List earlier saved versions of a marketing email with version id, name, subject, state and update time. Use for \"What earlier versions exist of marketing email 12345678\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"email_id":{"description":"Id of the marketing email (a numeric string such as '12345678').","maxLength":200,"title":"Email Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many emails to return (1 to 100).","title":"Limit"},"before":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor for earlier versions: paging.next.after or paging.prev.before from the previous answer.","title":"Before"}},"required":["email_id"],"title":"list_email_revisionsArguments","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_ab_test_variation":{"post":{"operationId":"get_ab_test_variation","summary":"For an A/B tested marketing email, get the other variant with its name, subject, state and campaign. Use for \"What is th","description":"For an A/B tested marketing email, get the other variant with its name, subject, state and campaign. Use for \"What is the B variant of A/B email 12345678\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"email_id":{"description":"Id of the marketing email (a numeric string such as '12345678').","maxLength":200,"title":"Email Id","type":"string"}},"required":["email_id"],"title":"get_ab_test_variationArguments","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}}}}