Skip to content

Commit 5636e2d

Browse files
chore: improve comments
1 parent ad00b70 commit 5636e2d

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

fern/security-and-privacy/recording-consent-plan.mdx

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Add the recording consent plan to your assistant's `compliancePlan`:
9595
"compliancePlan": {
9696
"recordingConsentPlan": {
9797
"type": "verbal",
98-
"message": "Can I record you please?",
98+
"message": "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.",
9999
"voice": {
100100
"voiceId": "Neha",
101101
"provider": "vapi"
@@ -106,6 +106,46 @@ Add the recording consent plan to your assistant's `compliancePlan`:
106106
}
107107
```
108108

109+
## Call Response Structure
110+
111+
When you add a recording consent plan to your assistant, the call response will include a `compliance` field with recording consent information. Here's what the response looks like:
112+
113+
### Successful Consent Response
114+
115+
```json
116+
{
117+
// ... Other call fields
118+
"compliance": {
119+
"recordingConsent": {
120+
"type": "verbal",
121+
"grantedAt": "2024-01-15T10:30:00Z"
122+
}
123+
}
124+
}
125+
```
126+
127+
### No Consent Response
128+
129+
```json
130+
{
131+
"// ... Other call fields
132+
"compliance": {
133+
"recordingConsent": {
134+
"type": "verbal"
135+
}
136+
}
137+
}
138+
```
139+
140+
**Key points about the response structure:**
141+
142+
- **`recordingConsent` field**: Always present when a consent plan is configured
143+
- **`type`**: Shows which consent type was used (`"verbal"` or `"stay-on-line"`)
144+
- **`grantedAt`**: Only set when the user explicitly grants permission
145+
- **Missing `grantedAt`**: Indicates the user declined consent or hung up before granting permission
146+
147+
This structure allows you to easily determine whether recording consent was granted and audit compliance decisions for each call.
148+
109149
## Implementation
110150

111151
<Steps>
@@ -142,7 +182,7 @@ Add the recording consent plan to your assistant's `compliancePlan`:
142182
compliancePlan: {
143183
recordingConsentPlan: {
144184
type: "verbal",
145-
message: "This call may be recorded for quality and training purposes. Do you consent to being recorded?",
185+
message: "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.",
146186
declineTool: {
147187
type: "endCall"
148188
}
@@ -170,7 +210,7 @@ Add the recording consent plan to your assistant's `compliancePlan`:
170210
"compliancePlan": {
171211
"recordingConsentPlan": {
172212
"type": "verbal",
173-
"message": "This call may be recorded for quality and training purposes. Do you consent to being recorded?",
213+
"message": "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.",
174214
"declineTool": {
175215
"type": "endCall"
176216
}

0 commit comments

Comments
 (0)