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

# Create an email channel

> Registers a sender on a domain and starts SendGrid domain authentication. After creation, fetch the DNS records and add them to your DNS provider, then call /verify.



## OpenAPI

````yaml /openapi.json post /api/public/email-channel
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/email-channel:
    post:
      tags:
        - email-channel
      summary: Create an email channel
      description: >-
        Registers a sender on a domain and starts SendGrid domain
        authentication. After creation, fetch the DNS records and add them to
        your DNS provider, then call /verify.
      operationId: PublicEmailChannelController_create
      parameters:
        - name: x-api-key
          in: header
          description: API key needed to authorize the request
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmailChannelPublicDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailChannelResponseDto'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailChannelResponseDto'
components:
  schemas:
    CreateEmailChannelPublicDto:
      type: object
      properties:
        connection_method:
          default: manual
          type: string
          enum:
            - manual
        domain:
          type: string
          minLength: 1
          pattern: ^([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$
        sender_address:
          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,}$
        sender_name:
          type: string
          minLength: 1
      required:
        - domain
        - sender_address
        - sender_name
    EmailChannelResponseDto:
      type: object
      properties:
        id:
          type: string
        sender_address:
          type: string
        sender_name:
          type: string
        created_at:
          format: date-time
          type: string
        email_domain:
          $ref: '#/components/schemas/EmailDomainResponseDto'
      required:
        - id
        - sender_address
        - sender_name
        - created_at
        - email_domain
    EmailDomainResponseDto:
      type: object
      properties:
        id:
          type: string
        domain:
          type: string
        outbound_validation_status:
          type: string
          enum:
            - not_configured
            - pending
            - verified
            - failed
        inbound_validation_status:
          type: string
          enum:
            - not_configured
            - pending
            - verified
            - failed
        dns_records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecordResponseDto'
        planned_inbound_mx:
          $ref: '#/components/schemas/PlannedInboundMxResponseDto'
        connection_method:
          type: string
          enum:
            - manual
            - shared
        subdomain_slug:
          type: string
          nullable: true
      required:
        - id
        - domain
        - outbound_validation_status
        - inbound_validation_status
        - connection_method
    DnsRecordResponseDto:
      type: object
      properties:
        id:
          type: string
        record_type:
          type: string
          enum:
            - cname
            - mx
            - txt
        host:
          type: string
        data:
          type: string
        valid:
          type: boolean
        purpose:
          type: string
          enum:
            - spf
            - dkim1
            - dkim2
            - inbound_mx
      required:
        - id
        - record_type
        - host
        - data
        - valid
        - purpose
    PlannedInboundMxResponseDto:
      type: object
      properties:
        host:
          type: string
        data:
          type: string
      required:
        - host
        - data

````