{"openapi":"3.1.0","info":{"title":"Mailtrap (BYOK) API","version":"0.1.0","description":"Mailtrap (BYOK) lets an AI assistant read your own Mailtrap data through the Mailtrap API with a key you supply (API token). Read-only: 6 tools (list_accounts, list_sending_domains, list_email_logs, get_sending_stats, list_email_templates, list_contact_lists). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-mailtrap.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-mailtrap/docs"},"termsOfService":"https://connectorbay.com/byok-mailtrap/terms"},"servers":[{"url":"https://byok-mailtrap.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-mailtrap/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_accounts":{"post":{"operationId":"list_accounts","summary":"List the Mailtrap accounts the token can access with the token's access level on each (1000 owner, 100 admin, 10 viewer)","description":"List the Mailtrap accounts the token can access with the token's access level on each (1000 owner, 100 admin, 10 viewer). Use for \"Which Mailtrap accounts does my token have access to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_accountsArguments","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 compliance status, DNS verification, tracking flags and inbound settings. Use for \"Are my Mail","description":"List sending domains with compliance status, DNS verification, tracking flags and inbound settings. Use for \"Are my Mailtrap sending domains verified and compliant\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"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/list_email_logs":{"post":{"operationId":"list_email_logs","summary":"List sent email log entries (newest first) with status, sender, recipient, subject, send time, opens and clicks. Cursor ","description":"List sent email log entries (newest first) with status, sender, recipient, subject, send time, opens and clicks. Cursor pagination; optional send-time window. Use for \"Which emails did Mailtrap send yesterday and did they get delivered\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: pass next_page_cursor from the previous answer to get the next page.","title":"Search After"},"sent_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails sent at or after this ISO 8601 time, for example 2026-10-01T00:00:00Z.","title":"Sent After"},"sent_before":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only emails sent at or before this ISO 8601 time.","title":"Sent Before"}},"title":"list_email_logsArguments","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_sending_stats":{"post":{"operationId":"get_sending_stats","summary":"Get aggregate sending statistics for a date range: delivery, bounce, open, click and spam counts and rates, across all d","description":"Get aggregate sending statistics for a date range: delivery, bounce, open, click and spam counts and rates, across all domains. Use for \"What were my Mailtrap delivery and bounce rates last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"description":"First day of the range, YYYY-MM-DD.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"Last day of the range, YYYY-MM-DD.","maxLength":200,"title":"End Date","type":"string"}},"required":["start_date","end_date"],"title":"get_sending_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/list_email_templates":{"post":{"operationId":"list_email_templates","summary":"List email templates with name, category, subject and timestamps (bodies are not returned). Use for \"What email template","description":"List email templates with name, category, subject and timestamps (bodies are not returned). Use for \"What email templates do I have in Mailtrap\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_email_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_contact_lists":{"post":{"operationId":"list_contact_lists","summary":"List marketing contact lists (ID and name), optionally filtered by a case-insensitive name prefix. Use for \"What contact","description":"List marketing contact lists (ID and name), optionally filtered by a case-insensitive name prefix. Use for \"What contact lists exist in Mailtrap\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Name prefix to filter by (case-insensitive).","title":"Search"}},"title":"list_contact_listsArguments","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}}}}