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

# Calls API

> API endpoints for retrieving and managing call logs

# Overview

The Call API provides endpoints for retrieving and managing call logs within your organizations. These endpoints can be accessed using either a tenant-specific API key or an organization-specific API key. In both cases, you must provide the organization ID in your request as a query parameter.

## Available Endpoints

<CardGroup cols={2}>
  <Card title="List Calls" icon="list" href="/api-reference/endpoint/list-calls">
    Retrieve a paginated list of call logs for a specific organization
  </Card>

  <Card title="Get Call" icon="phone" href="/api-reference/endpoint/get-call">
    Retrieve details for a specific call by ID
  </Card>
</CardGroup>

## Authentication

All Call API endpoints require authentication using either a tenant-specific API key or an organization-specific API key in the format:

```
Authorization: Bearer YOUR-API-KEY
```

### Important Notes

* **Tenant API Key**: Provides access to call logs across all organizations under the tenant, but you must still specify the organization ID in each request
* **Organization API Key**: Only provides access to call logs for the specific organization that the key belongs to, and you must still include the organization ID in the request

Regardless of which API key you use, the organization ID must be provided as a query parameter (for List Calls) or in the URL path (for Get Call).

For more information on authentication, see the [Authentication guide](/api-reference/authentication).

## Data Structures

### Call Object

| Field               | Type              | Description                                     |
| ------------------- | ----------------- | ----------------------------------------------- |
| id                  | string            | Unique identifier for the call                  |
| organizationId      | string            | Organization ID the call belongs to             |
| callType            | string            | Type of call: "Inbound", "Outbound", or "Web"   |
| agentId             | string            | ID of the agent/assistant that handled the call |
| agentName           | string            | Name of the agent/assistant                     |
| phoneNumber         | string            | Phone number associated with the call           |
| callStartedAt       | string (datetime) | Timestamp when the call started                 |
| callEndedAt         | string (datetime) | Timestamp when the call ended                   |
| callDurationSeconds | string            | Duration of the call in seconds                 |
| callEndedReason     | string            | Reason the call ended                           |
| userName            | string            | Name of the user/patient (if available)         |
| userPhoneNumber     | string            | Phone number of the user (if available)         |
| userPrimaryIntent   | string            | Primary intent detected from the call           |
| userSentiment       | string            | Detected sentiment of the user during the call  |
| callSummary         | string            | AI-generated summary of the call (if available) |
| transcriptUrl       | string            | URL to access the full transcript               |
| recordingUrl        | string            | URL to the call recording (if available)        |
| createdAt           | string (datetime) | When the call record was created                |
