# Creates a new email deny rule. **POST /mail/{id}/rules** Adds a new email deny rule into the system to block new emails that match the given criteria The deny rules allow you to setup assorted types of rules which will automatically deny the email from being sent through our system when the citeria match. ## Servers - Live API Endpoint: https://my.interserver.net/apiv2 (Live API Endpoint) ## Authentication methods - Api key auth - Session id header auth - Session id cookie auth ## Parameters ### Path parameters - **id** (integer) Mail ID number ### Body: application/json (object) These are the fields needed to create a new email deny rule. - **user** (string) Mail account username that will be tied to this rule. If not specified the first active mail order will be used. - **type** (string) The type of deny rule. - **data** (string) The content of the rule. If a domain type rule then an example would be google.com. For a begins with type an example would be msgid-. For the email typer an example would be user@server.com. ## Responses ### 200 search results matching criteria #### Body: application/json (object) - **status** (string) - **text** (string) ### 400 The specified resource was not found #### Body: application/json (object) - **code** (string) - **message** (string) ### 401 Unauthorized #### Body: application/json (object) - **code** (string) - **message** (string) ### 404 The specified resource was not found #### Body: application/json (object) - **code** (string) - **message** (string) [Powered by Bump.sh](https://bump.sh)