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

# Update email server

> Rename, enable/disable, or replace transport configuration. Omitted secrets are retained only when the existing transport is compatible and, for SMTP, the host and username are unchanged. Changing transport or SMTP destination requires a complete valid target; a new password or explicit auth clearing is required when host or username changes.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/email-servers/{id}
openapi: 3.1.0
info:
  title: Eigenpal API
  version: 1.0.0
  description: >-
    Public REST API for inspecting automations, starting and monitoring runs,
    managing files, collecting human reviews, and running evaluations.
  contact:
    name: Eigenpal
    url: https://eigenpal.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.eigenpal.com
    description: Production (canonical API hostname)
security:
  - bearerAuth: []
tags:
  - name: Metadata
    description: Authenticate and inspect the current API context.
  - name: Models
    description: >-
      List text, vision, and OCR models configured for the current tenant
      environment. This is a catalog inventory, not a live provider health
      probe.
  - name: Automations
    description: >-
      Inspect runnable workflow and agent automations, their versions, triggers,
      and source sync state.
  - name: Runs
    description: >-
      Start, monitor, retry, review, and debug automation runs, including
      artifacts.
  - name: Reviews
    description: >-
      Record human review verdicts, manage corrected outputs, and monitor review
      health.
  - name: Files
    description: Upload reusable files for later run or dataset use.
  - name: Templates
    description: >-
      Upload, inspect, version, download, and delete tenant-scoped DOCX and XLSX
      templates.
  - name: Email servers
    description: >-
      Create and manage outbound email servers for workflow mail. Secrets are
      encrypted at rest and never returned.
  - name: Evaluation
    description: >-
      Manage datasets, examples, evaluators, experiment batches, evaluator
      scores, and run promotion workflows.
paths:
  /v1/email-servers/{id}:
    patch:
      tags:
        - Email servers
      summary: Update email server
      description: >-
        Rename, enable/disable, or replace transport configuration. Omitted
        secrets are retained only when the existing transport is compatible and,
        for SMTP, the host and username are unchanged. Changing transport or
        SMTP destination requires a complete valid target; a new password or
        explicit auth clearing is required when host or username changes.
      operationId: emailServers.update
      parameters:
        - in: path
          name: id
          schema:
            type: string
            maxLength: 128
            pattern: ^ems_[A-Za-z0-9_-]+$
            description: Email server id (`ems_…`).
          required: true
          description: Email server id (`ems_…`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEmailServerRequest'
      responses:
        '200':
          description: Updated email server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailServer'
        '400':
          description: Validation error. Request shape did not match the spec.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '403':
          description: API key lacks required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '409':
          description: Conflict. The resource is in a state that forbids the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '413':
          description: Payload too large. Upload exceeded the per-request size cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: Seconds until the next request may succeed
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
components:
  schemas:
    UpdateEmailServerRequest:
      anyOf:
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 128
            enabled:
              type: boolean
            transport:
              type: string
              const: resend
            apiKey:
              type: string
              minLength: 1
            fromEmail:
              type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            fromName:
              type: string
              minLength: 1
              maxLength: 128
          required:
            - transport
            - fromEmail
            - fromName
          additionalProperties: false
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 128
            enabled:
              type: boolean
            transport:
              type: string
              const: smtp
            host:
              type: string
              minLength: 1
              maxLength: 253
            port:
              type: integer
              minimum: 1
              maximum: 65535
            security:
              type: string
              enum:
                - starttls
                - tls
                - none
            username:
              anyOf:
                - type: string
                  minLength: 1
                  maxLength: 256
                - type: 'null'
            password:
              type: string
              minLength: 1
            caPem:
              anyOf:
                - type: string
                  minLength: 1
                - type: 'null'
            fromEmail:
              type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            fromName:
              type: string
              minLength: 1
              maxLength: 128
          required:
            - transport
            - host
            - port
            - security
            - fromEmail
            - fromName
          additionalProperties: false
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 128
            enabled:
              type: boolean
          additionalProperties: false
    EmailServer:
      oneOf:
        - $ref: '#/components/schemas/PublicResendEmailServer'
        - $ref: '#/components/schemas/PublicSmtpEmailServer'
      type: object
      discriminator:
        propertyName: transport
        mapping:
          resend:
            $ref: '#/components/schemas/PublicResendEmailServer'
          smtp:
            $ref: '#/components/schemas/PublicSmtpEmailServer'
    ApiErrorEnvelope:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorIssue'
        requestId:
          type: string
          description: Request id echoed via the x-request-id header
        hint:
          description: Suggested fix for known error patterns
          type: string
        docsUrl:
          description: Link to relevant docs
          type: string
        conflictingWorkflowId:
          description: >-
            Present on 409 workflow_name_conflict responses. Id of the workflow
            that already owns the requested name.
          type: string
      required:
        - issues
        - requestId
      additionalProperties: false
    PublicResendEmailServer:
      type: object
      properties:
        id:
          type: string
          maxLength: 128
          pattern: ^ems_[A-Za-z0-9_-]+$
        name:
          type: string
          minLength: 1
          maxLength: 128
        enabled:
          type: boolean
        createdAt:
          anyOf:
            - type: string
            - type: string
        updatedAt:
          anyOf:
            - type: string
            - type: string
        transport:
          type: string
          const: resend
        fromEmail:
          type: string
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        fromName:
          type: string
          minLength: 1
          maxLength: 128
        apiKeyConfigured:
          type: boolean
          const: true
      required:
        - id
        - name
        - enabled
        - createdAt
        - updatedAt
        - transport
        - fromEmail
        - fromName
        - apiKeyConfigured
      additionalProperties: false
    PublicSmtpEmailServer:
      type: object
      properties:
        id:
          type: string
          maxLength: 128
          pattern: ^ems_[A-Za-z0-9_-]+$
        name:
          type: string
          minLength: 1
          maxLength: 128
        enabled:
          type: boolean
        createdAt:
          anyOf:
            - type: string
            - type: string
        updatedAt:
          anyOf:
            - type: string
            - type: string
        transport:
          type: string
          const: smtp
        fromEmail:
          type: string
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        fromName:
          type: string
          minLength: 1
          maxLength: 128
        host:
          type: string
          minLength: 1
          maxLength: 253
        port:
          type: integer
          minimum: 1
          maximum: 65535
        security:
          type: string
          enum:
            - starttls
            - tls
            - none
        username:
          anyOf:
            - type: string
            - type: 'null'
        passwordConfigured:
          type: boolean
        caPemConfigured:
          type: boolean
      required:
        - id
        - name
        - enabled
        - createdAt
        - updatedAt
        - transport
        - fromEmail
        - fromName
        - host
        - port
        - security
        - username
        - passwordConfigured
        - caPemConfigured
      additionalProperties: false
    ApiErrorIssue:
      type: object
      properties:
        field:
          type: string
          description: JSON path of the offending field, or "<root>"
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: >-
            Machine-readable error code (e.g. invalid_value, not_found,
            api_trigger_disabled, manual_trigger_disabled)
        severity:
          type: string
          enum:
            - error
            - warning
          description: Issue severity
      required:
        - field
        - message
        - code
        - severity
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued from Settings → API Keys. Pass as `Authorization: Bearer
        <key>`.

````