{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Executes multiple content policy operations atomically: delete, partially update,\nreplace, and create content 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 content policies to delete.","type":"array","items":{"properties":{"id":{"$ref":"#/definitions/email-security_ContentPolicyId"}},"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_UpdateContentPolicy"},{"properties":{"id":{"allOf":[{"$ref":"#/definitions/email-security_ContentPolicyId"}]}},"required":["id"],"type":"object"}]},"maxItems":1000},"posts":{"description":"Content policies to create.","type":"array","items":{"$ref":"#/definitions/email-security_CreateContentPolicy"},"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_CreateContentPolicy"},{"properties":{"id":{"allOf":[{"$ref":"#/definitions/email-security_ContentPolicyId"}]}},"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_ContentPolicyId":{"description":"Content policy identifier.","type":"string","format":"uuid","examples":["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"]},"email-security_UpdateContentPolicy":{"description":"Update a content policy.","allOf":[{"$ref":"#/definitions/email-security_ContentPolicy"}],"minProperties":1},"email-security_CreateContentPolicy":{"description":"Create a content policy.","allOf":[{"$ref":"#/definitions/email-security_ContentPolicy"}],"required":["name","pattern","targets","enabled"]},"email-security_ContentPolicy":{"description":"A content policy pattern that matches against the subject or body of an email.","type":"object","properties":{"enabled":{"description":"Whether the policy is active.","type":"boolean","examples":[true]},"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"]},"name":{"description":"Human-readable name of the policy.","type":"string","maxLength":256,"minLength":1,"examples":["Block phishing keywords"]},"notes":{"description":"Optional note describing the purpose of the policy.","type":["string","null"],"maxLength":4096,"examples":["Blocks common phishing subject lines"]},"pattern":{"description":"Regular expression the policy matches against.","type":"string","maxLength":2048,"minLength":1,"examples":["urgent.*verify.*account"]},"targets":{"description":"Parts of the email the pattern is matched against.","type":"array","items":{"$ref":"#/definitions/email-security_ContentPolicyTarget"},"minItems":1,"examples":[["SUBJECT"]]}}},"email-security_ContentPolicyTarget":{"description":"The part of the email to match the pattern against.","type":"string","enum":["SUBJECT","BODY"],"examples":["SUBJECT"]}}},"name":"Batch content policy operations","id":"cloudflare.email_security_batch_content_policies","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{"deletes":[],"patches":[],"puts":[],"posts":[]}},"maxRequests":1,"summary":false}}