> ## 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 Qubrics email infrastructure.
  title: Qubrics API
  version: 1.0.0
servers:
  - description: API v1
    url: https://app.qubrics.com/api/v1
security:
  - bearerAuth: []
  - oauth2: []
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: []
        - oauth2:
            - provider.create
components:
  schemas:
    ProviderCreateBody:
      additionalProperties: false
      properties:
        from_email:
          description: Default From email address for an SMTP account.
          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
                - $ref: '#/components/schemas/ProviderQuotaRange'
                - 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
                - $ref: '#/components/schemas/ProviderQuotaRange'
                - 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
                - $ref: '#/components/schemas/ProviderQuotaRange'
                - 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
                - $ref: '#/components/schemas/ProviderQuotaRange'
                - 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'
        variables:
          $ref: '#/components/schemas/ProviderVariables'
      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
    ProviderVariables:
      additionalProperties:
        maxLength: 4096
        type: string
      description: >-
        Per-account string variables. PATCH omission preserves the current map,
        a supplied map replaces it, and an empty map clears it. Detail responses
        return an empty map when no variables are set.
      example:
        signature_url: https://example.com/signature
      maxProperties: 50
      propertyNames:
        maxLength: 64
        pattern: ^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$
        type: string
      type: object
    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. Connected Google and Microsoft accounts
            always use their authorised account 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
        variables:
          $ref: '#/components/schemas/ProviderVariables'
      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
        - variables
      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
        update_variables:
          type: boolean
      required:
        - update
        - update_variables
        - delete
        - activate
        - deactivate
        - test
      type: object
    ProviderQuotas:
      additionalProperties: false
      properties:
        per_day:
          anyOf:
            - $ref: '#/components/schemas/ProviderQuotaRange'
            - type: 'null'
        per_hour:
          anyOf:
            - $ref: '#/components/schemas/ProviderQuotaRange'
            - type: 'null'
        per_minute:
          anyOf:
            - $ref: '#/components/schemas/ProviderQuotaRange'
            - type: 'null'
        per_second:
          anyOf:
            - $ref: '#/components/schemas/ProviderQuotaRange'
            - type: 'null'
      required:
        - per_second
        - per_minute
        - per_hour
        - per_day
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: >-
        Qubrics 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
    oauth2:
      description: >-
        Use the authorisation-code flow with S256 PKCE and
        resource=https://qubrics.com/api. The user selects the team, API access
        and mailboxes during consent. OAuth access tokens authenticate HTTP API
        requests; use separate credentials for SMTP and IMAP.
      flows:
        authorizationCode:
          authorizationUrl: https://app.qubrics.com/oauth/authorize
          refreshUrl: https://app.qubrics.com/oauth/token
          scopes:
            analytics.*: All analytics operations
            analytics.read: View key usage analytics and verification logs
            billing.*: All billing operations
            billing.auto_topup: Configure auto top-up settings
            billing.read: View balance, transactions, invoices
            billing.topup: Purchase balance top-ups
            calendar.read: Read calendars and events in this mailbox
            calendar.write: >-
              Create calendars and create, edit and delete events in this
              mailbox
            domain.*: All domain operations
            domain.create: Add sending domains
            domain.delete: Remove domains
            domain.read: List/view domains and DNS status
            domain.verify: Trigger domain verification
            email.receive: Authorise email reception
            email.send: Send email through the HTTP API
            key.*: All key management operations
            key.create: Create new API keys (both root and mailbox)
            key.read: List/view API keys and their metadata
            key.revoke: Revoke API keys
            key.rotate: Rotate API keys
            logs.*: All log operations
            logs.read: View delivery logs
            mailbox.admin.*: All mailbox admin operations
            mailbox.admin.create: Create mailboxes (admin-level)
            mailbox.admin.delete: Delete mailboxes (admin-level)
            mailbox.admin.manage: Manage all mailbox settings
            mailbox.admin.read: List/view mailboxes (admin-level)
            mailbox.drafts.write: Create and edit saved mailbox drafts
            mailbox.read: Read mailbox contents (folders, messages)
            mailbox.settings.update: Update own mailbox settings (signature, auto-reply)
            provider.*: All provider operations
            provider.create: Add email provider accounts (Google, Microsoft, SMTP)
            provider.delete: Remove provider accounts
            provider.read: List/view provider accounts and connection status
            provider.update: Update provider settings, refresh tokens
            routing.*: All routing operations
            routing.create: Create delivery groups
            routing.delete: Remove delivery groups
            routing.read: List/view delivery groups and routing rules
            routing.update: Update delivery group configuration
            team.*: All team operations
            team.members.invite: Invite team members
            team.members.remove: Remove team members
            team.members.roles: Change member roles
            team.read: View team settings and members
            team.update: Update team settings
            webhook.*: All webhook operations
            webhook.create: Create webhook subscriptions
            webhook.delete: Delete webhook subscriptions
            webhook.manage: Rotate signing secret + send test events
            webhook.read: List/view webhook subscriptions
            webhook.update: Update webhook URL, event types, enabled flag
          tokenUrl: https://app.qubrics.com/oauth/token
      type: oauth2

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.