# Update email forwarding

`PUT /v1/domain/@id/emforwarding` · scope `domains:write`

Set the domain's email forwarding rules.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/domain/@id/emforwarding` |
| Method | `PUT` |
| Scope | `domains:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Domain ID |
| `from` | body | string | no | Email address that you want to forward |
| `to` | body | string | no | Email address that will receive forwarded emails |
| `records` | body | array | no | Multiple forwarding rules [{"from":"info","to":"dest@example.com"},{"from":"support","to":"help@example.com"}] |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/domain/200001/emforwarding" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "from": "info@example.com",
  "to": "destination@example.com",
  "records": "<records>"
}'
```

`$TINO_TOKEN` is a token with the scope `domains:write`. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): Python `client.domains.update_email_forwarding(id, id=...)`, Node.js `await client.domains.updateEmailForwarding(id, { id: ... });`, PHP `$client->domains->updateEmailForwarding($id, ['id' => ...]);`.

## Example response

```json
{
 "success": true,
 "info": [
  "success_changes_save"
 ]
}
```

Live sample from a test account with personal data masked; long arrays and strings are trimmed (`… N more item(s)`, `… N more line(s)`).
