> ## Documentation Index
> Fetch the complete documentation index at: https://developers.liara.ir/llms.txt
> Use this file to discover all available pages before exploring further.

# add address endpoint to forwarding mails



## OpenAPI

````yaml /spec/mail.yaml post /api/v1/mails/{mailServerID}/accounts/{accountID}/forwards
openapi: 3.0.1
info:
  title: Liara Mail API Documentaion
  description: |-
    A fully featured mail delivery platform for incoming & outgoing e-mail

    Parameters:
    - `teamID`: To access services in a team
  contact:
    name: liara
    url: https://liara.ir
    email: support@liara.ir
  version: 1.0.0
servers:
  - url: https://mail-service.iran.liara.ir
security:
  - jwt: []
tags:
  - name: mails
    description: Everything about your mails
  - name: inboundrules
    description: Email address (or domain) that you would like to block from sending.
  - name: smtp
    description: SMTP endpoints.
  - name: accounts
    description: Accounts of your mails.
  - name: messages
    description: Messages endpoints.
  - name: forward
    description: Forward endpoints.
  - name: attachments
    description: Attachments endpoints.
  - name: event
    description: Event endpoints.
  - name: tags
    description: Tags endpoints.
  - name: plan
    description: Plan endpoints.
externalDocs:
  description: Find out more about Liara Mail Server
  url: https://docs.liara.ir/email/create-mail-server/
paths:
  /api/v1/mails/{mailServerID}/accounts/{accountID}/forwards:
    post:
      tags:
        - forward
      summary: add address endpoint to forwarding mails
      operationId: createAddressForwarding
      parameters:
        - name: mailServerID
          in: path
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{24}$
            type: string
        - name: accountID
          in: path
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{24}$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model6'
        required: false
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        '400':
          description: Bad Request
          content: {}
        '403':
          description: Reached maximum mail forwarder per account.
          content: {}
        '404':
          description: Mail Server or Mail Account not found
          content: {}
        '409':
          description: Address endpoint already exists
          content: {}
        '500':
          description: Unexpected error
          content: {}
components:
  schemas:
    Model6:
      required:
        - address
      type: object
      properties:
        address:
          type: string
          x-format:
            email: true
  securitySchemes:
    jwt:
      type: apiKey
      description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345".  #'
      name: Authorization
      in: header

````