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

# Create an SMTP sending account

> Creates a custom SMTP sending account. Supply an `Idempotency-Key` header to safely retry on network errors. The SMTP password is stored securely and is never returned.



## OpenAPI

````yaml /openapi-app.json post /providers
openapi: 3.1.0
info:
  description: Programmatic access to your Sendmux email infrastructure.
  title: Sendmux API
  version: 1.0.0
servers:
  - description: API v1
    url: https://app.sendmux.ai/api/v1
security:
  - bearerAuth: []
paths:
  /providers:
    post:
      tags:
        - Sending accounts
      summary: Create an SMTP sending account
      description: >-
        Creates a custom SMTP sending account. Supply an `Idempotency-Key`
        header to safely retry on network errors. The SMTP password is stored
        securely and is never returned.
      operationId: managementCreateProvider
      parameters:
        - in: header
          name: Idempotency-Key
          required: false
          schema:
            description: >-
              Client-chosen unique key to safely retry the request. Cached for
              24h per (team, endpoint, key). Different body with same key
              returns 409 idempotency_conflict.
            example: providers-create-20260525-001
            maxLength: 255
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProviderCreateBody'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderItemResponse'
          description: Sending account created
          headers:
            Location:
              description: Canonical GET URL for the new sending account.
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Invalid request body
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Limit reached or idempotency conflict
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Request body too large
      security:
        - bearerAuth: []
