{"openapi":"3.1.0","info":{"title":"PostStack (BYOK) API","version":"0.1.0","description":"PostStack (BYOK) lets an AI assistant read your own PostStack data through the PostStack API with a key you supply (PostStack API key (sk_live_ or sk_test_; a full_access key is needed to read more than email history)). Read-only: 12 tools (list_emails, get_email, list_email_events, list_domains, get_domain_dmarc_stats, check_sender_deliverability, list_broadcasts, rank_broadcasts,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-poststack.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-poststack/docs"},"termsOfService":"https://connectorbay.com/byok-poststack/terms"},"servers":[{"url":"https://byok-poststack.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-poststack/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_emails":{"post":{"operationId":"list_emails","summary":"List emails sent through the account, newest first, with sender, recipients, subject, status (queued, sending, deferred,","description":"List emails sent through the account, newest first, with sender, recipients, subject, status (queued, sending, deferred, delivered, bounced, complained, failed), spam score and times. Bodies are not included. Use for \"Which emails bounced this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["queued","sending","deferred","delivered","bounced","complained","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only emails with this status.","title":"Status"},"to":{"anyOf":[{"maxLength":320,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails sent to this recipient address.","title":"To"},"subject":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails whose subject matches this text.","title":"Subject"},"date_from":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails from this ISO 8601 date or time on, for example 2026-10-01.","title":"Date From"},"date_to":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails up to this ISO 8601 date or time.","title":"Date To"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return per page.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_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_email":{"post":{"operationId":"get_email","summary":"Get one email by its public id (em_...) with status, recipients, subject, spam score and its event timeline (delivered, ","description":"Get one email by its public id (em_...) with status, recipients, subject, spam score and its event timeline (delivered, opened, clicked, bounced). Body text and attachments are left out. Use for \"What happened to email em_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"email_id":{"description":"Email public id (starts with em_), from list_emails.","maxLength":64,"title":"Email Id","type":"string"}},"required":["email_id"],"title":"get_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/list_email_events":{"post":{"operationId":"list_email_events","summary":"List the delivery events of one email in order: queued, sent, delivered, deferred, bounced, opened, clicked, complained,","description":"List the delivery events of one email in order: queued, sent, delivered, deferred, bounced, opened, clicked, complained, with country and client where known. Use for \"Was email em_abc123 opened or clicked\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"email_id":{"description":"Email public id (starts with em_), from list_emails.","maxLength":64,"title":"Email Id","type":"string"}},"required":["email_id"],"title":"list_email_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_domains":{"post":{"operationId":"list_domains","summary":"List the sending domains of the account (not paginated) with region, verification status, TLS mode, tracking and inbound","description":"List the sending domains of the account (not paginated) with region, verification status, TLS mode, tracking and inbound settings and DNS records. Use for \"Which of my sending domains are verified\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_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/get_domain_dmarc_stats":{"post":{"operationId":"get_domain_dmarc_stats","summary":"Get DMARC pass-rate totals (messages, passed, SPF passed, DKIM passed) and a daily series for one domain over a look-bac","description":"Get DMARC pass-rate totals (messages, passed, SPF passed, DKIM passed) and a daily series for one domain over a look-back window. Use for \"What is the DMARC pass rate of example.com over the last 30 days\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"domain_id":{"description":"Domain public id (starts with dom_) or numeric id, from list_domains.","maxLength":64,"title":"Domain Id","type":"string"},"days":{"anyOf":[{"maximum":90,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Look-back window in days (whole number 1 to 90).","title":"Days"}},"required":["domain_id"],"title":"get_domain_dmarc_statsArguments","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/check_sender_deliverability":{"post":{"operationId":"check_sender_deliverability","summary":"Check a from-address before sending: whether its domain is verified, DKIM, SPF, DMARC and return path are set up, 30-day","description":"Check a from-address before sending: whether its domain is verified, DKIM, SPF, DMARC and return path are set up, 30-day bounce and complaint rates and warnings. Use for \"Is hello@example.com ready to send from\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_address":{"description":"From-address to check, either an address or 'Name <address>'.","maxLength":320,"title":"From Address","type":"string"}},"required":["from_address"],"title":"check_sender_deliverabilityArguments","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_broadcasts":{"post":{"operationId":"list_broadcasts","summary":"List broadcast campaigns with name, subject, status (draft, queued, sending, sent, cancelled), segment, schedule and del","description":"List broadcast campaigns with name, subject, status (draft, queued, sending, sent, cancelled), segment, schedule and delivered, opened, clicked and bounced counts. Bodies are not included. Use for \"Which newsletters did I send and how did they do\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["draft","queued","sending","sent","cancelled"],"type":"string"},{"type":"null"}],"default":null,"description":"Only broadcasts with this status.","title":"Status"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only broadcasts whose name or subject contains this text.","title":"Search"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return per page.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_broadcastsArguments","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/rank_broadcasts":{"post":{"operationId":"rank_broadcasts","summary":"Rank sent broadcasts by open rate, click rate or delivered count, optionally since a date, with recipients, delivered, o","description":"Rank sent broadcasts by open rate, click rate or delivered count, optionally since a date, with recipients, delivered, opened, clicked and bounced numbers. Use for \"Which of my newsletters had the best open rate\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"metric":{"anyOf":[{"enum":["open_rate","click_rate","delivered"],"type":"string"},{"type":"null"}],"default":"open_rate","description":"Ranking metric: open_rate, click_rate or delivered.","title":"Metric"},"since":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only broadcasts sent since this ISO 8601 date or time.","title":"Since"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many broadcasts to return (1 to 100).","title":"Limit"}},"title":"rank_broadcastsArguments","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_broadcast_performance":{"post":{"operationId":"get_broadcast_performance","summary":"Get the headline metrics of one broadcast: recipients, delivered, opened, clicked, bounced, open and click rates and how","description":"Get the headline metrics of one broadcast: recipients, delivered, opened, clicked, bounced, open and click rates and how many are still in progress. Use for \"How did broadcast bc_abc123 perform\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"broadcast_id":{"description":"Broadcast public id, from list_broadcasts.","maxLength":64,"title":"Broadcast Id","type":"string"}},"required":["broadcast_id"],"title":"get_broadcast_performanceArguments","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_templates":{"post":{"operationId":"list_templates","summary":"List email templates with name, subject, variables, published flag, version and builder type, plus counts of published a","description":"List email templates with name, subject, variables, published flag, version and builder type, plus counts of published and draft templates. Bodies are not included. Use for \"Which email templates do I have published\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"published":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"Filter by published state: true or false.","title":"Published"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only templates whose name contains this text.","title":"Search"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return per page.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"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/list_segments":{"post":{"operationId":"list_segments","summary":"List contact segments (not paginated) with name, filter rules and how many contacts each holds. Use for \"How big are my ","description":"List contact segments (not paginated) with name, filter rules and how many contacts each holds. Use for \"How big are my audience segments\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_segmentsArguments","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_suppression_stats":{"post":{"operationId":"get_suppression_stats","summary":"Count suppressed addresses by reason: hard bounce, complaint, manual, unsubscribe, repeated soft bounce, and in total. U","description":"Count suppressed addresses by reason: hard bounce, complaint, manual, unsubscribe, repeated soft bounce, and in total. Use for \"How many addresses are suppressed and why\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_suppression_statsArguments","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}}}}