{"openapi":"3.1.0","info":{"title":"Postmark (BYOK) API","version":"0.1.0","description":"Postmark (BYOK) lets an AI assistant read your own Postmark data through the Postmark API with a key you supply (server API token). Read-only: 12 tools (get_server, search_outbound_messages, get_outbound_message, search_inbound_messages, list_bounces, get_bounce, get_delivery_stats, get_outbound_stats, get_sent_counts, list_templates, get_template, list_message_streams). The BYOK key travels with...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-postmark.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-postmark/docs"},"termsOfService":"https://connectorbay.com/byok-postmark/terms"},"servers":[{"url":"https://byok-postmark.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-postmark/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/get_server":{"post":{"operationId":"get_server","summary":"Show the Postmark server the token belongs to: name, color, delivery type, tracking settings and webhook URLs (the serve","description":"Show the Postmark server the token belongs to: name, color, delivery type, tracking settings and webhook URLs (the server's API tokens are left out). Use for \"Which Postmark server is my token for and how is tracking set up\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_serverArguments","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_outbound_messages":{"post":{"operationId":"search_outbound_messages","summary":"Search sent messages of the server with recipient, sender, subject, tag, status and time. Newest first. Messages are onl","description":"Search sent messages of the server with recipient, sender, subject, tag, status and time. Newest first. Messages are only kept for the retention period of the server (45 days by default). Use for \"Which emails did we send to jane@example.com this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many records to return (1 to 500); count plus offset must not exceed 10000.","title":"Count"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip (count plus offset must not exceed 10000).","title":"Offset"},"recipient":{"anyOf":[{"maxLength":320,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages sent to this email address.","title":"Recipient"},"fromemail":{"anyOf":[{"maxLength":320,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages sent from this address.","title":"Fromemail"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages with this tag.","title":"Tag"},"subject":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages whose subject matches.","title":"Subject"},"status":{"anyOf":[{"enum":["queued","sent","processed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only messages in this state: queued, sent or processed.","title":"Status"},"fromdate":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only records on or after this time, ISO format such as 2026-10-01T00:00:00 (Eastern Time).","title":"Fromdate"},"todate":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only records on or before this time, ISO format such as 2026-10-16T23:59:59 (Eastern Time).","title":"Todate"},"messagestream":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Message stream ID, for example 'outbound' (default) or 'broadcast'.","title":"Messagestream"}},"title":"search_outbound_messagesArguments","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_outbound_message":{"post":{"operationId":"get_outbound_message","summary":"Get one sent message with its sender, recipients, subject, status and delivery events (delivered, opened, clicked, bounc","description":"Get one sent message with its sender, recipients, subject, status and delivery events (delivered, opened, clicked, bounced). Use for \"What happened to Postmark message 0a1b2c3d-0000-0000-0000-000000000000\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"message_id":{"description":"Message ID from search_outbound_messages.","maxLength":200,"title":"Message Id","type":"string"}},"required":["message_id"],"title":"get_outbound_messageArguments","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_inbound_messages":{"post":{"operationId":"search_inbound_messages","summary":"Search received (inbound) messages of the server; the answer is passed through as the provider returns it. By default on","description":"Search received (inbound) messages of the server; the answer is passed through as the provider returns it. By default only processed messages are returned. Messages are only kept for the retention period of the server (45 days by default). Use for \"Which inbound emails did we receive recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many records to return (1 to 100); count plus offset must not exceed 10000.","title":"Count"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip (count plus offset must not exceed 10000).","title":"Offset"},"recipient":{"anyOf":[{"maxLength":320,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages received at this address.","title":"Recipient"},"fromemail":{"anyOf":[{"maxLength":320,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages from this sender.","title":"Fromemail"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages with this tag.","title":"Tag"},"subject":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages whose subject matches.","title":"Subject"},"mailboxhash":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages with this mailbox hash.","title":"Mailboxhash"},"status":{"anyOf":[{"enum":["blocked","processed","queued","failed","scheduled"],"type":"string"},{"type":"null"}],"default":null,"description":"Only messages in this state (default processed).","title":"Status"},"fromdate":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only records on or after this time, ISO format such as 2026-10-01T00:00:00 (Eastern Time).","title":"Fromdate"},"todate":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only records on or before this time, ISO format such as 2026-10-16T23:59:59 (Eastern Time).","title":"Todate"}},"title":"search_inbound_messagesArguments","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_bounces":{"post":{"operationId":"list_bounces","summary":"List bounces with type, email, reason, time and whether the address is inactive. Use for \"Which emails bounced in the la","description":"List bounces with type, email, reason, time and whether the address is inactive. Use for \"Which emails bounced in the last week and why\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many records to return (1 to 500); count plus offset must not exceed 10000.","title":"Count"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip (count plus offset must not exceed 10000).","title":"Offset"},"type":{"anyOf":[{"enum":["HardBounce","Transient","Unsubscribe","Subscribe","AutoResponder","AddressChange","DnsError","SpamNotification","OpenRelayTest","Unknown","SoftBounce","VirusNotification","ChallengeVerification","BadEmailAddress","SpamComplaint","ManuallyDeactivated","Unconfirmed","Blocked","SMTPApiError","InboundError","DMARCPolicy","TemplateRenderingFailed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this bounce type.","title":"Type"},"inactive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only deactivated addresses, false for only active ones; both when empty.","title":"Inactive"},"email_filter":{"anyOf":[{"maxLength":320,"type":"string"},{"type":"null"}],"default":null,"description":"Only bounces of this email address.","title":"Email Filter"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only bounces of messages with this tag.","title":"Tag"},"message_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only bounces of this message ID.","title":"Message Id"},"fromdate":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only records on or after this time, ISO format such as 2026-10-01T00:00:00 (Eastern Time).","title":"Fromdate"},"todate":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only records on or before this time, ISO format such as 2026-10-16T23:59:59 (Eastern Time).","title":"Todate"},"messagestream":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Message stream ID, for example 'outbound' (default) or 'broadcast'.","title":"Messagestream"}},"title":"list_bouncesArguments","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_bounce":{"post":{"operationId":"get_bounce","summary":"Get one bounce by ID with type, reason, details, email, subject and time. Use for \"Show Postmark bounce 692560173\".","description":"Get one bounce by ID with type, reason, details, email, subject and time. Use for \"Show Postmark bounce 692560173\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bounce_id":{"description":"Bounce ID from list_bounces.","title":"Bounce Id","type":"integer"}},"required":["bounce_id"],"title":"get_bounceArguments","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_stats":{"post":{"operationId":"get_delivery_stats","summary":"Show the count of inactive addresses and the number of bounces per bounce type. Use for \"How many bounces of each type d","description":"Show the count of inactive addresses and the number of bounces per bounce type. Use for \"How many bounces of each type do we have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_delivery_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/get_outbound_stats":{"post":{"operationId":"get_outbound_stats","summary":"Get outbound email totals for a period: sent, bounced, spam complaints and their rates, opens, unique opens, clicks and ","description":"Get outbound email totals for a period: sent, bounced, spam complaints and their rates, opens, unique opens, clicks and tracking counts. Use for \"How many emails did we send and how many were opened this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fromdate":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Start date, YYYY-MM-DD, inclusive (Eastern Time); leave both dates empty for all time.","title":"Fromdate"},"todate":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"End date, YYYY-MM-DD, inclusive (Eastern Time).","title":"Todate"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages with this tag.","title":"Tag"},"messagestream":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only this message stream; all streams when empty.","title":"Messagestream"}},"title":"get_outbound_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/get_sent_counts":{"post":{"operationId":"get_sent_counts","summary":"Get the number of emails sent per day for a period, and the total. Use for \"How many emails did we send per day last wee","description":"Get the number of emails sent per day for a period, and the total. Use for \"How many emails did we send per day last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fromdate":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Start date, YYYY-MM-DD, inclusive (Eastern Time); leave both dates empty for all time.","title":"Fromdate"},"todate":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"End date, YYYY-MM-DD, inclusive (Eastern Time).","title":"Todate"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages with this tag.","title":"Tag"},"messagestream":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only this message stream; all streams when empty.","title":"Messagestream"}},"title":"get_sent_countsArguments","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 the server's email templates (and layouts) with ID, name, alias, type and active flag. Use for \"Which email templat","description":"List the server's email templates (and layouts) with ID, name, alias, type and active flag. Use for \"Which email templates do we have in Postmark\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many templates to return.","title":"Count"},"offset":{"anyOf":[{"maximum":1000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many templates to skip.","title":"Offset"},"template_type":{"anyOf":[{"enum":["All","Standard","Layout"],"type":"string"},{"type":"null"}],"default":null,"description":"Only All (default), Standard or Layout templates.","title":"Template Type"}},"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 by ID or alias with subject, HTML body, text body, type and layout. Use for \"Show the Postmark template","description":"Get one template by ID or alias with subject, HTML body, text body, type and layout. Use for \"Show the Postmark template welcome-email\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"template_id_or_alias":{"description":"Template ID or alias.","maxLength":200,"title":"Template Id Or Alias","type":"string"}},"required":["template_id_or_alias"],"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_message_streams":{"post":{"operationId":"list_message_streams","summary":"List the server's message streams (transactional, broadcast, inbound) with ID, name, type and archive state. Use for \"Wh","description":"List the server's message streams (transactional, broadcast, inbound) with ID, name, type and archive state. Use for \"Which message streams does my Postmark server have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"message_stream_type":{"anyOf":[{"enum":["All","Inbound","Transactional","Broadcasts"],"type":"string"},{"type":"null"}],"default":null,"description":"Only All (default), Inbound, Transactional or Broadcasts streams.","title":"Message Stream Type"},"include_archived_streams":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include archived streams.","title":"Include Archived Streams"}},"title":"list_message_streamsArguments","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}}}}