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

# Update a forwarding rule

> Updates a forwarding rule.



## OpenAPI

````yaml /openapi.json patch /inbound/domains/{uuid}/forward-rules/{ruleUuid}
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/{ruleUuid}:
    patch:
      tags:
        - Inbound
      summary: Update a forwarding rule
      description: Updates 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}$
        - name: ruleUuid
          in: path
          required: true
          description: UUID of the forwarding rule
          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
              properties:
                destination:
                  type: string
                  format: email
                  description: New destination email. Validated as a bare local@domain.
                active:
                  type: boolean
                  description: Toggle the rule on/off without deleting it.
            examples:
              Re-target destination:
                value:
                  destination: newteam@theirinbox.com
              Pause the rule:
                value:
                  active: false
      responses:
        '200':
          description: Rule updated
          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 attempt to change immutable localpart
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      localpart cannot be changed; delete the rule and create a
                      new one to rename it
        '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: Rule or domain not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Forwarding rule not found
        '409':
          description: Update would collide with another rule on (localpart, destination)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      Another forwarding rule already exists with this localpart
                      and destination
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to update forwarding rule
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````