{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Executes multiple allow policy operations atomically: delete, partially update,\nreplace, and create allow policies in a single request. All four operation arrays\n(deletes, patches, puts, posts) are required and executed in order.\nSend empty arrays for unused operations.\n","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/email-security_identifier","description":"Account identifier tag."}},"required":["account_id"],"additionalProperties":false},"body":{"type":"object","properties":{"deletes":{"description":"IDs of the allow policies to delete.","type":"array","items":{"properties":{"id":{"$ref":"#/definitions/email-security_AllowPolicyId"}},"required":["id"],"type":"object"},"maxItems":1000},"patches":{"description":"Partial updates to apply — each entry carries the policy's ID and only the fields to change.","type":"array","items":{"allOf":[{"$ref":"#/definitions/email-security_UpdateAllowPolicy"},{"properties":{"id":{"allOf":[{"$ref":"#/definitions/email-security_AllowPolicyId"}]}},"required":["id"],"type":"object"}]},"maxItems":1000},"posts":{"description":"Allow policies to create.","type":"array","items":{"$ref":"#/definitions/email-security_CreateAllowPolicy"},"maxItems":1000},"puts":{"description":"Full replacements to apply — each entry carries the policy's ID and every field of its new value.","type":"array","items":{"allOf":[{"$ref":"#/definitions/email-security_CreateAllowPolicy"},{"properties":{"id":{"allOf":[{"$ref":"#/definitions/email-security_AllowPolicyId"}]}},"required":["id"],"type":"object"}]},"maxItems":1000}},"required":["deletes","patches","puts","posts"]}},"required":["path","body"],"additionalProperties":false,"definitions":{"email-security_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"email-security_AllowPolicyId":{"description":"Allow policy identifier.","type":"string","format":"uuid","examples":["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"]},"email-security_UpdateAllowPolicy":{"description":"Update an allow policy.","allOf":[{"$ref":"#/definitions/email-security_AllowPolicy"}],"minProperties":1},"email-security_CreateAllowPolicy":{"description":"Create an allow policy.","allOf":[{"$ref":"#/definitions/email-security_AllowPolicy"}],"required":["is_exempt_recipient","is_trusted_sender","is_acceptable_sender","pattern","is_regex","verify_sender","pattern_type"]},"email-security_AllowPolicy":{"description":"An email allow policy.","type":"object","properties":{"comments":{"type":["string","null"],"maxLength":1024,"examples":["Trust all messages send from test@example.com"]},"expires_at":{"description":"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration.","type":["string","null"],"format":"date-time","examples":["2027-01-01T00:00:00Z"]},"is_acceptable_sender":{"description":"Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.","type":"boolean","examples":[false]},"is_exempt_recipient":{"description":"Bypasses all detections for messages to this recipient.","type":"boolean","examples":[false]},"is_recipient":{"description":"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026.","type":"boolean","examples":[false]},"is_regex":{"type":"boolean","examples":[false]},"is_sender":{"description":"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026.","type":"boolean","examples":[true]},"is_spoof":{"description":"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026.","type":"boolean","examples":[false]},"is_trusted_sender":{"description":"Bypasses all detections and link following for messages from this sender.","type":"boolean","examples":[true]},"pattern":{"description":"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. The API also rejects a pattern that equals a domain onboarded to the account, ignoring case.","type":"string","maxLength":1024,"minLength":1,"examples":["test@example.com"]},"pattern_type":{"$ref":"#/definitions/email-security_PatternType"},"verify_sender":{"description":"Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.","type":"boolean","examples":[true]}},"required":[]},"email-security_PatternType":{"description":"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n","type":"string","enum":["EMAIL","DOMAIN","IP","UNKNOWN"],"examples":["EMAIL"]}}},"name":"Batch allow policy operations","id":"cloudflare.email_security_batch_allow_policies","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{"deletes":[],"patches":[],"puts":[],"posts":[]}},"maxRequests":1,"summary":false}}