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

# Create Campaign

> Creates a new campaign for the authenticated tenant.

## Authentication
All requests require an `Authorization` header using Bearer token authentication:
`Authorization: Bearer <api_key>`



## OpenAPI

````yaml POST /api/v2/voice-campaigns
openapi: 3.1.0
info:
  title: VoiceAIWrapper API
  description: >-
    REST API for managing campaigns, leads, clients, web widgets, and voice
    providers on VoiceAIWrapper.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.voiceaiwrapper.app
security:
  - bearerAuth: []
paths:
  /api/v2/voice-campaigns:
    post:
      tags:
        - Campaigns
      summary: Create Campaign
      description: >-
        Creates a new campaign for the authenticated tenant.


        ## Authentication

        All requests require an `Authorization` header using Bearer token
        authentication:

        `Authorization: Bearer <api_key>`
      operationId: createCampaign
      requestBody:
        required: true
        description: Campaign configuration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignRequest'
      responses:
        '201':
          description: >-
            Campaign created successfully. Returns campaign ID, name, type, and
            status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Campaign created successfully
                  data:
                    type: object
                    properties:
                      campaign_id:
                        type: string
                        example: Vm9pY2VDYW1wYWlnbjoxMjM=
                      campaign_name:
                        type: string
                        example: Q4 Outreach
                      campaign_type:
                        type: string
                        example: OUTBOUND
                      campaign_status:
                        type: string
                        example: DRAFT
        '400':
          description: >-
            Invalid request data. Check required fields, campaign type, dialer
            type, and schedule values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithList'
              example:
                message: Invalid data
                errors:
                  - 'Campaign name is missing: name'
        '401':
          description: Authentication failed. Ensure the Bearer token is present and valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: Access denied. Your plan's campaign limit has been reached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithList'
              example:
                message: >-
                  You've discovered a premium feature! Upgrade your plan to
                  access this and other advanced features.
                errors:
                  - Campaign limit reached
        '404':
          description: Resource not found. Verify voiceai_pod_id and assistant_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithList'
              example:
                message: Tenant voice provider not found
                errors:
                  - Invalid voiceai_pod_id
        '500':
          description: Internal server error. Contact support if this persists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              example:
                message: Internal server error
components:
  schemas:
    CreateCampaignRequest:
      type: object
      required:
        - name
        - type
        - assistant_id
        - tenant_voice_provider_id
        - dialer_type
      properties:
        name:
          type: string
          description: Campaign display name. Required.
          example: Q4 Outreach
        type:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: Campaign type. Required. Immutable after creation.
          example: OUTBOUND
        assistant_id:
          type: string
          description: Provider-native assistant/agent ID to use for calls. Required.
          example: asst_abc123
        tenant_voice_provider_id:
          type: string
          description: |-
            Global ID of the tenant voice provider to use. Required.
             Note: `tenant_voice_provider_id` = `voiceai_pod_id`
          example: VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=
        dialer_type:
          type: string
          enum:
            - SINGLE
            - POOL
          description: Dialer type. Required.
          example: SINGLE
        vapi_calling_entity:
          type: string
          enum:
            - ASSISTANT
            - WORKFLOW
            - SQUAD
          description: VAPI calling entity type (VAPI provider only). Optional.
          example: ASSISTANT
        phone_number_id:
          type: string
          description: >-
            Provider-native phone number ID. Optional. Can be configured after
            creation.
          example: pn_abc123
        phone_number_pool_id:
          type: string
          description: Global ID of the phone number pool (POOL dialer only). Optional.
          example: Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz
        start_date:
          type: string
          format: date
          description: Campaign start date (YYYY-MM-DD). Required for OUTBOUND campaigns.
          example: '2025-01-01'
        end_date:
          type: string
          format: date
          description: >-
            Campaign end date (YYYY-MM-DD). Optional. Must be after start_date
            if provided.
          example: '2025-03-31'
        timezone:
          type: string
          description: IANA timezone string. Required for OUTBOUND campaigns.
          example: America/New_York
        days_of_week:
          type: array
          items:
            type: string
          description: >-
            Days of the week when the campaign is active. Required for OUTBOUND
            campaigns.
          example:
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
        daily_start_time:
          type: string
          description: >-
            Daily call start time (HH:MM or HH:MM:SS). Required for OUTBOUND
            campaigns.
          example: '09:00'
        daily_end_time:
          type: string
          description: >-
            Daily call end time (HH:MM or HH:MM:SS). Required for OUTBOUND
            campaigns. Must be after daily_start_time.
          example: '17:00'
        max_call_attempts:
          type: integer
          minimum: 1
          description: >-
            Maximum total call attempts per lead. Required for OUTBOUND
            campaigns. Minimum: 1.
          example: 3
        max_daily_attempts:
          type: integer
          minimum: 1
          description: >-
            Maximum call attempts per lead per day. Required for OUTBOUND
            campaigns. Minimum: 1.
          example: 1
        min_gap_between_attempts:
          type: integer
          minimum: 3
          description: >-
            Minimum minutes between call attempts for a lead. Required for
            OUTBOUND campaigns. Minimum: 3.
          example: 60
        consider_voicemail_as_answered:
          type: boolean
          description: >-
            When true, voicemail pickups count as answered and stop retries.
            Optional.
          example: true
        webhook_url:
          type: string
          format: uri
          description: URL to receive campaign event webhooks. Optional.
          example: https://yourapp.com/webhooks/campaign
    ErrorWithList:
      type: object
      properties:
        message:
          type: string
        errors:
          type: array
          items:
            type: string
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````