Update a forward rule
Partially update a forward rule. Only the fields present in the request are changed:
namerenames the rule.conditions, when present, replaces the whole condition set. An empty array removes every condition, so the rule matches all messages.destinations, when present, replaces the whole destination set.
Omitted fields are left unchanged. The update is applied atomically: if any part is invalid, the rule is left as it was.
API token in Api-Token header
Inbound inbox ID
1Forward rule ID
7All fields are optional. A present conditions or destinations
array replaces the whole set; an omitted one is left unchanged.
Rule name. Must be unique within the inbox.
Copy billing mail to financeForward rule updated
Unauthorized
Forbidden. The token lacks the permission required for this operation
(Access forbidden), has no access to the account
(Account access forbidden), or Email API/SMTP is not enabled for the
organization (empty response body).
Not found
Validation error. Errors on a condition or destination are keyed by
the request field and attribute (for example conditions.operator
or destinations.email); the per-inbox rule limit is reported under
base.
curl -X PATCH https://mailtrap.io/api/inbound/inboxes/{inbox_id}/forward_rules/{id} \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"destinations": [
{ "email": "finance@example.com" },
{ "email": "accounting@example.com" }
]
}'
{
"data": {
"id": 7,
"name": "Copy billing mail to finance",
"created_at": "2026-05-08T10:30:00.000Z",
"updated_at": "2026-05-08T12:15:00.000Z",
"conditions": [
{
"match_type": "sender",
"operator": "ends_with",
"value": "@billing.example.com",
"header_key": null
}
],
"destinations": [
{
"email": "finance@example.com"
},
{
"email": "accounting@example.com"
}
]
}
}Last updated
Was this helpful?

