{"openapi":"3.1.0","info":{"title":"Cloudflare Email Routing (BYOK) API","version":"0.1.0","description":"Cloudflare Email Routing (BYOK) lets an AI assistant read your own Cloudflare Email Routing data through the Cloudflare Email Routing API with a key you supply (Cloudflare API token with Email Routing read permission). Read-only: 8 tools (get_settings, get_dns_records, list_zone_rules, get_rule, get_catch_all_rule, list_account_rules, list_destination_addresses, get_destination_address). The BYOK...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-cloudflare-email-routing.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-cloudflare-email-routing/docs"},"termsOfService":"https://connectorbay.com/byok-cloudflare-email-routing/terms"},"servers":[{"url":"https://byok-cloudflare-email-routing.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-cloudflare-email-routing/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_settings":{"post":{"operationId":"get_settings","summary":"Get the Email Routing settings of a zone: enabled flag, status (ready, misconfigured and so on), subaddress support and ","description":"Get the Email Routing settings of a zone: enabled flag, status (ready, misconfigured and so on), subaddress support and dates. Use for \"Is Cloudflare Email Routing enabled for my domain\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"get_settingsArguments","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_dns_records":{"post":{"operationId":"get_dns_records","summary":"List the DNS records (MX, SPF and others) that Email Routing needs for a zone or a subdomain of it. Use for \"Which DNS r","description":"List the DNS records (MX, SPF and others) that Email Routing needs for a zone or a subdomain of it. Use for \"Which DNS records does Email Routing require for my domain\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"subdomain":{"anyOf":[{"maxLength":63,"type":"string"},{"type":"null"}],"default":null,"description":"Subdomain to get records for, for example 'mail'.","title":"Subdomain"}},"required":["zone_id"],"title":"get_dns_recordsArguments","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_zone_rules":{"post":{"operationId":"list_zone_rules","summary":"List the routing rules of a zone with name, priority, enabled flag, matchers (address patterns) and actions (forward, dr","description":"List the routing rules of a zone with name, priority, enabled flag, matchers (address patterns) and actions (forward, drop, worker). Use for \"Which addresses does my domain forward and where to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for enabled rules only, false for disabled rules only.","title":"Enabled"},"per_page":{"anyOf":[{"maximum":50,"minimum":5,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results per page (5 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; result_info.total_count says how many exist.","title":"Page"}},"required":["zone_id"],"title":"list_zone_rulesArguments","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_rule":{"post":{"operationId":"get_rule","summary":"Get one Email Routing rule with matchers and actions. Use for \"Where does rule a7e6fb77 send mail\".","description":"Get one Email Routing rule with matchers and actions. Use for \"Where does rule a7e6fb77 send mail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"rule_identifier":{"description":"Email Routing rule id, as returned by list_zone_rules.","maxLength":40,"title":"Rule Identifier","type":"string"}},"required":["zone_id","rule_identifier"],"title":"get_ruleArguments","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_catch_all_rule":{"post":{"operationId":"get_catch_all_rule","summary":"Get the catch-all rule of a zone: what happens to mail sent to addresses without a specific rule. Use for \"What happens ","description":"Get the catch-all rule of a zone: what happens to mail sent to addresses without a specific rule. Use for \"What happens to mail sent to unknown addresses on my domain\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"get_catch_all_ruleArguments","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_account_rules":{"post":{"operationId":"list_account_rules","summary":"List Email Routing rules across the account with their zone names, matchers and actions. Use for \"Which Email Routing ru","description":"List Email Routing rules across the account with their zone names, matchers and actions. Use for \"Which Email Routing rules exist across all my domains\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL, or from the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for enabled rules only, false for disabled rules only.","title":"Enabled"},"per_page":{"anyOf":[{"maximum":50,"minimum":5,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results per page (5 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; result_info.total_count says how many exist.","title":"Page"}},"required":["account_id"],"title":"list_account_rulesArguments","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_destination_addresses":{"post":{"operationId":"list_destination_addresses","summary":"List the destination addresses that Email Routing can forward to, with verification time. Use for \"Which forwarding dest","description":"List the destination addresses that Email Routing can forward to, with verification time. Use for \"Which forwarding destinations are verified in Email Routing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL, or from the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for verified addresses only, false for unverified ones.","title":"Verified"},"per_page":{"anyOf":[{"maximum":50,"minimum":5,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results per page (5 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; result_info.total_count says how many exist.","title":"Page"}},"required":["account_id"],"title":"list_destination_addressesArguments","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_destination_address":{"post":{"operationId":"get_destination_address","summary":"Get one destination address with its verification time. Use for \"Is destination address ea95132c verified\".","description":"Get one destination address with its verification time. Use for \"Is destination address ea95132c verified\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL, or from the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"destination_address_identifier":{"description":"Destination address id, as returned by list_destination_addresses.","maxLength":40,"title":"Destination Address Identifier","type":"string"}},"required":["account_id","destination_address_identifier"],"title":"get_destination_addressArguments","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}}}}