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

# Get Summary

> Retrieve the status and result of a summary job

Retrieve the status and result of a summary job. Poll this endpoint until status is `completed` or `failed`, or use webhooks for real-time notifications.

## Authentication

Requires an [API key](/authentication) with `summaries:read` scope.

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.bota.dev/v1/summaries/sum_abc123 \
    -H "Authorization: Bearer sk_live_..."
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bota.dev/v1/summaries/sum_abc123', {
    headers: {
      'Authorization': 'Bearer sk_live_...',
    },
  });

  const summary = await response.json();

  if (summary.status === 'completed') {
    console.log(summary.output);
  }
  ```

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

  response = requests.get(
      'https://api.bota.dev/v1/summaries/sum_abc123',
      headers={'Authorization': 'Bearer sk_live_...'},
  )

  summary = response.json()

  if summary['status'] == 'completed':
      print(summary['output'])
  ```
</RequestExample>

## Path Parameters

<ParamField path="id" type="string" required>
  The summary's unique identifier (e.g., `sum_abc123`).
</ParamField>

## Response

Returns the summary object including its current status and, when completed, the structured output.

<ResponseExample>
  ```json 200 (pending) theme={null}
  {
    "id": "sum_abc123",
    "project_id": "proj_xyz",
    "transcription_id": "txn_def456",
    "status": "pending",
    "template_id": "tmpl_sales_call",
    "provider": "gemini",
    "custom_prompt": null,
    "output": null,
    "error_message": null,
    "started_at": null,
    "completed_at": null,
    "created_at": "2025-01-15T10:20:00Z",
    "updated_at": "2025-01-15T10:20:00Z"
  }
  ```

  ```json 200 (completed) theme={null}
  {
    "id": "sum_abc123",
    "project_id": "proj_xyz",
    "transcription_id": "txn_def456",
    "status": "completed",
    "template_id": "tmpl_sales_call",
    "provider": "gemini",
    "custom_prompt": null,
    "output": {
      "pain_points": [
        "Current solution requires too much manual data entry",
        "Integration with existing CRM is limited"
      ],
      "budget": "Mentioned budget range of $50-100k annually",
      "timeline": "Q2 2025 implementation target",
      "next_steps": [
        "Send product demo recording",
        "Schedule follow-up call with technical team",
        "Prepare custom pricing proposal"
      ],
      "key_quotes": [
        {"quote": "We need something that just works out of the box", "context": "Discussing ease of use requirements"},
        {"quote": "Our team is spending 2 hours daily on manual entry", "context": "Pain point discussion"}
      ],
      "sentiment": "positive",
      "deal_probability": 75
    },
    "error_message": null,
    "started_at": "2025-01-15T10:20:01Z",
    "completed_at": "2025-01-15T10:20:30Z",
    "created_at": "2025-01-15T10:20:00Z",
    "updated_at": "2025-01-15T10:20:30Z"
  }
  ```

  ```json 200 (custom prompt) theme={null}
  {
    "id": "sum_def456",
    "project_id": "proj_xyz",
    "transcription_id": "txn_abc123",
    "status": "completed",
    "template_id": null,
    "provider": "claude",
    "custom_prompt": "Extract all technical requirements and action items",
    "output": {
      "summary": "The team discussed three main technical requirements..."
    },
    "error_message": null,
    "started_at": "2025-01-15T10:25:01Z",
    "completed_at": "2025-01-15T10:25:15Z",
    "created_at": "2025-01-15T10:25:00Z",
    "updated_at": "2025-01-15T10:25:15Z"
  }
  ```

  ```json 200 (failed) theme={null}
  {
    "id": "sum_abc123",
    "project_id": "proj_xyz",
    "transcription_id": "txn_def456",
    "status": "failed",
    "template_id": "tmpl_sales_call",
    "provider": "gemini",
    "custom_prompt": null,
    "output": null,
    "error_message": "Transcript is too short to generate a meaningful summary",
    "started_at": "2025-01-15T10:20:01Z",
    "completed_at": "2025-01-15T10:20:05Z",
    "created_at": "2025-01-15T10:20:00Z",
    "updated_at": "2025-01-15T10:20:05Z"
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "not_found",
      "message": "Summary not found"
    }
  }
  ```
</ResponseExample>

## Response Fields

| Field              | Type           | Description                                                       |
| ------------------ | -------------- | ----------------------------------------------------------------- |
| `id`               | string         | The summary's unique identifier (e.g., `sum_abc123`)              |
| `project_id`       | string         | The project this summary belongs to                               |
| `transcription_id` | string         | The transcription this summary was generated from                 |
| `status`           | string         | Current status: `pending`, `processing`, `completed`, or `failed` |
| `template_id`      | string \| null | The template used, if any                                         |
| `provider`         | string         | LLM provider used (e.g., `gemini`, `openai`, `claude`)            |
| `custom_prompt`    | string \| null | The custom prompt used, if any                                    |
| `output`           | object \| null | Structured summary output (populated on completion)               |
| `error_message`    | string \| null | Error message if the summary failed                               |
| `started_at`       | string \| null | ISO 8601 timestamp when processing started                        |
| `completed_at`     | string \| null | ISO 8601 timestamp when the summary completed or failed           |
| `created_at`       | string         | ISO 8601 timestamp when the summary was created                   |
| `updated_at`       | string         | ISO 8601 timestamp when the summary was last updated              |

## Output by Template

The `output` field structure varies by template:

### `tmpl_general_notes`

```json theme={null}
{
  "key_points": ["string"],
  "action_items": ["string"],
  "participants": ["string"],
  "decisions": ["string"],
  "overview": "string"
}
```

### `tmpl_sales_call`

```json theme={null}
{
  "pain_points": ["string"],
  "budget": "string | null",
  "timeline": "string | null",
  "next_steps": ["string"],
  "key_quotes": [{"quote": "string", "context": "string"}],
  "sentiment": "positive | neutral | negative",
  "deal_probability": "number | null"
}
```

### `tmpl_clinical_soap`

```json theme={null}
{
  "chief_complaint": "string",
  "subjective": "string",
  "objective": "string",
  "assessment": "string",
  "plan": "string",
  "medications_mentioned": ["string"],
  "follow_up": "string | null"
}
```

### `tmpl_legal_memo`

```json theme={null}
{
  "facts": ["string"],
  "issues": ["string"],
  "analysis": "string",
  "conclusion": "string",
  "parties_involved": ["string"],
  "key_dates": [{"date": "string", "event": "string"}]
}
```

## Error Codes

| Code                   | Description                           |
| :--------------------- | :------------------------------------ |
| `transcript_too_short` | Transcript is too short to summarize  |
| `template_not_found`   | Specified template\_id does not exist |
| `processing_error`     | Internal processing error             |
