When a caller gives consent to have their call recorded via a Recording consent dialplan item, the consent is stored as a recording consent record.
A record is valid until its notValidAfter date and time. Invalidating a record sets notValidAfter to the current date and time, so the consent is no longer valid and the caller will be asked for consent again on their next call.
This request invalidates a recording consent record.
If the record is already expired it is left untouched, so the original expiry date is preserved.
The change is written to the changelog.
| URL | https://api.telecomx.dk/pbx/recordingconsent/records/CONSENT_RECORD_ID/invalidate | |
|---|---|---|
| Method | POST | |
| Access level | MANAGER or OWNER if the record belongs to the users own customer. RESELLER if the customer belongs to the reseller. RESELLER_ADMIN. ADMIN. |
|
| Param | CONSENT_RECORD_ID | Id of the consent record (24 hex-char string) |
| Body | None | |
POST https://api.telecomx.dk/pbx/recordingconsent/records/1234567890ABCDEF12345678/invalidate
The updated recording consent record.
| JSON object | ||
|---|---|---|
| Property | Type | Description |
| _id | Id | Unique id of the consent record. |
| customer | Id | Id of the customer the consent was given to. |
| when | Date | When the consent was given. |
| callerNumber | String | The callers phone number. |
| callerName | String | The callers name, if available. Null if not. |
| calleeNumber | String | The phone number that was called. |
| key | String | The key the caller pressed to give consent: 1 - 9. |
| notValidAfter | Date | Set to the date and time the record was invalidated. |
{ _id: '12345678901234567890ABCD', customer: '12345678901234567890AAAA', when: '2026-07-20T10:15:30.000Z', callerNumber: '4512345678', callerName: 'Anders And', calleeNumber: '4587654321', key: '1', notValidAfter: '2026-07-22T11:45:00.000Z' }
| Error code | Message | Description |
|---|---|---|
| 400 | invalid_data | Id is not a valid ObjectId |
| 403 | access_denied | Insufficient access level |
| 404 | not_found | Recording consent record not found |
| 500 | internal_error | <Unspecified> |