Create an inbound email rule.
POST/api/v1/email-rulesemail_rules:write
The condition and config are checked as the Portal checks them, and the rule runs as its creator unless the config names another user.
| Scope | email_rules:write |
| Asynchronous | No |
| MCP tool | create_email_rule |
| Portal permissions | create_inbound_email_rules |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
| Content type | Type |
|---|---|
application/json | EmailRuleCreateInput |
Responses
| Status | Description | Body |
|---|---|---|
201 | Success. | application/json EmailRule or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
EmailRule
| Field | Type | Required | Description |
|---|---|---|---|
config | object | Required | What the rule does with a matching email: format email_rule_config. |
created_by | UserRef or null | Required | |
created_date | string or null | Required | |
email_rule_id | string | Required | |
is_enabled | boolean | Required | |
parse_order | integer or null | Required | |
parsing_rule | object | Required | The condition an email must meet: format email_rule_condition. |
rule_name | string | Required | |
stop_processing | boolean | Required | Whether a match ends the rules tried after this one. |
EmailRuleCreateInput
| Field | Type | Required | Description |
|---|---|---|---|
config | object | Required | |
is_enabled | boolean or null | Optional | true when absent. |
parse_order | integer or null | Optional | Last when absent; move rules with the reorder route. |
parsing_rule | object | Required | |
rule_name | string | Required | |
stop_processing | boolean or null | Optional | true when absent. |
UserRef
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Required | |
kind | string: user, system, integration or string | Required | |
user_id | string or null | Required |