Skip to content

Commit 11d37e0

Browse files
VAP-9247 Add Recording Consent docs (#709)
1 parent 7321d36 commit 11d37e0

File tree

2 files changed

+329
-0
lines changed

2 files changed

+329
-0
lines changed

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ navigation:
641641
contents:
642642
- page: JWT authentication
643643
path: customization/jwt-authentication.mdx
644+
- page: Recording consent plan
645+
path: security-and-privacy/recording-consent-plan.mdx
644646
- page: GDPR compliance
645647
path: security-and-privacy/GDPR.mdx
646648
- page: HIPAA compliance
Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
---
2+
title: Recording consent plan
3+
subtitle: Configure consent management for call recording compliance
4+
slug: security-and-privacy/recording-consent-plan
5+
description: Learn how to configure recording consent plans to ensure compliance with privacy laws and regulations
6+
---
7+
8+
<Warning>
9+
**Enterprise Feature**: Recording consent plans are only available for
10+
Enterprise customers. Contact your account manager or [sales
11+
team](https://form.typeform.com/to/iOcCsqVP?typeform-source=vapi.ai) to enable
12+
this feature.
13+
</Warning>
14+
15+
## Overview
16+
17+
The recording consent plan feature automatically creates a consent assistant that asks users for permission to record calls before transferring them to your main assistant. Call recording only begins after consent is granted, ensuring compliance with privacy laws and regulations across different jurisdictions.
18+
19+
**Recording consent plans enable you to:**
20+
21+
- Automatically request recording consent before each call
22+
- Handle consent through two different interaction patterns
23+
- Ensure compliance with privacy regulations (GDPR, CCPA, etc.)
24+
- Maintain audit trails of consent decisions while ensuring privacy during the consent process
25+
26+
**How it works:**
27+
28+
1. A consent assistant is automatically created and placed first in the call flow
29+
2. Users interact with the consent assistant to grant or deny recording permission
30+
3. If consent is granted, the call transfers to your original assistant
31+
4. If consent is denied, the call ends or transfers based on your configuration
32+
33+
## Consent Types
34+
35+
Vapi supports two types of recording consent plans, each designed for different use cases and legal requirements.
36+
37+
### Stay-on-Line Consent
38+
39+
This type assumes consent is granted if the user remains on the call after hearing the consent message. It's commonly used for customer service scenarios where staying on the line implies agreement.
40+
41+
**Best practices for stay-on-line messages:**
42+
43+
- Clearly state that staying on the line implies consent
44+
- Mention the purpose of recording (quality, training, etc.)
45+
- Provide clear instructions to hang up if they don't consent
46+
47+
**Example message:**
48+
49+
```
50+
"For quality and training purposes, this call may be recorded. Please stay on the line if you agree to being recorded, or hang up if you do not consent."
51+
```
52+
53+
### Verbal Consent
54+
55+
This type requires explicit verbal consent from the user. The AI assistant will ask for clear confirmation and continue asking until the user provides explicit consent or declines.
56+
57+
**Best practices for verbal consent messages:**
58+
59+
- Ask for explicit verbal confirmation
60+
- Use clear yes/no language
61+
- Explain what happens if they decline
62+
63+
**Example message:**
64+
65+
```
66+
"This call may be recorded for quality and training purposes. Do you agree to being recorded? Please say 'yes' if you agree or 'no' if you decline."
67+
```
68+
69+
## Configuration
70+
71+
Add the recording consent plan to your assistant's `compliancePlan`:
72+
73+
### Basic Stay-on-Line Configuration
74+
75+
```json
76+
{
77+
"compliancePlan": {
78+
"recordingConsentPlan": {
79+
"type": "stay-on-line",
80+
"message": "For quality and training purposes, this call may be recorded. Please stay on the line if you agree to being recorded, or hang up if you do not consent.",
81+
"voice": {
82+
"voiceId": "Neha",
83+
"provider": "vapi"
84+
},
85+
"waitSeconds": 3
86+
}
87+
}
88+
}
89+
```
90+
91+
### Basic Verbal Consent Configuration
92+
93+
```json
94+
{
95+
"compliancePlan": {
96+
"recordingConsentPlan": {
97+
"type": "verbal",
98+
"message": "This call may be recorded for quality and training purposes. Do you agree to being recorded? Please say 'yes' if you agree or 'no' if you decline.",
99+
"voice": {
100+
"voiceId": "Neha",
101+
"provider": "vapi"
102+
},
103+
"declineToolId": "09dd39cc-75f0-45eb-ace3-796ee3aa9c1e"
104+
}
105+
}
106+
}
107+
```
108+
109+
## End-of-Call Report Structure
110+
111+
When you add a recording consent plan to your assistant, the compliance data will be included in the end-of-call-report webhook. Here's what the compliance section looks like in the webhook payload:
112+
113+
### Successful Consent Webhook
114+
115+
```json
116+
{
117+
"message": {
118+
"type": "end-of-call-report",
119+
"analysis": {
120+
/* call analysis data */
121+
},
122+
"artifact": {
123+
/* call artifacts */
124+
},
125+
"startedAt": "2024-01-15T10:25:00Z",
126+
"endedAt": "2024-01-15T10:35:00Z",
127+
"endedReason": "assistantEndedCall",
128+
"cost": 0.15,
129+
"compliance": {
130+
"recordingConsent": {
131+
"type": "verbal",
132+
"grantedAt": "2024-01-15T10:30:00Z"
133+
}
134+
},
135+
"transcript": "/* call transcript */",
136+
"recordingUrl": "https://...",
137+
"stereoRecordingUrl": "https://..."
138+
}
139+
}
140+
```
141+
142+
### No Consent Webhook
143+
144+
```json
145+
{
146+
"message": {
147+
"type": "end-of-call-report",
148+
"analysis": {
149+
/* call analysis data */
150+
},
151+
"artifact": {
152+
/* call artifacts */
153+
},
154+
"startedAt": "2024-01-15T10:25:00Z",
155+
"endedAt": "2024-01-15T10:30:00Z",
156+
"endedReason": "assistantEndedCall",
157+
"cost": 0.1,
158+
"compliance": {
159+
"recordingConsent": {
160+
"type": "verbal"
161+
}
162+
},
163+
"transcript": "/* call transcript */"
164+
}
165+
}
166+
```
167+
168+
**Key points about the webhook structure:**
169+
170+
- **`recordingConsent` field**: Always present in the `compliance` object when a consent plan is configured
171+
- **`type`**: Shows which consent type was used (`"verbal"` or `"stay-on-line"`)
172+
- **`grantedAt`**: Only set when the user explicitly grants permission
173+
- **Missing `grantedAt`**: Indicates the user declined consent or hung up before granting permission
174+
175+
This webhook structure allows you to easily determine whether recording consent was granted and audit compliance decisions for each call. The compliance data is sent as part of the end-of-call-report webhook, which includes all call details, analysis, and compliance information.
176+
177+
## Implementation
178+
179+
<Steps>
180+
<Step title="Configure Your Assistant">
181+
Add the recording consent plan to your assistant's compliance plan configuration.
182+
183+
<Tabs>
184+
<Tab title="Dashboard">
185+
1. Navigate to **Assistants** in your Vapi dashboard
186+
2. Create a new assistant or edit an existing one
187+
3. Go to the **Compliance** section
188+
4. Enable **Recording Consent Plan**
189+
5. Choose your consent type (Stay-on-Line or Verbal)
190+
6. Enter your consent message
191+
7. Configure additional options (voice, decline tool, etc.)
192+
8. Save your assistant
193+
</Tab>
194+
<Tab title="TypeScript (Server SDK)">
195+
```typescript
196+
import { VapiClient } from "@vapi-ai/server-sdk";
197+
198+
const client = new VapiClient({ token: process.env.VAPI_API_KEY });
199+
200+
const assistant = await client.assistants.create({
201+
name: "Customer Support Assistant",
202+
model: {
203+
provider: "openai",
204+
model: "gpt-4o"
205+
},
206+
voice: {
207+
provider: "11labs",
208+
voiceId: "sarah"
209+
},
210+
compliancePlan: {
211+
recordingConsentPlan: {
212+
type: "verbal",
213+
message: "This call may be recorded for quality and training purposes. Do you agree to being recorded? Please say 'yes' if you agree or 'no' if you decline.",
214+
declineTool: {
215+
type: "endCall"
216+
}
217+
}
218+
}
219+
});
220+
```
221+
</Tab>
222+
</Tabs>
223+
224+
</Step>
225+
226+
<Step title="Test Your Configuration">
227+
Create a test call to verify your consent flow works correctly.
228+
229+
<Tabs>
230+
<Tab title="Dashboard">
231+
1. Go to your assistant's page
232+
2. Click **Test Call**
233+
3. Verify the consent message plays correctly
234+
4. Test both consent and decline scenarios
235+
5. Check that the call transfers properly after consent
236+
</Tab>
237+
<Tab title="API">
238+
```typescript
239+
// Create a test call
240+
const call = await client.calls.create({
241+
assistantId: assistant.id,
242+
phoneNumberId: "your-phone-number-id"
243+
});
244+
245+
// Monitor the call to verify consent flow
246+
console.log("Call created:", call.id);
247+
```
248+
</Tab>
249+
</Tabs>
250+
251+
</Step>
252+
253+
<Step title="Monitor Consent Decisions">
254+
Check your call logs to verify consent decisions are being recorded correctly.
255+
256+
```typescript
257+
// Get call details to check consent status
258+
const call = await client.calls.get(callId);
259+
260+
if (call.compliance?.recordingConsent?.grantedAt) {
261+
console.log("Consent granted at:", call.compliance.recordingConsent.grantedAt);
262+
console.log("Consent type:", call.compliance.recordingConsent.type);
263+
} else {
264+
console.log("No consent was granted for this call");
265+
}
266+
```
267+
268+
</Step>
269+
</Steps>
270+
271+
## Decline Tool Options
272+
273+
When users decline recording consent, you can configure different actions using decline tools:
274+
275+
For detailed information about these tools, see:
276+
277+
- **[Handoff Tool](/tools/handoff)** - Transfer to other assistants
278+
- **[Default Tools](/tools/default-tools)** - Transfer calls and end calls
279+
280+
## Best Practices
281+
282+
### Message Design
283+
284+
- **Stay-on-Line**: Clearly state that staying implies consent
285+
- **Verbal**: Ask for explicit confirmation with clear yes/no options
286+
- **Length**: Keep messages concise but comprehensive
287+
- **Tone**: Use professional, clear language appropriate for your industry
288+
289+
### Voice Selection
290+
291+
- Use a different voice for consent messages to create distinction
292+
- Choose voices that match your brand and industry requirements
293+
- Consider using more formal voices for compliance scenarios
294+
295+
### Decline Handling
296+
297+
- **End Call**: Use when you cannot provide service without recording
298+
- **Transfer**: Use when you have alternative service options
299+
- **Handoff**: Use when you have non-recording assistants available
300+
301+
### Testing
302+
303+
- Test both consent and decline scenarios thoroughly
304+
- Verify timing works correctly for your use case
305+
- Check that decline tools execute properly
306+
- Monitor call logs to ensure compliance data is recorded
307+
308+
## Troubleshooting
309+
310+
**Users not hearing consent message**
311+
312+
- Verify the consent message is not empty
313+
- Check that the voice configuration is valid
314+
- Test with different voice providers if needed
315+
316+
**Decline tool not executing**
317+
318+
- Verify the decline tool configuration is valid
319+
- Check that referenced assistants or phone numbers exist
320+
- Ensure the tool type matches your intended action
321+
322+
## Next Steps
323+
324+
- **[Call Recording](/assistants/call-recording)** - Learn about technical recording implementation
325+
- **[Handoff Tool](/tools/handoff)** - Transfer between assistants
326+
- **[Default Tools](/tools/default-tools)** - Transfer calls and end calls
327+
- **[API Reference](/api-reference/assistants/create)** - Explore assistant configuration options

0 commit comments

Comments
 (0)