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

# Get Campaign

> Retrieve detailed information about a specific campaign including calls and files

# Get Campaign

Retrieve detailed information about a specific campaign, including its configuration, associated calls, uploaded files, and performance statistics.

## Endpoint

```
GET /api/v1/campaigns/{campaign_id}
```

## Path parameters

<ParamField path="campaign" type="string" required>
  The unique identifier of the campaign.
</ParamField>

## Request headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer talq_your_environment_token_here`
</ParamField>

## Example requests

<RequestExample>
  ```bash theme={null}
  # Request 1: Get campaign details
  curl -X GET "https://app.talkover.ai/api/v1/campaigns/campaign-uuid-1" \
    -H "Authorization: Bearer talq_your_environment_token_here"
  ```

  ```javascript theme={null}
  // Request 1: Get campaign details
  const response = await fetch('https://app.talkover.ai/api/v1/campaigns/campaign-uuid-1', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer talq_your_environment_token_here'
    }
  });

  const result = await response.json();
  console.log(result);
  ```
</RequestExample>

<RequestExample>
  ```bash theme={null}
  # Request 2: Get campaign with specific ID
  curl -X GET "https://app.talkover.ai/api/v1/campaigns/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer talq_your_environment_token_here"
  ```

  ```javascript theme={null}
  // Request 2: Get campaign with specific ID
  const campaign_id = '550e8400-e29b-41d4-a716-446655440000';
  const response = await fetch(`https://app.talkover.ai/api/v1/campaigns/${campaign_id}`, {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer talq_your_environment_token_here'
    }
  });

  const result = await response.json();
  console.log(result);
  ```
</RequestExample>

## Response

### Success Response (200 OK)

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "id": "campaign-uuid-1",
      "name": "Sales Campaign",
      "description": "Outbound sales campaign for Q1",
      "status": "active",
      "campaign_type": "sales",
      "start_date": "2024-01-01",
      "days_of_week": [1, 2, 3, 4, 5],
      "earliest_call_time": "09:00:00",
      "latest_call_time": "17:00:00",
      "timezone": "America/New_York",
      "agent_id": "agent-uuid-1",
      "initial_call_delay": 0,
      "max_retries": 3,
      "retry_cooldown_hours": 24,
      "enable_post_completion_cooldown": true,
      "post_completion_cooldown_hours": 168,
      "success_cooldown_hours": 168,
      "voicemail_cooldown_hours": 24,
      "no_answer_cooldown_hours": 24,
      "busy_cooldown_hours": 24,
      "failed_cooldown_hours": 24,
      "do_not_call_enabled": true,
      "do_not_call_list_source": "environment",
      "auto_add_to_dnc_enabled": true,
      "auto_dnc_trigger_statuses": ["completed", "voicemail"],
      "auto_dnc_trigger_errors": ["invalid_number", "disconnected"],
      "agent": {
        "id": "agent-uuid-1",
        "name": "Sales Agent",
        "label": "Sales Agent Label"
      },
      "calls": [
        {
          "id": "call-uuid-1",
          "to": "+1234567890",
          "status": "completed",
          "retries": 0,
          "created_at": "2024-01-01T00:00:00Z"
        },
        {
          "id": "call-uuid-2",
          "to": "+1987654321",
          "status": "failed",
          "retries": 1,
          "created_at": "2024-01-01T01:00:00Z"
        }
      ],
      "files": [
        {
          "id": "file-uuid-1",
          "original_filename": "contacts.csv",
          "processed_filename": "processed_contacts.csv",
          "status": "processed",
          "total_records": 1000,
          "processed_records": 950
        },
        {
          "id": "file-uuid-2",
          "original_filename": "leads.xlsx",
          "processed_filename": "processed_leads.csv",
          "status": "processing",
          "total_records": 500,
          "processed_records": 0
        }
      ],
      "stats": {
        "total_calls": 100,
        "completed_calls": 80,
        "failed_calls": 20,
        "success_rate": 80.0,
        "average_duration": 120
      },
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  }
  ```