components:
  schemas:
    ProviderCreateBody:
      additionalProperties: false
      properties:
        from_email:
          example: sender@example.com
          format: email
          maxLength: 255
          type:
            - string
            - 'null'
        from_name:
          example: Acme
          maxLength: 255
          type:
            - string
            - 'null'
        name:
          example: Transactional SMTP
          maxLength: 255
          minLength: 1
          type: string
        percentage:
          example: 100
          maximum: 100
          minimum: 0
          type: integer
        quotas:
          additionalProperties: false
          properties:
            per_day:
              anyOf:
                - exclusiveMinimum: 0
                  type: integer
                - allOf:
                    - $ref: '#/components/schemas/ProviderQuotaRange'
                    - type: object
                - type: 'null'
              description: >-
                Quota value. Use a number for a fixed cap, a min/max range, or
                null to clear on PATCH.
            per_hour:
              anyOf:
                - exclusiveMinimum: 0
                  type: integer
                - allOf:
                    - $ref: '#/components/schemas/ProviderQuotaRange'
                    - type: object
                - type: 'null'
              description: >-
                Quota value. Use a number for a fixed cap, a min/max range, or
                null to clear on PATCH.
            per_minute:
              anyOf:
                - exclusiveMinimum: 0
                  type: integer
                - allOf:
                    - $ref: '#/components/schemas/ProviderQuotaRange'
                    - type: object
                - type: 'null'
              description: >-
                Quota value. Use a number for a fixed cap, a min/max range, or
                null to clear on PATCH.
            per_second:
              anyOf:
                - exclusiveMinimum: 0
                  type: integer
                - allOf:
                    - $ref: '#/components/schemas/ProviderQuotaRange'
                    - type: object
                - type: 'null'
              description: >-
                Quota value. Use a number for a fixed cap, a min/max range, or
                null to clear on PATCH.
          type: object
        reply_to_email:
          example: support@example.com
          format: email
          maxLength: 255
          type:
            - string
            - 'null'
        reply_to_name:
          example: Support
          maxLength: 255
          type:
            - string
            - 'null'
        smtp_host:
          example: smtp.example.com
          maxLength: 255
          minLength: 1
          type: string
        smtp_password:
          example: smtp-password
          maxLength: 500
          minLength: 1
          type: string
        smtp_port:
          example: 587
          maximum: 65535
          minimum: 1
          type: integer
        smtp_protocol:
          enum:
            - tls
            - ssl
            - none
            - starttls
          example: starttls
          type: string
        smtp_username:
          example: api-user
          maxLength: 255
          minLength: 1
          type: string
        tracking_domain:
          example: click.example.com
          maxLength: 255
          type:
            - string
            - 'null'
      required:
        - name
        - smtp_host
        - smtp_port
        - smtp_protocol
        - smtp_username
        - smtp_password
      type: object
    ProviderItemResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessEnvelope'
        - properties:
            data:
              $ref: '#/components/schemas/ProviderItem'
            meta:
              $ref: '#/components/schemas/ResponseMeta'
          required:
            - data
          type: object
      unevaluatedProperties: false
    ApiError:
      additionalProperties: false
      properties:
        error:
          additionalProperties: false
          properties:
            code:
              description: Machine-readable error code
              enum:
                - invalid_parameter
                - missing_parameter
                - authentication_required
                - insufficient_permissions
                - not_found
                - conflict
                - limit_exceeded
                - idempotency_conflict
                - payload_too_large
                - validation_error
                - rate_limit_exceeded
                - service_unavailable
                - internal_error
              example: invalid_parameter
              type: string
            doc_url:
              description: Link to relevant documentation
              type: string
            errors:
              description: >-
                Accumulated per-field issues for validation errors. Only present
                on 400/422 responses.
              items:
                $ref: '#/components/schemas/ApiErrorDetail'
              type: array
            message:
              description: Human-readable error description
              type: string
            param:
              description: The parameter that caused the error
              type: string
            retryable:
              description: >-
                Whether the caller may safely retry this request. 4xx are
                typically false (except 429); 5xx are typically true.
              example: false
              type: boolean
          required:
            - code
            - message
            - retryable
          type: object
        meta:
          additionalProperties: false
          properties:
            request_id:
              example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
              type: string
          required:
            - request_id
          type: object
        ok:
          enum:
            - false
          type: boolean
      required:
        - ok
        - error
        - meta
      type: object
    ProviderQuotaRange:
      additionalProperties: false
      properties:
        max:
          example: 60
          exclusiveMinimum: 0
          type: integer
        min:
          example: 60
          exclusiveMinimum: 0
          type: integer
      required:
        - min
        - max
      type:
        - object
        - 'null'
    SuccessEnvelope:
      properties:
        meta:
          additionalProperties: {}
          properties: {}
          type: object
        ok:
          enum:
            - true
          type: boolean
      required:
        - ok
        - meta
      type: object
    ProviderItem:
      additionalProperties: false
      properties:
        allowed_actions:
          $ref: '#/components/schemas/ProviderAllowedActions'
        created_at:
          description: ISO 8601 creation timestamp
          example: '2026-05-25T02:18:00Z'
          type: string
        from_email:
          description: Default From email address.
          type:
            - string
            - 'null'
        from_name:
          description: Default From display name.
          type:
            - string
            - 'null'
        has_refresh_token:
          description: Whether an OAuth account has an active connection token.
          type: boolean
        has_smtp_password:
          description: Whether a custom SMTP password is stored.
          type: boolean
        id:
          description: Sending account public ID
          example: dprov_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
        is_active:
          description: Whether this account is enabled for sending.
          type: boolean
        is_editable:
          description: False when the account is platform-managed.
          type: boolean
        is_shared:
          description: True for the team's shared Amazon SES account.
          type: boolean
        last_tested_at:
          description: Last connection test timestamp.
          type:
            - string
            - 'null'
        last_used_at:
          description: Last send timestamp.
          type:
            - string
            - 'null'
        name:
          description: Display name
          example: Transactional SMTP
          type: string
        oauth_email:
          description: Connected account email for OAuth accounts.
          type:
            - string
            - 'null'
        percentage:
          description: Routing weight percentage.
          example: 100
          type:
            - integer
            - 'null'
        quotas:
          $ref: '#/components/schemas/ProviderQuotas'
        reply_to_email:
          description: Default Reply-To email address.
          type:
            - string
            - 'null'
        reply_to_name:
          description: Default Reply-To display name.
          type:
            - string
            - 'null'
        smtp_host:
          description: SMTP host for custom SMTP accounts.
          type:
            - string
            - 'null'
        smtp_port:
          description: SMTP port for custom SMTP accounts.
          type:
            - integer
            - 'null'
        smtp_protocol:
          description: SMTP security mode.
          type:
            - string
            - 'null'
        smtp_username:
          description: SMTP username for custom SMTP accounts.
          type:
            - string
            - 'null'
        status:
          description: Current sending account status.
          enum:
            - active
            - inactive
            - error
            - pending
          example: active
          type: string
        status_reason:
          description: Public-safe reason for the current status.
          type:
            - string
            - 'null'
        tracking_domain:
          description: Custom tracking hostname.
          type:
            - string
            - 'null'
        type:
          description: Sending account type. `amazon_ses` is the shared managed account.
          enum:
            - smtp
            - gmail_api
            - outlook_api
            - amazon_ses
          example: smtp
          type: string
        updated_at:
          description: ISO 8601 last update timestamp
          example: '2026-05-25T02:18:00Z'
          type: string
      required:
        - id
        - name
        - type
        - status
        - status_reason
        - is_active
        - is_shared
        - is_editable
        - allowed_actions
        - smtp_host
        - smtp_port
        - smtp_protocol
        - smtp_username
        - has_smtp_password
        - from_email
        - from_name
        - reply_to_email
        - reply_to_name
        - oauth_email
        - has_refresh_token
        - quotas
        - percentage
        - tracking_domain
        - created_at
        - updated_at
        - last_tested_at
        - last_used_at
      type: object
    ResponseMeta:
      additionalProperties: false
      properties:
        request_id:
          example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
      required:
        - request_id
      type: object
    ApiErrorDetail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Machine-readable issue code from the validator (e.g. zod issue
            code).
          example: invalid_string
          type: string
        field:
          description: Dot-path of the offending request field.
          example: recipient.email
          type: string
        message:
          description: Human-readable issue description.
          type: string
      required:
        - field
        - code
        - message
      type: object
    ProviderAllowedActions:
      additionalProperties: false
      properties:
        activate:
          type: boolean
        deactivate:
          type: boolean
        delete:
          type: boolean
        test:
          type: boolean
        update:
          type: boolean
      required:
        - update
        - delete
        - activate
        - deactivate
        - test
      type: object
    ProviderQuotas:
      additionalProperties: false
      properties:
        per_day:
          $ref: '#/components/schemas/ProviderQuotaRange'
        per_hour:
          $ref: '#/components/schemas/ProviderQuotaRange'
        per_minute:
          $ref: '#/components/schemas/ProviderQuotaRange'
        per_second:
          $ref: '#/components/schemas/ProviderQuotaRange'
      required:
        - per_second
        - per_minute
        - per_hour
        - per_day
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: >-
        Sendmux API key. Use a root API key for Management API routes, or a
        mailbox credential for Mailbox API routes. Obtain keys from the
        dashboard under API Keys.
      scheme: bearer
      type: http

````