---
title: "add address endpoint to forwarding mails"
method: POST
path: "/api/v1/mails/{mailServerID}/accounts/{accountID}/forwards"
tags: ["forward"]
---

# add address endpoint to forwarding mails

`POST /api/v1/mails/{mailServerID}/accounts/{accountID}/forwards`

## Request

- Base URL: `https://mail-service.liara.ir`
- URL: `https://mail-service.liara.ir/api/v1/mails/{mailServerID}/accounts/{accountID}/forwards`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

## Path parameters

- `mailServerID` string, required
- `accountID` string, required

## Request body

- CreateForwardRequest
  - `address` string, email, required

## Response `201`

OK

- object
  - `status` string

## Other responses

- `400`: Bad Request
- `403`: Reached maximum mail forwarder per account.
- `404`: Mail Server or Mail Account not found
- `409`: Address endpoint already exists
- `500`: Unexpected error

## Changes

- **2026-11-02** `5b7a2adff6c9`: 1 breaking
  - the `address` request property format changed from no format to `email`
- **2023-10-06** `6ba885651c6f`: 1 breaking, 2 info
  - removed the media type `*/*` from the request body
  - added the media type `application/json` to the request body
  - added the media type `application/json` for the response with the status `201`
- **2023-10-04** `c63802bd8a38`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/changes/api/v1/mails/:mailServerID/accounts/:accountID/forwards/post.md)

---

[API](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion.md) - [All operations](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/revisions/0c95627fb0e1?raw)
