# List Campaigns

> Retrieve all campaigns for your organization

`GET /api/v1/campaign`

## OpenAPI

````yaml api-reference/openapi.json get /api/v1/campaign
openapi: 3.1.0
info:
  title: Menace Voice API
  description: API for Menace Voice agents
  version: 1.0.0
servers:
  - url: https://voice.menaceui.com
    description: Production
  - url: http://localhost:8000
    description: Local development
paths:
  /api/v1/campaign/:
    get:
      tags:
        - main
      summary: Get Campaigns
      description: Get campaigns for user's organization
      operationId: get_campaigns_api_v1_campaign__get
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            title: X-Api-Key
      responses:
        "200":
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CampaignsResponse"
        "404":
          description: Not found
        "422":
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
components:
  schemas:
    CampaignLogEntryResponse:
      properties:
        ts:
          type: string
          title: Ts
        level:
          type: string
          title: Level
        event:
          type: string
          title: Event
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: "null"
          title: Details
      type: object
      required:
        - ts
        - level
        - event
        - message
      title: CampaignLogEntryResponse
      description: |-
        A single timestamped entry from the campaign's append-only log.

        Surfaced in the UI so operators can see why a campaign moved to
        paused / failed without digging through server logs.
    CampaignResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        workflow_id:
          type: integer
          title: Workflow Id
        workflow_name:
          type: string
          title: Workflow Name
        state:
          type: string
          title: State
        source_type:
          type: string
          title: Source Type
        source_id:
          type: string
          title: Source Id
        total_rows:
          anyOf:
            - type: integer
            - type: "null"
          title: Total Rows
        processed_rows:
          type: integer
          title: Processed Rows
        failed_rows:
          type: integer
          title: Failed Rows
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: "null"
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: "null"
          title: Completed At
        retry_config:
          $ref: "#/components/schemas/RetryConfigResponse"
        max_concurrency:
          anyOf:
            - type: integer
            - type: "null"
          title: Max Concurrency
        schedule_config:
          anyOf:
            - $ref: "#/components/schemas/ScheduleConfigResponse"
            - type: "null"
        circuit_breaker:
          anyOf:
            - $ref: "#/components/schemas/CircuitBreakerConfigResponse"
            - type: "null"
        executed_count:
          type: integer
          title: Executed Count
          default: 0
        total_queued_count:
          type: integer
          title: Total Queued Count
          default: 0
        parent_campaign_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Parent Campaign Id
        redialed_campaign_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Redialed Campaign Id
        telephony_configuration_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Telephony Configuration Id
        telephony_configuration_name:
          anyOf:
            - type: string
            - type: "null"
          title: Telephony Configuration Name
        logs:
          items:
            $ref: "#/components/schemas/CampaignLogEntryResponse"
          type: array
          title: Logs
      type: object
      required:
        - id
        - name
        - workflow_id
        - workflow_name
        - state
        - source_type
        - source_id
        - total_rows
        - processed_rows
        - failed_rows
        - created_at
        - started_at
        - completed_at
        - retry_config
      title: CampaignResponse
    CampaignsResponse:
      properties:
        campaigns:
          items:
            $ref: "#/components/schemas/CampaignResponse"
          type: array
          title: Campaigns
      type: object
      required:
        - campaigns
      title: CampaignsResponse
    CircuitBreakerConfigResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: false
        failure_threshold:
          type: number
          title: Failure Threshold
          default: 0.5
        window_seconds:
          type: integer
          title: Window Seconds
          default: 120
        min_calls_in_window:
          type: integer
          title: Min Calls In Window
          default: 5
      type: object
      title: CircuitBreakerConfigResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RetryConfigResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
        max_retries:
          type: integer
          title: Max Retries
        retry_delay_seconds:
          type: integer
          title: Retry Delay Seconds
        retry_on_busy:
          type: boolean
          title: Retry On Busy
        retry_on_no_answer:
          type: boolean
          title: Retry On No Answer
        retry_on_voicemail:
          type: boolean
          title: Retry On Voicemail
      type: object
      required:
        - enabled
        - max_retries
        - retry_delay_seconds
        - retry_on_busy
        - retry_on_no_answer
        - retry_on_voicemail
      title: RetryConfigResponse
    ScheduleConfigResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
        timezone:
          type: string
          title: Timezone
        slots:
          items:
            $ref: "#/components/schemas/TimeSlotResponse"
          type: array
          title: Slots
      type: object
      required:
        - enabled
        - timezone
        - slots
      title: ScheduleConfigResponse
    TimeSlotResponse:
      properties:
        day_of_week:
          type: integer
          title: Day Of Week
        start_time:
          type: string
          title: Start Time
        end_time:
          type: string
          title: End Time
      type: object
      required:
        - day_of_week
        - start_time
        - end_time
      title: TimeSlotResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
````
