Skip to content

Commit 5551821

Browse files
feat: add consent docs
1 parent f22404f commit 5551821

File tree

2 files changed

+289
-0
lines changed

2 files changed

+289
-0
lines changed

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,8 @@ navigation:
636636
contents:
637637
- page: JWT authentication
638638
path: customization/jwt-authentication.mdx
639+
- page: Recording consent plan
640+
path: security-and-privacy/recording-consent-plan.mdx
639641
- page: GDPR compliance
640642
path: security-and-privacy/GDPR.mdx
641643
- page: HIPAA compliance
Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
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 consent 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": "Can I record you please?",
99+
"voice": {
100+
"voiceId": "Neha",
101+
"provider": "vapi"
102+
},
103+
"declineToolId": "09dd39cc-75f0-45eb-ace3-796ee3aa9c1e"
104+
}
105+
}
106+
}
107+
```
108+
109+
## Implementation
110+
111+
<Steps>
112+
<Step title="Configure Your Assistant">
113+
Add the recording consent plan to your assistant's compliance plan configuration.
114+
115+
<Tabs>
116+
<Tab title="Dashboard">
117+
1. Navigate to **Assistants** in your Vapi dashboard
118+
2. Create a new assistant or edit an existing one
119+
3. Go to the **Compliance** section
120+
4. Enable **Recording Consent Plan**
121+
5. Choose your consent type (Stay-on-Line or Verbal)
122+
6. Enter your consent message
123+
7. Configure additional options (voice, decline tool, etc.)
124+
8. Save your assistant
125+
</Tab>
126+
<Tab title="TypeScript (Server SDK)">
127+
```typescript
128+
import { VapiClient } from "@vapi-ai/server-sdk";
129+
130+
const client = new VapiClient({ token: process.env.VAPI_API_KEY });
131+
132+
const assistant = await client.assistants.create({
133+
name: "Customer Support Assistant",
134+
model: {
135+
provider: "openai",
136+
model: "gpt-4o"
137+
},
138+
voice: {
139+
provider: "11labs",
140+
voiceId: "sarah"
141+
},
142+
compliancePlan: {
143+
recordingConsentPlan: {
144+
type: "verbal",
145+
message: "This call may be recorded for quality and training purposes. Do you consent to being recorded?",
146+
declineTool: {
147+
type: "endCall"
148+
}
149+
}
150+
}
151+
});
152+
```
153+
</Tab>
154+
<Tab title="Python (Server SDK)">
155+
```python
156+
from vapi import Vapi
157+
158+
client = Vapi(token=os.getenv("VAPI_API_KEY"))
159+
160+
assistant = client.assistants.create({
161+
"name": "Customer Support Assistant",
162+
"model": {
163+
"provider": "openai",
164+
"model": "gpt-4o"
165+
},
166+
"voice": {
167+
"provider": "11labs",
168+
"voiceId": "sarah"
169+
},
170+
"compliancePlan": {
171+
"recordingConsentPlan": {
172+
"type": "verbal",
173+
"message": "This call may be recorded for quality and training purposes. Do you consent to being recorded?",
174+
"declineTool": {
175+
"type": "endCall"
176+
}
177+
}
178+
}
179+
})
180+
```
181+
</Tab>
182+
</Tabs>
183+
184+
</Step>
185+
186+
<Step title="Test Your Configuration">
187+
Create a test call to verify your consent flow works correctly.
188+
189+
<Tabs>
190+
<Tab title="Dashboard">
191+
1. Go to your assistant's page
192+
2. Click **Test Call**
193+
3. Verify the consent message plays correctly
194+
4. Test both consent and decline scenarios
195+
5. Check that the call transfers properly after consent
196+
</Tab>
197+
<Tab title="API">
198+
```typescript
199+
// Create a test call
200+
const call = await client.calls.create({
201+
assistantId: assistant.id,
202+
phoneNumberId: "your-phone-number-id"
203+
});
204+
205+
// Monitor the call to verify consent flow
206+
console.log("Call created:", call.id);
207+
```
208+
</Tab>
209+
</Tabs>
210+
211+
</Step>
212+
213+
<Step title="Monitor Consent Decisions">
214+
Check your call logs to verify consent decisions are being recorded correctly.
215+
216+
```typescript
217+
// Get call details to check consent status
218+
const call = await client.calls.get(callId);
219+
220+
if (call.compliance?.recordingConsent?.grantedAt) {
221+
console.log("Consent granted at:", call.compliance.recordingConsent.grantedAt);
222+
console.log("Consent type:", call.compliance.recordingConsent.type);
223+
} else {
224+
console.log("No consent was granted for this call");
225+
}
226+
```
227+
228+
</Step>
229+
</Steps>
230+
231+
## Decline Tool Options
232+
233+
When users decline recording consent, you can configure different actions using decline tools:
234+
235+
For detailed information about these tools, see:
236+
237+
- **[Handoff Tool](/tools/handoff)** - Transfer to other assistants
238+
- **[Default Tools](/tools/default-tools)** - Transfer calls and end calls
239+
240+
## Best Practices
241+
242+
### Message Design
243+
244+
- **Stay-on-Line**: Clearly state that staying implies consent
245+
- **Verbal**: Ask for explicit confirmation with clear yes/no options
246+
- **Length**: Keep messages concise but comprehensive
247+
- **Tone**: Use professional, clear language appropriate for your industry
248+
249+
### Voice Selection
250+
251+
- Use a different voice for consent messages to create distinction
252+
- Choose voices that match your brand and industry requirements
253+
- Consider using more formal voices for compliance scenarios
254+
255+
### Decline Handling
256+
257+
- **End Call**: Use when you cannot provide service without recording
258+
- **Transfer**: Use when you have alternative service options
259+
- **Handoff**: Use when you have non-recording assistants available
260+
261+
### Testing
262+
263+
- Test both consent and decline scenarios thoroughly
264+
- Verify timing works correctly for your use case
265+
- Check that decline tools execute properly
266+
- Monitor call logs to ensure compliance data is recorded
267+
268+
## Troubleshooting
269+
270+
**Users not hearing consent message**
271+
272+
- Verify the consent message is not empty
273+
- Check that the voice configuration is valid
274+
- Test with different voice providers if needed
275+
276+
**Decline tool not executing**
277+
278+
- Verify the decline tool configuration is valid
279+
- Check that referenced assistants or phone numbers exist
280+
- Ensure the tool type matches your intended action
281+
282+
## Next Steps
283+
284+
- **[Call Recording](/assistants/call-recording)** - Learn about technical recording implementation
285+
- **[Handoff Tool](/tools/handoff)** - Transfer between assistants
286+
- **[Default Tools](/tools/default-tools)** - Transfer calls and end calls
287+
- **[API Reference](/api-reference/assistants/create)** - Explore assistant configuration options

0 commit comments

Comments
 (0)