{"openapi":"3.1.0","info":{"title":"SparkPost (BYOK) API","version":"0.1.0","description":"SparkPost (BYOK) lets an AI assistant read your own SparkPost data through the SparkPost API with a key you supply (SparkPost API key (read-only permissions are enough)). Read-only: 8 tools (list_templates, get_template, list_sending_domains, search_suppression_list, get_delivery_summary, get_delivery_by_domain, search_message_events, list_subaccounts). The BYOK key travels with each request, is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-sparkpost.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-sparkpost/docs"},"termsOfService":"https://connectorbay.com/byok-sparkpost/terms"},"servers":[{"url":"https://byok-sparkpost.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-sparkpost/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_templates":{"post":{"operationId":"list_templates","summary":"List email templates (up to the first 50,000) with name, description, published and draft flags and last update time. Us","description":"List email templates (up to the first 50,000) with name, description, published and draft flags and last update time. Use for \"What email templates do I have in SparkPost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"draft":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list draft templates, false for published ones; leave out for the most recently edited of either.","title":"Draft"},"shared_with_subaccounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only shared templates, false for only unshared ones.","title":"Shared With Subaccounts"}},"title":"list_templatesArguments","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_template":{"post":{"operationId":"get_template","summary":"Get one template with its options and content (from, subject, reply-to, text and HTML). Use for \"Show me the SparkPost t","description":"Get one template with its options and content (from, subject, reply-to, text and HTML). Use for \"Show me the SparkPost template welcome-email\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"template_id":{"description":"Template id (case sensitive) from list_templates.","maxLength":128,"title":"Template Id","type":"string"},"draft":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to return the draft version, false for the published one.","title":"Draft"}},"required":["template_id"],"title":"get_templateArguments","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_sending_domains":{"post":{"operationId":"list_sending_domains","summary":"List sending domains with ownership, DKIM, SPF, CNAME, MX and compliance verification status. Use for \"Are all my SparkP","description":"List sending domains with ownership, DKIM, SPF, CNAME, MX and compliance verification status. Use for \"Are all my SparkPost sending domains verified\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"ownership_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for verified domains only, false for unverified ones.","title":"Ownership Verified"},"dkim_status":{"anyOf":[{"enum":["valid","invalid","unverified","pending"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains with this DKIM status.","title":"Dkim Status"},"cname_status":{"anyOf":[{"enum":["valid","invalid","unverified","pending"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains with this CNAME status.","title":"Cname Status"},"mx_status":{"anyOf":[{"enum":["valid","invalid","unverified","pending"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains with this MX status.","title":"Mx Status"},"compliance_status":{"anyOf":[{"enum":["valid","blocked"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains with this compliance status.","title":"Compliance Status"}},"title":"list_sending_domainsArguments","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/search_suppression_list":{"post":{"operationId":"search_suppression_list","summary":"Search the suppression list (addresses that will not be mailed) by update date, type or source, with the reason and last","description":"Search the suppression list (addresses that will not be mailed) by update date, type or source, with the reason and last update. Use for \"Which recipients are on my SparkPost suppression list since January\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date_from":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries updated at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Date From"},"date_to":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries updated before this ISO 8601 time (default: now).","title":"Date To"},"types":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated: transactional, non_transactional and/or open_tracking (default: the first two).","title":"Types"},"sources":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated, case-sensitive source values.","title":"Sources"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many entries per page (1 to 100, default 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"search_suppression_listArguments","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_delivery_summary":{"post":{"operationId":"get_delivery_summary","summary":"Get summary delivery metrics (counts such as injected, delivered, bounced, opened, clicked) for a time range, optionally","description":"Get summary delivery metrics (counts such as injected, delivered, bounced, opened, clicked) for a time range, optionally limited to some recipient domains. Use for \"How many emails did SparkPost deliver and bounce in January 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date_from":{"description":"Start of the range, format YYYY-MM-DDTHH:MM (UTC unless timezone is given), for example 2026-01-01T00:00.","maxLength":20,"title":"Date From","type":"string"},"metrics":{"description":"Comma-separated metric names, for example 'count_targeted,count_delivered,count_bounce,count_hard_bounce,count_rendered,count_unique_clicked,count_spam_complaint'. Others: count_injected, count_rejected, count_soft_bounce, count_block_bounce, count_delayed, count_sent, count_accepted, count_clicked, total_msg_volume.","maxLength":400,"title":"Metrics","type":"string"},"date_to":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"End of the range, format YYYY-MM-DDTHH:MM (default: now).","title":"Date To"},"domains":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated recipient domains to include, for example 'gmail.com,yahoo.com'.","title":"Domains"},"precision":{"anyOf":[{"enum":["1min","5min","15min","hour","day"],"type":"string"},{"type":"null"}],"default":null,"description":"Time bucket size for the grouping (default 1min).","title":"Precision"}},"required":["date_from","metrics"],"title":"get_delivery_summaryArguments","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_delivery_by_domain":{"post":{"operationId":"get_delivery_by_domain","summary":"Get delivery metrics grouped by recipient domain (for example gmail.com) for a time range. Use for \"Which recipient doma","description":"Get delivery metrics grouped by recipient domain (for example gmail.com) for a time range. Use for \"Which recipient domains bounce the most on SparkPost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date_from":{"description":"Start of the range, format YYYY-MM-DDTHH:MM (UTC unless timezone is given), for example 2026-01-01T00:00.","maxLength":20,"title":"Date From","type":"string"},"metrics":{"description":"Comma-separated metric names, for example 'count_targeted,count_delivered,count_bounce,count_hard_bounce,count_rendered,count_unique_clicked,count_spam_complaint'. Others: count_injected, count_rejected, count_soft_bounce, count_block_bounce, count_delayed, count_sent, count_accepted, count_clicked, total_msg_volume.","maxLength":400,"title":"Metrics","type":"string"},"date_to":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"End of the range, format YYYY-MM-DDTHH:MM (default: now).","title":"Date To"},"domains":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated recipient domains to include, for example 'gmail.com,yahoo.com'.","title":"Domains"},"precision":{"anyOf":[{"enum":["1min","5min","15min","hour","day"],"type":"string"},{"type":"null"}],"default":null,"description":"Time bucket size for the grouping (default 1min).","title":"Precision"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many groups to return (1 to 100, default 20).","title":"Limit"},"order_by":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Metric name to order the groups by.","title":"Order By"}},"required":["date_from","metrics"],"title":"get_delivery_by_domainArguments","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/search_message_events":{"post":{"operationId":"search_message_events","summary":"Search message events (injection, delivery, bounce, click, open and so on) of the last 10 days with recipient, subject, ","description":"Search message events (injection, delivery, bounce, click, open and so on) of the last 10 days with recipient, subject, timestamp and failure reason. Use for \"Which SparkPost messages bounced in the last day\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date_from":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the range, UTC, format YYYY-MM-DDTHH:MM:ssZ (default: 24 hours ago).","title":"Date From"},"date_to":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the range, UTC, same format (default: one minute ago).","title":"Date To"},"events":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated event types, for example 'bounce,delivery' (default: all).","title":"Events"},"recipients":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated recipient addresses.","title":"Recipients"},"campaigns":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated campaign ids.","title":"Campaigns"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many events per page (1 to 100, default 50).","title":"Per Page"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Pass 'initial' for the first page, then the cursor from links.next of the previous answer.","title":"Cursor"}},"title":"search_message_eventsArguments","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_subaccounts":{"post":{"operationId":"list_subaccounts","summary":"List subaccounts with name, status, compliance status, IP pool and options. Use for \"What subaccounts exist in my SparkP","description":"List subaccounts with name, status, compliance status, IP pool and options. Use for \"What subaccounts exist in my SparkPost account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["active","suspended","terminated"],"type":"string"},{"type":"null"}],"default":null,"description":"Only subaccounts with this status.","title":"Status"},"name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Subaccounts whose name contains this text.","title":"Name"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many subaccounts per page (1 to 100, default 25).","title":"Per Page"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Pass 'initial' for the first page, then the cursor from links.next.","title":"Cursor"}},"title":"list_subaccountsArguments","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}}}}