> ## 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 inbound rule.



## OpenAPI

````yaml /spec/mail.yaml post /api/v1/mails/{mailServerID}/inboundrules
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}/inboundrules:
    post:
      tags:
        - inboundrules
      summary: add inbound rule.
      operationId: addInboundRule
      parameters:
        - name: mailServerID
          in: path
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{24}$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model11'
        required: false
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        '400':
          description: Bad Request
          content: {}
        '404':
          description: Mail Server not found
          content: {}
        '500':
          description: Unexpected error
          content: {}
components:
  schemas:
    Model11:
      required:
        - rule
      type: object
      properties:
        rule:
          type: string
  securitySchemes:
    jwt:
      type: apiKey
      description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345".  #'
      name: Authorization
      in: header

````