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

# Create Email Campaign

> Create a new email campaign in draft state for the authenticated company.



## OpenAPI

````yaml POST /email/campaigns/
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /email/campaigns/:
    post:
      tags:
        - email
      summary: Create Email Campaign
      description: >-
        Create a new email campaign in draft state for the authenticated
        company.
      operationId: email_campaigns_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailCampaignRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EmailCampaignRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EmailCampaignRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailCampaign'
          description: ''
      security:
        - jwtAuth: []
        - {}
components:
  schemas:
    EmailCampaignRequest:
      type: object
      properties:
        sender_identity_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Optional sender pool for random campaign sending.
        name:
          type: string
          minLength: 1
          maxLength: 255
        status:
          $ref: '#/components/schemas/EmailCampaignStatusEnum'
        description:
          type: string
        timezone:
          type: string
          maxLength: 64
        allowed_windows: {}
        stop_on_reply:
          type: boolean
        is_deleted:
          type: boolean
        created_at:
          type: string
          format: date-time
        company:
          type: string
          format: uuid
        workflow:
          type: string
          format: uuid
          nullable: true
        created_by:
          type: string
          format: uuid
          nullable: true
        responder_agent:
          type: string
          format: uuid
          nullable: true
      required:
        - company
        - name
    EmailCampaign:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        steps:
          type: array
          items:
            $ref: '#/components/schemas/EmailCampaignStep'
          readOnly: true
        sender_identities:
          type: string
          readOnly: true
        sent_count:
          type: string
          readOnly: true
        unique_opens:
          type: string
          readOnly: true
        unique_clicks:
          type: string
          readOnly: true
        replies:
          type: string
          readOnly: true
        sender_identity_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Optional sender pool for random campaign sending.
        name:
          type: string
          maxLength: 255
        status:
          $ref: '#/components/schemas/EmailCampaignStatusEnum'
        description:
          type: string
        timezone:
          type: string
          maxLength: 64
        allowed_windows: {}
        stop_on_reply:
          type: boolean
        is_deleted:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          readOnly: true
        company:
          type: string
          format: uuid
        workflow:
          type: string
          format: uuid
          nullable: true
        created_by:
          type: string
          format: uuid
          nullable: true
        responder_agent:
          type: string
          format: uuid
          nullable: true
      required:
        - company
        - id
        - name
        - replies
        - sender_identities
        - sent_count
        - steps
        - unique_clicks
        - unique_opens
        - updated_at
    EmailCampaignStatusEnum:
      enum:
        - draft
        - active
        - paused
        - completed
        - cancelled
      type: string
      description: |-
        * `draft` - Draft
        * `active` - Active
        * `paused` - Paused
        * `completed` - Completed
        * `cancelled` - Cancelled
    EmailCampaignStep:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        step_order:
          type: integer
          maximum: 2147483647
          minimum: 0
          default: 1
        subject:
          type: string
          maxLength: 512
        body_html:
          type: string
        body_text:
          type: string
        delay_minutes:
          type: integer
          maximum: 2147483647
          minimum: 0
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          readOnly: true
        campaign:
          type: string
          format: uuid
      required:
        - campaign
        - id
        - updated_at
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````