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

# Create Campaign

> Create a new campaign



## OpenAPI

````yaml https://api.insighto.ai/api/v1/openapi.json post /api/v1/campaign/create
openapi: 3.1.0
info:
  title: Ragify
  version: v1
servers: []
security: []
paths:
  /api/v1/campaign/create:
    post:
      tags:
        - Campaign
      summary: Create Campaign
      description: Create a new campaign
      operationId: create_campaign_api_v1_campaign_create_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ICampaignCreate'
        required: true
      responses:
        '201':
          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:
        - Your API Key: []
        - HTTPBearer: []
components:
  schemas:
    ICampaignCreate:
      properties:
        name:
          type: string
          title: Name
        widget_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Widget Id
        type:
          $ref: '#/components/schemas/CampaignType'
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          default: {}
        status:
          $ref: '#/components/schemas/CampaignStatus'
          default: not_started
        execution_weekdays:
          items:
            type: integer
          type: array
          title: Execution Weekdays
          default: []
        time_window_start:
          anyOf:
            - type: string
              format: time
            - type: 'null'
          title: Time Window Start
        time_window_end:
          anyOf:
            - type: string
              format: time
            - type: 'null'
          title: Time Window End
        time_zone:
          type: string
          title: Time Zone
          default: UTC
        start_time:
          type: string
          format: date-time
          title: Start Time
        interval:
          type: integer
          title: Interval
        enabled:
          type: boolean
          title: Enabled
          default: false
      type: object
      required:
        - name
        - type
        - start_time
        - interval
      title: ICampaignCreate
    IPostResponseBase_ICampaignRead_:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: Data created successfully
        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
    CampaignType:
      type: string
      enum:
        - outbound_call
      title: CampaignType
    CampaignStatus:
      type: string
      enum:
        - not_started
        - to_be_run
        - in_progress
        - paused
        - cancelled
        - completed
      title: CampaignStatus
    ICampaignRead:
      properties:
        name:
          type: string
          title: Name
        widget_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Widget Id
        type:
          $ref: '#/components/schemas/CampaignType'
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          default: {}
        status:
          $ref: '#/components/schemas/CampaignStatus'
          default: not_started
        execution_weekdays:
          items:
            type: integer
          type: array
          title: Execution Weekdays
          default: []
        time_window_start:
          anyOf:
            - type: string
              format: time
            - type: 'null'
          title: Time Window Start
        time_window_end:
          anyOf:
            - type: string
              format: time
            - type: 'null'
          title: Time Window End
        time_zone:
          type: string
          title: Time Zone
          default: UTC
        start_time:
          type: string
          format: date-time
          title: Start Time
        interval:
          type: integer
          title: Interval
        enabled:
          type: boolean
          title: Enabled
          default: false
        id:
          type: string
          format: uuid
          title: Id
        contacts:
          items: {}
          type: array
          title: Contacts
          default: []
        widget_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Widget Name
      type: object
      required:
        - name
        - type
        - start_time
        - interval
        - id
      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:
    Your API Key:
      type: apiKey
      description: >-
        Your API key for authentication. You can generate it from the
        **Settings** page. Format: starts with `in-`.
      in: query
      name: api_key
    HTTPBearer:
      type: http
      scheme: bearer

````