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

# List Campaigns

> List all campaigns for the authenticated user.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.thinnest.ai/campaigns \
    -H "Authorization: Bearer $THINNESTAI_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.thinnest.ai/campaigns"
  headers = {
      "Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.thinnest.ai/campaigns", {
    method: "GET",
    headers: {
      "Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
      "fmt"
      "io"
      "net/http"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://api.thinnest.ai/campaigns", nil)
      req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")

      resp, err := http.DefaultClient.Do(req)
      if err != nil { panic(err) }
      defer resp.Body.Close()
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</RequestExample>

***

## Query Parameters

<ParamField query="status" type="string" default="All">
  Filter by: draft, running, paused, completed, failed
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Maximum number of campaigns to return
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Pagination offset
</ParamField>

***

## Response `200`

<ResponseExample>
  ```json 200 theme={null}
  {
    "campaigns": [
      {
        "id": "camp_a1b2c3d4",
        "name": "Follow-up Campaign",
        "status": "running",
        "type": "voice",
        "agent_id": "ag_c47e7c97_b2f2",
        "total_contacts": 150,
        "completed": 45,
        "failed": 3,
        "created_at": "2026-03-07T14:00:00Z"
      }
    ],
    "total": 1
  }
  ```
</ResponseExample>

### Response Fields

<ResponseField name="campaigns[].id" type="string">
  Campaign ID
</ResponseField>

<ResponseField name="campaigns[].name" type="string">
  Campaign name
</ResponseField>

<ResponseField name="campaigns[].status" type="string">
  draft, running, paused, completed, failed
</ResponseField>

<ResponseField name="campaigns[].type" type="string">
  voice or sms
</ResponseField>

<ResponseField name="campaigns[].total_contacts" type="integer">
  Total contacts in the campaign
</ResponseField>

<ResponseField name="campaigns[].completed" type="integer">
  Successfully reached contacts
</ResponseField>

<ResponseField name="campaigns[].failed" type="integer">
  Failed contact attempts
</ResponseField>

***

## Errors

| Code  | Description                       |
| ----- | --------------------------------- |
| `401` | Missing or invalid authentication |


## OpenAPI

````yaml GET /campaigns
openapi: 3.1.0
info:
  title: ThinnestAI API
  description: REST API for ThinnestAI — build, deploy, and manage AI agents.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Agents
    description: Create, configure, and manage AI agents
  - name: Chat
    description: Send messages and get AI responses from agents
  - name: Knowledge
    description: Upload files, URLs, and text to agent knowledge bases
  - name: Sessions
    description: View and manage chat sessions and message history
  - name: Voice
    description: Start and manage voice call sessions
  - name: Recordings
    description: Manage voice call recordings
  - name: Campaigns
    description: Create and run automated outreach campaigns
  - name: Webhooks
    description: Register webhook endpoints for real-time event notifications
  - name: Evaluations
    description: Run and track agent evaluation benchmarks
  - name: Analytics
    description: Query agent performance metrics and usage data
  - name: Agent Tools
    description: View and manage tools attached to agents
  - name: BYOK
    description: >-
      Bring Your Own Key — manage credentials for LLM/STT/TTS providers,
      telephony BYOK (Vobiz/Twilio/Plivo/Exotel/Telnyx), and tool-specific BYOK
      (Razorpay UPI Payment, Surepass Aadhaar eKYC)
paths:
  /campaigns:
    get:
      tags:
        - Campaigns
      summary: List Campaigns
      description: List all campaigns for the current user.
      operationId: list_campaigns_campaigns_get
      parameters:
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: channel
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Channel
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````