{"openapi":"3.1.0","info":{"title":"Cloudflare Email Security (BYOK) API","version":"0.1.0","description":"Cloudflare Email Security (BYOK) lets an AI assistant read your own Cloudflare Email Security data through the Cloudflare Email Security API with a key you supply (Cloudflare API token with Email Security read permission). Read-only: 7 tools (list_protected_domains, list_content_policies, list_trusted_domains, list_blocked_senders, list_sending_domain_restrictions, list_url_ignore_patterns,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-cloudflare-email-security.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-cloudflare-email-security/docs"},"termsOfService":"https://connectorbay.com/byok-cloudflare-email-security/terms"},"servers":[{"url":"https://byok-cloudflare-email-security.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-cloudflare-email-security/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_protected_domains":{"post":{"operationId":"list_protected_domains","summary":"List the email domains protected by Email Security with delivery modes, status, SPF and DMARC status, inbox provider and","description":"List the email domains protected by Email Security with delivery modes, status, SPF and DMARC status, inbox provider and processed email counts. Needs the Cloudflare Email Security product. Use for \"Which of my email domains does Cloudflare Email Security protect and is DMARC good\".","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"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only records matching this search text.","title":"Search"},"order":{"anyOf":[{"enum":["domain","created_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"status":{"anyOf":[{"enum":["PENDING","ACTIVE","FAILED","TIMEOUT"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains with this status.","title":"Status"},"allowed_delivery_mode":{"anyOf":[{"enum":["DIRECT","BCC","JOURNAL","API","RETRO_SCAN"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains that allow this delivery mode.","title":"Allowed Delivery Mode"},"active_delivery_mode":{"anyOf":[{"enum":["DIRECT","BCC","JOURNAL","API","RETRO_SCAN"],"type":"string"},{"type":"null"}],"default":null,"description":"Only domains currently using this delivery mode.","title":"Active Delivery Mode"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records per page (1 to 1000).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_protected_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_content_policies":{"post":{"operationId":"list_content_policies","summary":"List the content policies (pattern-based rules with targets) with name, enabled flag, expiry and notes. Needs the Cloudf","description":"List the content policies (pattern-based rules with targets) with name, enabled flag, expiry and notes. Needs the Cloudflare Email Security product. Use for \"Which content policies are active in Cloudflare Email Security\".","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"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only records matching this search text.","title":"Search"},"order":{"anyOf":[{"enum":["name","created_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True or false: only enabled or disabled policies.","title":"Enabled"},"expired":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only expired policies, false for only unexpired ones.","title":"Expired"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records per page (1 to 1000).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_content_policiesArguments","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_trusted_domains":{"post":{"operationId":"list_trusted_domains","summary":"List trusted email domains with whether each is a recently registered domain exception or a similarity (proximity) excep","description":"List trusted email domains with whether each is a recently registered domain exception or a similarity (proximity) exception. Needs the Cloudflare Email Security product. Use for \"Which email domains are trusted in Cloudflare Email Security\".","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"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only records matching this search text.","title":"Search"},"order":{"anyOf":[{"enum":["pattern","created_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"is_recent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to show only recently registered trusted domains.","title":"Is Recent"},"is_similarity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to show only proximity (look-alike) trusted domains.","title":"Is Similarity"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records per page (1 to 1000).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_trusted_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_blocked_senders":{"post":{"operationId":"list_blocked_senders","summary":"List blocked sender patterns (email, domain or IP) with regex flag and expiry. Patterns are whatever your admins entered","description":"List blocked sender patterns (email, domain or IP) with regex flag and expiry. Patterns are whatever your admins entered; comments are left out. Needs the Cloudflare Email Security product. Use for \"Which senders are blocked in Cloudflare Email Security\".","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"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only records matching this search text.","title":"Search"},"order":{"anyOf":[{"enum":["pattern","created_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"expired":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only expired patterns, false for only unexpired ones.","title":"Expired"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records per page (1 to 1000).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_blocked_sendersArguments","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_domain_restrictions":{"post":{"operationId":"list_sending_domain_restrictions","summary":"List sending domain restrictions (domains allowed to send with exclusions). Needs the Cloudflare Email Security product.","description":"List sending domain restrictions (domains allowed to send with exclusions). Needs the Cloudflare Email Security product. Use for \"Which sending domain restrictions does Cloudflare Email Security have\".","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"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only records matching this search text.","title":"Search"},"order":{"anyOf":[{"enum":["domain","created_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records per page (1 to 1000).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_sending_domain_restrictionsArguments","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_url_ignore_patterns":{"post":{"operationId":"list_url_ignore_patterns","summary":"List URL patterns that Email Security does not rewrite or scan. Needs the Cloudflare Email Security product. Use for \"Wh","description":"List URL patterns that Email Security does not rewrite or scan. Needs the Cloudflare Email Security product. Use for \"Which URLs does Cloudflare Email Security ignore\".","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"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records per page (1 to 1000).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_url_ignore_patternsArguments","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_monthly_report":{"post":{"operationId":"get_monthly_report","summary":"Get the Email Security monthly report: counts by month. The shape of the by_month object is returned as the API sends it","description":"Get the Email Security monthly report: counts by month. The shape of the by_month object is returned as the API sends it. Needs the Cloudflare Email Security product. Use for \"Show my Cloudflare Email Security monthly report\".","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"}},"required":["account_id"],"title":"get_monthly_reportArguments","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}}}}