# POST /domains/{name}/mail/forwarders

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Create a forwarder

- Who may call it: administrator, reseller, customer
- Token scope, any of: mail, all
- Answers: 201 Created

Supply the source email address's local part in local and an array of 1 to 20 destination email addresses in destinations. Duplicate entries count toward the limit and are stored once. Each destination must differ from the forwarder's own email address. If a mailbox exists at that email address, it keeps a copy of each forwarded message.

The API returns 400 if destinations is missing or has the wrong type or length. If a forwarder already exists for the email address, use PATCH /domains/{name}/mail/forwarders/{local} to replace its destinations. The 201 response contains the new forwarder in forwarder.

Administrators, the domain's owner and the owner's reseller can call this operation with a token that has the mail scope.

## As a command

- [urbestack-mail-forwarder-add](https://urbestack.com/docs/commands/urbestack-mail-forwarder-add.md): Adds a forwarder for an email address on an existing domain.

## Parameters

- `name` (path, DomainName, required)

## Request body

JSON, the type [MailForwarderCreate](https://urbestack.com/docs/api/types/MailForwarderCreate.md).

- `destinations` (array of MailAddress, required)
- `local` (LocalPart, required): The part of an email address before the @ is stored in lowercase.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/domains/example.com/mail/forwarders" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "destinations": [
      "text"
    ],
    "local": "info"
  }'
```

Response, 201 Created:

```
{
  "forwarder": {
    "address": "info@example.com",
    "created_at": "2026-09-09T10:15:00Z",
    "destinations": [
      "text"
    ],
    "domain": "example.com",
    "id": 1,
    "local_part": "text"
  }
}
```

## Errors

- 400: --address is required
- 400: <what> must be text without control characters, 1 to <max> characters
- 400: A forwarder needs one to twenty destination addresses
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid domain name
- 400: Invalid mail address
- 400: Invalid mail address: local part over 64 characters
- 400: Invalid mail address: no local part
- 400: Invalid mail address: the local part may hold letters, digits, dots, _ + and -
- 400: Invalid port
- 400: Invalid setting key
- 401: Authentication required
- 404: Setting '<key>' not found
- 409: Forwarder <address> already exists
