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

# List campaigns

> List your campaigns, newest first.

Pass `next_token` to retrieve the next page. A `null` token means there are no more pages.


## OpenAPI

````yaml openapi.json GET /voice/campaigns
openapi: 3.1.0
info:
  title: Karta Public API
  version: 1.0.0-draft
  description: >-
    Karta API reference for accounts, agents, calls, campaigns, WebSocket
    sessions, and billing.
servers:
  - url: https://api.getkarta.ai/public/v1
    description: Production
security:
  - BearerApiKey: []
tags:
  - name: Account
  - name: Agents
  - name: Calls
  - name: Phone numbers
  - name: Campaigns
  - name: Realtime
  - name: Billing
  - name: Webhooks
    description: Outgoing call events delivered to your server.
paths:
  /voice/campaigns:
    get:
      tags:
        - Campaigns
      summary: List campaigns
      description: List your campaigns, newest first.
      operationId: listCampaigns
      parameters:
        - name: X-Request-ID
          in: header
          required: false
          description: Optional request-tracing identifier.
          schema:
            type: string
          example: example-request-001
        - name: limit
          in: query
          required: false
          description: Maximum number of items to return.
          schema:
            type: integer
            default: 100
        - name: next_token
          in: query
          required: false
          description: Cursor from the preceding response.
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          headers:
            X-Request-ID:
              description: Request identifier.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignPage'
              example:
                campaigns:
                  - campaign_id: campaign_example
                    campaign_name: Example follow-up
                    agent_id: agentexample
                    from_number: '+12025550124'
                    status: active
                    total_numbers: 1
                    failed_numbers: 0
                    queued_numbers: 1
                    in_progress: 0
                    created_at: 1788228000
                    updated_at: 1788228000
                next_token: null
        '400':
          description: Invalid request or account configuration.
          headers:
            X-Request-ID:
              description: Request identifier.
              schema:
                type: string
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AuthProblem'
                    title: Authentication or account configuration error
                  - $ref: '#/components/schemas/RequestProcessingError'
                    title: Request processing error
              examples:
                configuration:
                  summary: Account configuration error
                  value:
                    type: https://httpstatus.es/400
                    title: Missing Data Residency
                    status: 400
                    detail: Client dataResidency not set. Please contact support.
                    instance: example-request-001
                    code: missing_data_residency
                request:
                  summary: Request parsing error (illustrative message)
                  value:
                    message: Unexpected end of JSON input
            application/problem+json:
              schema:
                $ref: '#/components/schemas/VoiceProblem'
                title: Voice service error
              example:
                type: https://api.karta.com/problems/bad-request
                title: Bad Request
                status: 400
                detail: invalid next_token
                instance: /voice/public/v1/campaigns
                trace_id: example-request-001
        '401':
          description: Authentication failed.
          headers:
            X-Request-ID:
              description: Request identifier.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthProblem'
                title: Authentication or account configuration error
              examples:
                authentication:
                  summary: Missing API key
                  value:
                    type: https://httpstatus.es/401
                    title: Invalid API Key
                    status: 401
                    detail: API key is required
                    instance: example-request-001
                    code: invalid_api_key
        '403':
          description: API key not permitted for this operation.
          headers:
            X-Request-ID:
              description: Request identifier.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthProblem'
                title: Authentication or account configuration error
              examples:
                authentication:
                  summary: Wrong key type
                  value:
                    type: https://httpstatus.es/403
                    title: Wrong API Key Type
                    status: 403
                    detail: Widget API keys may only be used on /widget paths
                    instance: example-request-001
                    code: wrong_key_audience
        '422':
          description: Request validation failed.
          headers:
            X-Request-ID:
              description: Request identifier.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/VoiceProblem'
                title: Voice service error
              example:
                type: https://api.karta.com/problems/validation-error
                title: Unprocessable Entity
                status: 422
                detail: Validation failed
                instance: /voice/public/v1/campaigns
                trace_id: example-request-001
                errors:
                  - path: header.X-Client-ID
                    message: Field required
                    type: missing
        '500':
          description: Internal server error.
          headers:
            X-Request-ID:
              description: Request identifier.
              schema:
                type: string
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AuthProblem'
                    title: Authentication or account configuration error
                  - $ref: '#/components/schemas/RequestProcessingError'
                    title: Request processing error
                  - $ref: '#/components/schemas/ProxyConnectionError'
                    title: Upstream connection error
              examples:
                authentication:
                  summary: Authentication failure
                  value:
                    type: https://httpstatus.es/500
                    title: Internal Server Error
                    status: 500
                    detail: Authentication failed
                    instance: example-request-001
                    code: internal_error
                request:
                  summary: Request processing failure
                  value:
                    message: Internal Server Error
                ProxyConnectionError:
                  summary: Upstream connection failure
                  value:
                    error: Internal Server Error
                    message: Error connecting to voice agent service
            application/problem+json:
              schema:
                $ref: '#/components/schemas/VoiceProblem'
                title: Voice service error
              example:
                type: https://api.karta.com/problems/internal-server-error
                title: Internal Server Error
                status: 500
                detail: An internal server error occurred
                instance: /voice/public/v1/campaigns
                trace_id: example-request-001
components:
  schemas:
    CampaignPage:
      type: object
      properties:
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/CampaignSummary'
        next_token:
          type:
            - string
            - 'null'
          description: Opaque cursor; pass unchanged in the next request.
    AuthProblem:
      type: object
      properties:
        type:
          type: string
          description: Identifier for this error category.
        title:
          type: string
          description: Short summary of the error.
        status:
          type: integer
          description: HTTP status code for this response.
        detail:
          type: string
          description: Explanation of the failure.
        instance:
          type: string
          description: Request identifier.
        code:
          type: string
          description: Machine-readable error code.
      title: Authentication or account configuration error
    RequestProcessingError:
      title: Request processing error
      type: object
      properties:
        message:
          type: string
          description: Description of the request-processing failure.
        errors:
          type: array
          items:
            additionalProperties: true
            type: object
          description: Additional error details, when supplied.
    VoiceProblem:
      type: object
      properties:
        type:
          type: string
          description: Identifier for this error category.
        title:
          type: string
          description: Short summary of the error.
        status:
          type: integer
          description: HTTP status code for this response.
        detail:
          type: string
          description: Explanation of the failure.
        instance:
          type: string
          description: Request path.
        trace_id:
          type: string
          description: Request identifier for support and troubleshooting.
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
              type:
                type: string
      title: Voice service error
    ProxyConnectionError:
      title: Upstream connection error
      type: object
      properties:
        error:
          type: string
          enum:
            - Internal Server Error
          description: Machine-readable error code.
        message:
          type: string
          description: Explanation of the failure.
    CampaignSummary:
      type: object
      properties:
        campaign_id:
          type:
            - string
            - 'null'
        campaign_name:
          type:
            - string
            - 'null'
        agent_id:
          type:
            - string
            - 'null'
        from_number:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
        total_numbers:
          type:
            - integer
            - 'null'
        failed_numbers:
          type:
            - integer
            - 'null'
        queued_numbers:
          type:
            - integer
            - 'null'
        in_progress:
          type:
            - integer
            - 'null'
        created_at:
          type:
            - integer
            - 'null'
          description: Unix timestamp in seconds, when present.
        updated_at:
          type:
            - integer
            - 'null'
          description: Unix timestamp in seconds, when present.
  securitySchemes:
    BearerApiKey:
      type: http
      scheme: bearer
      description: 'API key in the format: Bearer YOUR_KARTA_API_KEY.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.