</ResponseExample>

### Response fields

<ResponseField name="success" type="boolean" required>
  Indicates if the operation was successful.
</ResponseField>

<ResponseField name="data" type="object" required>
  Campaign details object.

  <Expandable title="Campaign Object">
    <ResponseField name="id" type="string" required>
      Unique identifier for the campaign.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Name of the campaign.
    </ResponseField>

    <ResponseField name="description" type="string">
      Description of the campaign.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Current status of the campaign. Options: `draft`, `active`, `paused`, `completed`, `cancelled`.
    </ResponseField>

    <ResponseField name="campaign_type" type="string" required>
      Type of campaign. Options: `sales`, `follow_up`, `reminder`, `custom`.
    </ResponseField>

    <ResponseField name="start_date" type="string" required>
      Campaign start date (YYYY-MM-DD).
    </ResponseField>

    <ResponseField name="days_of_week" type="array" required>
      Array of days when calls can be made (1=Monday, 7=Sunday).
    </ResponseField>

    <ResponseField name="earliest_call_time" type="string" required>
      Earliest time to make calls (HH:MM:SS).
    </ResponseField>

    <ResponseField name="latest_call_time" type="string" required>
      Latest time to make calls (HH:MM:SS).
    </ResponseField>

    <ResponseField name="timezone" type="string" required>
      Timezone for call scheduling.
    </ResponseField>

    <ResponseField name="agent_id" type="string" required>
      UUID of the agent assigned to the campaign.
    </ResponseField>

    <ResponseField name="initial_call_delay" type="integer" required>
      Initial delay before making calls (seconds).
    </ResponseField>

    <ResponseField name="max_retries" type="integer" required>
      Maximum number of retry attempts.
    </ResponseField>

    <ResponseField name="retry_cooldown_hours" type="integer" required>
      Hours to wait between retry attempts.
    </ResponseField>

    <ResponseField name="enable_post_completion_cooldown" type="boolean" required>
      Whether post-completion cooldown is enabled.
    </ResponseField>

    <ResponseField name="post_completion_cooldown_hours" type="integer" required>
      Hours to wait after campaign completion.
    </ResponseField>

    <ResponseField name="success_cooldown_hours" type="integer" required>
      Hours to wait after successful calls.
    </ResponseField>

    <ResponseField name="voicemail_cooldown_hours" type="integer" required>
      Hours to wait after voicemail calls.
    </ResponseField>

    <ResponseField name="no_answer_cooldown_hours" type="integer" required>
      Hours to wait after no-answer calls.
    </ResponseField>

    <ResponseField name="busy_cooldown_hours" type="integer" required>
      Hours to wait after busy calls.
    </ResponseField>

    <ResponseField name="failed_cooldown_hours" type="integer" required>
      Hours to wait after failed calls.
    </ResponseField>

    <ResponseField name="do_not_call_enabled" type="boolean" required>
      Whether do-not-call list checking is enabled.
    </ResponseField>

    <ResponseField name="do_not_call_list_source" type="string" required>
      Source of do-not-call list. Options: `environment`, `campaign`.
    </ResponseField>

    <ResponseField name="auto_add_to_dnc_enabled" type="boolean" required>
      Whether to automatically add numbers to do-not-call list.
    </ResponseField>

    <ResponseField name="auto_dnc_trigger_statuses" type="array" required>
      Call statuses that trigger auto-add to DNC.
    </ResponseField>

    <ResponseField name="auto_dnc_trigger_errors" type="array" required>
      Call errors that trigger auto-add to DNC.
    </ResponseField>

    <ResponseField name="agent" type="object" required>
      Agent information assigned to the campaign.

      <Expandable title="Agent Object">
        <ResponseField name="id" type="string" required>
          Unique identifier for the agent.
        </ResponseField>

        <ResponseField name="name" type="string" required>
          Name of the agent.
        </ResponseField>

        <ResponseField name="label" type="string" required>
          Display label for the agent.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="calls" type="array" required>
      Array of calls associated with this campaign.

      <Expandable title="Call Object">
        <ResponseField name="id" type="string" required>
          Unique identifier for the call.
        </ResponseField>

        <ResponseField name="to" type="string" required>
          Destination phone number.
        </ResponseField>

        <ResponseField name="status" type="string" required>
          Status of the call.
        </ResponseField>

        <ResponseField name="retries" type="integer" required>
          Number of retry attempts made.
        </ResponseField>

        <ResponseField name="created_at" type="string" required>
          ISO 8601 timestamp when the call was created.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="files" type="array" required>
      Array of files uploaded to this campaign.

      <Expandable title="File Object">
        <ResponseField name="id" type="string" required>
          Unique identifier for the file.
        </ResponseField>

        <ResponseField name="original_filename" type="string" required>
          Original filename as uploaded.
        </ResponseField>

        <ResponseField name="processed_filename" type="string" required>
          Processed filename after conversion.
        </ResponseField>

        <ResponseField name="status" type="string" required>
          Processing status. Options: `uploading`, `processing`, `processed`, `failed`.
        </ResponseField>

        <ResponseField name="total_records" type="integer" required>
          Total number of records in the file.
        </ResponseField>

        <ResponseField name="processed_records" type="integer" required>
          Number of records successfully processed.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="stats" type="object" required>
      Campaign performance statistics.

      <Expandable title="Stats Object">
        <ResponseField name="total_calls" type="integer" required>
          Total number of calls in the campaign.
        </ResponseField>

        <ResponseField name="completed_calls" type="integer" required>
          Number of successfully completed calls.
        </ResponseField>

        <ResponseField name="failed_calls" type="integer" required>
          Number of failed calls.
        </ResponseField>

        <ResponseField name="success_rate" type="number" required>
          Success rate percentage.
        </ResponseField>

        <ResponseField name="average_duration" type="integer" required>
          Average call duration in seconds.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      ISO 8601 timestamp when the campaign was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string" required>
      ISO 8601 timestamp when the campaign was last updated.
    </ResponseField>
  </Expandable>
