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

# Add a forwarding rule to a domain

> Creates a forwarding rule.



## OpenAPI

````yaml /openapi.json post /inbound/domains/{uuid}/forward-rules
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /inbound/domains/{uuid}/forward-rules:
    post:
      tags:
        - Inbound
      summary: Add a forwarding rule to a domain
      description: Creates a forwarding rule.
      parameters:
        - name: uuid
          in: path
          required: true
          description: UUID of the domain
          schema:
            type: string
            format: uuid
            pattern: >-
              ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - localpart
                - destination
              properties:
                localpart:
                  type: string
                  description: >-
                    Address prefix to match. Use the literal "*" for catch-all.
                    Otherwise must be a valid RFC 5321 local-part (max 64
                    chars). Stored lowercased; plus-addressing is handled at
                    match time, so a rule for "support" also matches
                    "support+anything".
                  example: support
                destination:
                  type: string
                  format: email
                  description: >-
                    Bare email address (local@domain). No display names, no
                    quoted local-parts.
                  example: team@theirinbox.com
                active:
                  type: boolean
                  default: true
                  description: >-
                    Inactive rules are stored but ignored at RCPT TO. Use this
                    for soft-disable rather than DELETE if you plan to
                    re-enable.
            examples:
              Targeted alias:
                value:
                  localpart: support
                  destination: team@theirinbox.com
              Catch-all:
                value:
                  localpart: '*'
                  destination: inbox@theirinbox.com
      responses:
        '201':
          description: Rule created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  result:
                    type: object
                    properties:
                      uuid:
                        type: string
                        format: uuid
                      localpart:
                        type: string
                      destination:
                        type: string
                        format: email
                      active:
                        type: integer
                        enum:
                          - 0
                          - 1
                      verified:
                        type: integer
                        enum:
                          - 0
                          - 1
                        description: >-
                          Set to 1 once the destination address owner has
                          clicked the verification link sent on rule create.
                          Until 1, inbound-edge will not deliver mail to this
                          rule (the matching index filters verified = 1).
                      last_modified:
                        type: integer
                      created_at:
                        type: integer
        '400':
          description: Invalid input or domain is not delivery_type=forward
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: destination must be a bare email address (local@domain)
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: User information not found
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Domain not found
        '409':
          description: >-
            A rule with this (localpart, destination) already exists for this
            domain
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      A forwarding rule with this localpart and destination
                      already exists
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to create forwarding rule
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````