You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/security-and-privacy/recording-consent-plan.mdx
+46-18Lines changed: 46 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,45 +106,73 @@ Add the recording consent plan to your assistant's `compliancePlan`:
106
106
}
107
107
```
108
108
109
-
## Call Response Structure
109
+
## End-of-Call Report Structure
110
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:
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
112
113
-
### Successful Consent Response
113
+
### Successful Consent Webhook
114
114
115
115
```json
116
116
{
117
-
// ... Other call fields
118
-
"compliance": {
119
-
"recordingConsent": {
120
-
"type": "verbal",
121
-
"grantedAt": "2024-01-15T10:30:00Z"
122
-
}
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://..."
123
138
}
124
139
}
125
140
```
126
141
127
-
### No Consent Response
142
+
### No Consent Webhook
128
143
129
144
```json
130
145
{
131
-
"// ... Other call fields
132
-
"compliance": {
133
-
"recordingConsent": {
134
-
"type": "verbal"
135
-
}
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 */"
136
164
}
137
165
}
138
166
```
139
167
140
-
**Key points about the response structure:**
168
+
**Key points about the webhook structure:**
141
169
142
-
-**`recordingConsent` field**: Always present when a consent plan is configured
170
+
-**`recordingConsent` field**: Always present in the `compliance` object when a consent plan is configured
143
171
-**`type`**: Shows which consent type was used (`"verbal"` or `"stay-on-line"`)
144
172
-**`grantedAt`**: Only set when the user explicitly grants permission
145
173
-**Missing `grantedAt`**: Indicates the user declined consent or hung up before granting permission
146
174
147
-
This structure allows you to easily determine whether recording consent was granted and audit compliance decisions for each call.
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.
0 commit comments