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

# VAPI

> Sync VAPI assistants and analyze voice AI conversations

<Badge color="green">Live monitoring</Badge> <Badge color="green">Voice simulations</Badge> <Badge color="gray" stroke>Chat simulations</Badge>

## Overview

The VAPI integration enables comprehensive monitoring of your VAPI voice assistants. Sync historical calls, monitor live conversations, and automatically evaluate assistant performance using Roark's analytics platform.

***

## Prerequisites

Before setting up the integration, ensure you have:

* A VAPI account with active assistants
* VAPI API key (found in your VAPI dashboard)
* At least one configured assistant in VAPI

***

## Setup Instructions

### Step 1: Create Integration

1. Navigate to **Agents** in your Roark dashboard
2. Click **Connect Agent** in the top right, choose **Existing Platform**, and select **VAPI**
3. Enter your configuration:

| Field                | Description                        |
| :------------------- | :--------------------------------- |
| **Integration Name** | Friendly name for this integration |
| **API Key**          | Your VAPI API key                  |

The system will automatically validate your API key and fetch available assistants.

### Step 2: Configure Historical Sync

Choose how far back to import existing calls:

* **Default**: Last 90 days of call history
* **Custom**: Select a specific date range
* **Skip**: Only sync new calls going forward

<Note>
  Historical sync runs once during initial setup. Future calls are synced automatically via webhooks.
</Note>

### Step 3: Select Assistants

Choose which VAPI assistants to monitor:

* **All Assistants** - Sync calls from every assistant in your account
* **Selected Assistants** - Choose specific assistants to monitor

The assistant selector shows:

* Assistant name
* Assistant ID
* Last modified date

### Step 4: Configure Metric Collectors

Calls synced from VAPI are scored by your [metric collectors](/documentation/metrics/metric-collectors). Set them up globally under **Metrics → Collectors**, or scope collectors to a specific agent from that agent's **Collectors** section.

### Step 5: Activate Integration

Review your settings and click **Create Integration** to begin syncing.

***

## What Gets Synced

VAPI integrations sync comprehensive data:

* **Calls** - Complete conversation data and metadata
* **Assistants** - Assistant configurations and phone numbers
* **Prompts** - System prompts and instructions
* **Transcripts** - Full conversation transcripts with speaker labels
* **Tool Calls** - Function/tool invocations during conversations
* **Call Metadata** - Duration, status, participant information

***

## Webhook Configuration

Roark automatically configures webhooks with VAPI. The integration handles:

| Event          | Description    | Roark Action                         |
| :------------- | :------------- | :----------------------------------- |
| `call_started` | Call initiated | Create call record, begin monitoring |
| `call_ended`   | Call completed | Process transcript, run evaluations  |

The webhook URL is automatically registered with VAPI using your API key.

***

## Sync Management

### Initial Sync

During setup, Roark imports historical calls based on your selected date range:

* Processes calls in batches
* Shows sync progress in dashboard
* Handles large volumes efficiently

### Ongoing Sync

After initial setup:

* New calls sync automatically via webhooks
* Real-time processing of live calls
* Automatic retry on temporary failures

### Resume Sync

If sync is interrupted:

1. Go to integration settings
2. Click **Resume Sync**
3. Choose to continue from last position or restart

***

## Monitoring Integration Health

Track your integration status:

* **Syncing** 🔄 - Actively importing historical calls
* **Active** 🟢 - Receiving new calls via webhook
* **Paused** ⏸️ - Sync temporarily halted
* **Error** ⚠️ - Configuration or connection issues

View sync statistics:

* Total calls synced
* Last sync timestamp
* Sync progress percentage
* Recent webhook deliveries

***

## Assistant Management

Synced assistants appear in:

* **Simulation assistant selection** - Use for testing
* **Assistant performance reports** - Track metrics per assistant
* **Comparison dashboards** - Analyze across assistants

Assistant data updates automatically when modified in VAPI.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Enable Tracing" icon="git-branch" href="/documentation/observability/traces?tab=vapi">
    Traces sync automatically — see how to enable them
  </Card>

  <Card title="Run Simulations" icon="play" href="/documentation/simulation-testing/running-simulations">
    Test synced assistants
  </Card>

  <Card title="View Analytics" icon="chart-bar" href="/documentation/observability/reports">
    Analyze call performance
  </Card>

  <Card title="Integration Overview" icon="plug" href="/documentation/integrations/overview">
    Explore other integrations
  </Card>
</CardGroup>
