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

# Create Campaign

> Creates a new Campaign



## OpenAPI

````yaml POST /campaign/create
openapi: 3.0.1
info:
  title: PreCallAi API
  description: >-
    A sample API that uses a campaign store as an example to demonstrate
    features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.precallai.com/api/v1
security:
  - apiKeyAuth: []
paths:
  /campaign/create:
    post:
      description: Creates a new Campaign
      requestBody:
        description: Campaign to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignNew'
        required: true
      responses:
        '200':
          description: Campaign response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CampaignNew:
      required:
        - campaigns_name
        - assistant_id
        - contacts_id
        - dialer_id
      type: object
      properties:
        campaigns_name:
          description: The name of the campaign
          type: string
        assistant_id:
          description: The id of the assistant
          type: string
        contacts_id:
          description: The id of the contact
          type: string
        dialer_id:
          description: The id of the dialer
          type: string
        scheduled_at:
          description: Scheduled date
          type: string
        is_automation:
          description: Is automation
          type: boolean
    Campaign:
      type: object
      properties:
        campaigns_name:
          description: The name of the campaign
          type: string
        assistant_name:
          description: The name of the assistant
          type: string
        contact_name:
          description: The name of the contact
          type: string
        dialer_name:
          description: The name of the dialer
          type: string
        dialer_type:
          description: The type of the dialer
          type: string
        phone_number:
          description: phone number
          type: string
        started_at:
          description: started date
          type: string
        is_started:
          description: Is started
          type: boolean
        is_automation:
          description: Is automation
          type: boolean
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````