Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt

Use this file to discover all available pages before exploring further.

Use Vapi through Corsair: one client, typed API calls, optional local DB sync, and incoming webhooks documented below. What you get:
  • 34 typed API operations
  • 7 database entities synced for fast .search() / .list() queries
  • 6 incoming webhook event types

Setup

1

Install

pnpm install @corsair-dev/vapi
2

Add the plugin

corsair.ts
import { createCorsair } from 'corsair';
import { vapi } from '@corsair-dev/vapi';

export const corsair = createCorsair({
	// ... other config options,
	multiTenancy: false,
    plugins: [vapi()],
});
3

Get credentials

Follow Get Credentials if you need help getting keys.
4

Store credentials

pnpm corsair setup --plugin=vapi
Use the key names documented in Get Credentials (for example api_key= or webhook_signature=).

Authentication

Each tab shows how to register the plugin for that authentication method. The default authType from the plugin does not need to appear in the factory call.
corsair.ts
vapi()
Store credentials with pnpm corsair setup --plugin=vapi (see Get Credentials for field names).More: API Key

Webhooks

This plugin registers 6 webhook handler(s). Configure your provider to POST events to your Corsair HTTP endpoint, then use webhookHooks in the plugin factory for custom logic. See Webhooks for every event path and payload shape, and Webhooks concept for how to set up routing.

Query synced data

Synced entities support corsair.vapi.db.<entity>.search() and .list(). See Database for filters and operators.

Example API calls

Read-style (read): assistants.get
await corsair.vapi.api.assistants.get({});
Write-style (write): assistants.create
await corsair.vapi.api.assistants.create({});
See the full list on the API page. Use pnpm corsair list --plugin=vapi and pnpm corsair schema <path> locally to inspect schemas.

Hooks

Use hooks on API calls and webhookHooks on incoming events to add logging, approvals, or side effects. See Hooks and the Webhooks page for payload types.

Reference

TopicLink
APIAPI
DatabaseDatabase
WebhooksWebhooks
CredentialsGet credentials