## Create a blocked email sender **post** `/accounts/{account_id}/email-security/settings/block_senders` Adds a sender pattern to the email block list, preventing messages from matching senders from being delivered. ### Path Parameters - `account_id: string` Account Identifier ### Body Parameters - `is_regex: boolean` - `pattern: string` - `pattern_type: "EMAIL" or "DOMAIN" or "IP" or "UNKNOWN"` - `"EMAIL"` - `"DOMAIN"` - `"IP"` - `"UNKNOWN"` - `comments: optional string` ### Returns - `errors: array of ResponseInfo` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of ResponseInfo` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `result: { id, created_at, is_regex, 4 more }` - `id: number` The unique identifier for the allow policy. - `created_at: string` - `is_regex: boolean` - `last_modified: string` - `pattern: string` - `pattern_type: "EMAIL" or "DOMAIN" or "IP" or "UNKNOWN"` - `"EMAIL"` - `"DOMAIN"` - `"IP"` - `"UNKNOWN"` - `comments: optional string` - `success: boolean` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email-security/settings/block_senders \ -H 'Content-Type: application/json' \ -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \ -H "X-Auth-Key: $CLOUDFLARE_API_KEY" \ -d '{ "is_regex": false, "pattern": "test@example.com", "pattern_type": "EMAIL" }' ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "id": 2402, "created_at": "2019-12-27T18:11:19.117Z", "is_regex": true, "last_modified": "2019-12-27T18:11:19.117Z", "pattern": "x", "pattern_type": "EMAIL", "comments": "comments" }, "success": true } ```