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

# Create Campaign

> Creates a new campaign



## OpenAPI

````yaml POST /api/v1/campaigns
openapi: 3.1.0
info:
  title: kollie-backend
  version: v1
servers: []
security: []
paths:
  /api/v1/campaigns:
    post:
      tags:
        - campaigns
      summary: Create Campaign
      description: Creates a new campaign
      operationId: create_campaign_api_v1_campaigns_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ICampaignCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostResponseBase_ICampaignRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ICampaignCreate:
      properties:
        name:
          type: string
          title: Name
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Id
        status:
          $ref: '#/components/schemas/ICampaignStatusEnum'
          default: draft
        start_date:
          type: string
          format: date-time
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
        start_time:
          type: string
          format: time
          title: Start Time
        end_time:
          type: string
          format: time
          title: End Time
        phone_numbers:
          items:
            type: string
          type: array
          title: Phone Numbers
          default: []
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        additional_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Additional Params
          default: {}
      type: object
      required:
        - name
        - end_date
        - start_time
        - end_time
      title: ICampaignCreate
    IPostResponseBase_ICampaignRead_:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: Data created correctly
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - {}
            - type: 'null'
          title: Meta
          default: {}
        data:
          anyOf:
            - $ref: '#/components/schemas/ICampaignRead'
            - type: 'null'
      type: object
      title: IPostResponseBase[ICampaignRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ICampaignStatusEnum:
      type: string
      enum:
        - draft
        - paused
        - running
        - finished
        - canceled
      title: ICampaignStatusEnum
    ICampaignRead:
      properties:
        name:
          type: string
          title: Name
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Id
        status:
          $ref: '#/components/schemas/ICampaignStatusEnum'
          default: draft
        start_date:
          type: string
          format: date-time
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
        start_time:
          type: string
          format: time
          title: Start Time
        end_time:
          type: string
          format: time
          title: End Time
        phone_numbers:
          items:
            type: string
          type: array
          title: Phone Numbers
          default: []
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        additional_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Additional Params
          default: {}
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - name
        - end_date
        - start_time
        - end_time
        - id
        - created_at
      title: ICampaignRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````