</ResponseField>

## Error responses

### 404 Not Found

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Campaign not found"
  }
  ```
</ResponseExample>

### 401 Unauthorized

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Unauthorized"
  }
  ```
</ResponseExample>

### 500 Server Error

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Internal server error."
  }
  ```
</ResponseExample>

## Error codes

| Code                 | Description                                | HTTP Status |
| -------------------- | ------------------------------------------ | ----------- |
| `CAMPAIGN_NOT_FOUND` | Specified campaign does not exist          | 404         |
| `INVALID_TOKEN`      | Authentication token is invalid or missing | 401         |
| `SERVER_ERROR`       | Internal server error occurred             | 500         |

## Important notes

<Info>
  **Complete data.** This endpoint returns complete campaign information including calls, files, and statistics.
</Info>

<Info>
  **Real-time statistics.** Campaign statistics are updated in real-time as calls are processed.
</Info>

<Info>
  **File processing status.** Monitor file uploads and processing status through the files array.
</Info>

<Info>
  **Call history.** View all calls associated with the campaign, including retry attempts.
</Info>

## Related endpoints

* **List Campaigns**: `GET /api/v1/campaigns`
* **Create Campaign**: `POST /api/v1/campaigns`
* **Update Campaign**: `PUT /api/v1/campaigns/{campaign_id}`
* **Update Campaign Status**: `PATCH /api/v1/campaigns/{campaign_id}/status`
* **Delete Campaign**: `DELETE /api/v1/campaigns/{campaign_id}`
* **Make Campaign Call**: `POST /api/v1/campaigns/{campaign_id}/call`
