> ## 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 inbound domain settings

> Updates the configuration of an inbound domain. Mode-specific fields are strictly enforced: smtp_servers is only allowed when the effective delivery_type is smtp, the webhook_* fields are only allowed when it is webhook, and forward accepts neither. The "effective" type is the new delivery_type if you are changing it in this request, otherwise the current one. Sending fields from the wrong mode returns 400. The forward_*_verified DNS flags are read-only and cannot be set via this endpoint.



## OpenAPI

````yaml /openapi.json patch /inbound/settings/{uuid}
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/settings/{uuid}:
    patch:
      tags:
        - Inbound
      summary: Update inbound domain settings
      description: >-
        Updates the configuration of an inbound domain. Mode-specific fields are
        strictly enforced: smtp_servers is only allowed when the effective
        delivery_type is smtp, the webhook_* fields are only allowed when it is
        webhook, and forward accepts neither. The "effective" type is the new
        delivery_type if you are changing it in this request, otherwise the
        current one. Sending fields from the wrong mode returns 400. The
        forward_*_verified DNS flags are read-only and cannot be set via this
        endpoint.
      parameters:
        - name: uuid
          in: path
          required: true
          description: UUID of the inbound 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
              description: >-
                Any subset of the listed fields. At least one updatable field is
                required; sending an empty body returns 400.
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - disabled
                  description: >-
                    Domain status. "disabled" causes inbound-edge to stop
                    accepting mail for the domain.
                delivery_type:
                  type: string
                  enum:
                    - smtp
                    - webhook
                    - forward
                  description: >-
                    Switch the domain's delivery mode. The body may also include
                    the new mode's fields in the same request.
                smtp_servers:
                  type: array
                  description: >-
                    Only for delivery_type=smtp. Rejected with 400 if sent on a
                    webhook or forward domain.
                  items:
                    oneOf:
                      - type: string
                        example: mail.example.com:25
                      - type: object
                        required:
                          - url
                        properties:
                          url:
                            type: string
                            example: mail.example.com:25
                          priority:
                            type: integer
                            example: 1
                          tls_enabled:
                            type: boolean
                            default: false
                          timeout:
                            type: integer
                            default: 30000
                webhook_url:
                  type: string
                  format: uri
                  nullable: true
                  description: >-
                    Only for delivery_type=webhook. Rejected with 400 if sent on
                    an smtp or forward domain. Pass null to clear.
                  example: https://example.com/webhook/inbound
                webhook_method:
                  type: string
                  enum:
                    - POST
                    - PUT
                  description: >-
                    Only for delivery_type=webhook. Rejected with 400 if sent on
                    an smtp or forward domain.
                webhook_headers:
                  type: object
                  additionalProperties:
                    type: string
                  nullable: true
                  description: >-
                    Only for delivery_type=webhook. Rejected with 400 if sent on
                    an smtp or forward domain. Pass null to clear.
                webhook_timeout:
                  type: integer
                  nullable: true
                  description: >-
                    Only for delivery_type=webhook. Rejected with 400 if sent on
                    an smtp or forward domain.
                webhook_retry_count:
                  type: integer
                  nullable: true
                  description: >-
                    Only for delivery_type=webhook. Rejected with 400 if sent on
                    an smtp or forward domain.
                webhook_auth_header:
                  type: string
                  nullable: true
                  description: >-
                    Only for delivery_type=webhook. Rejected with 400 if sent on
                    an smtp or forward domain.
            examples:
              Disable a domain:
                value:
                  status: disabled
              Update SMTP servers:
                value:
                  smtp_servers:
                    - url: mail.example.com:587
                      priority: 1
                      tls_enabled: true
              Switch from smtp to webhook:
                summary: Atomic mode change with new mode's fields in the same request
                value:
                  delivery_type: webhook
                  webhook_url: https://example.com/webhook/inbound
              Switch to forwarding:
                summary: >-
                  Forward delivery accepts no further config; rules are added
                  separately via /forward-rules
                value:
                  delivery_type: forward
      responses:
        '200':
          description: Settings updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Domain updated successfully
        '400':
          description: Bad Request - Invalid input or cross-mode field bleed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Invalid input format
              examples:
                No fields to update:
                  value:
                    success: false
                    error: No fields to update
                Wrong fields for delivery_type=forward:
                  summary: smtp_servers or webhook_* sent on a forward domain
                  value:
                    success: false
                    error: >-
                      Fields not allowed for delivery_type=forward:
                      smtp_servers, webhook_url
                Wrong fields for delivery_type=smtp:
                  summary: webhook_* sent on an smtp domain
                  value:
                    success: false
                    error: 'Fields not allowed for delivery_type=smtp: webhook_url'
                Wrong fields for delivery_type=webhook:
                  summary: smtp_servers sent on a webhook domain
                  value:
                    success: false
                    error: 'Fields not allowed for delivery_type=webhook: smtp_servers'
                Invalid delivery_type:
                  value:
                    success: false
                    error: delivery_type must be smtp, webhook, or forward
        '401':
          description: Unauthorized - User not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: User information not found
        '404':
          description: Not Found - Domain not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Domain not found
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to update domain
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````