api:pbx:recordingconsentrecords:list
Table of Contents
API : PBX : Recording consent records list
Introduction
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. A one-time consent has when and notValidAfter set to the same date and time.
Request
This request returns a list of the customers recording consent records.
| URL | https://api.telecomx.dk/pbx/recordingconsent/records | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if the records belong to the users own customer. RESELLER if the customer belongs to the reseller. RESELLER_ADMIN and ADMIN may list across all customers. |
|
| Query | offset | [optional] Index of the first record to return, default 0. |
| limit | [optional] The number of records to return, default 50, min 1, max 1000. |
|
| customer | [optional] Id of customer to list consent records for. Defaults to the users own customer. RESELLER_ADMIN and ADMIN list across all customers when not specified. |
|
| callerNumber | [optional] Only include consents given from this phone number (exact match). |
|
| valid | [optional] true: only consents that are still valid (notValidAfter is in the future). false: only expired consents. |
|
| oneTime | [optional] true: only one-time consents (when and notValidAfter are equal). false: only period consents. |
|
| from | [optional] Only include consents given at or after this date and time (ISO 8601). |
|
| to | [optional] Only include consents given at or before this date and time (ISO 8601). |
|
| sort | [optional] Which property to sort result by: when (default), callerNumber, notValidAfter. |
|
| order | [optional] Sort order: desc (default), asc. |
|
Query examples
https://api.telecomx.dk/pbx/recordingconsent/records https://api.telecomx.dk/pbx/recordingconsent/records?customer=12345678901234567890ABCD https://api.telecomx.dk/pbx/recordingconsent/records?callerNumber=4512345678&valid=true https://api.telecomx.dk/pbx/recordingconsent/records?oneTime=true&limit=20&offset=100 https://api.telecomx.dk/pbx/recordingconsent/records?from=2026-07-01T00:00:00Z&to=2026-07-22T00:00:00Z
Response
| JSON object | ||
|---|---|---|
| Property | Type | Description |
| offset | Number | Index of the first record returned. |
| limit | Number | Number of records to return. Note that the actual number of returned records may be lower. |
| total | Number | Number of records that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| records | Array | List of recording consent records, see definition below. |
| Recording consent record 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 | The date and time after which the consent is no longer valid. Equal to when for one-time consents. |
Example
{ offset: 0, limit: 50, total: 132, records: [ { _id: '12345678901234567890ABCD', customer: '12345678901234567890AAAA', when: '2026-07-20T10:15:30.000Z', callerNumber: '4512345678', callerName: 'Anders And', calleeNumber: '4587654321', key: '1', notValidAfter: '2027-07-20T10:15:30.000Z' }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | not_found | Customer not found |
| 500 | internal_error | <Unspecified> |
api/pbx/recordingconsentrecords/list.txt · Last modified: by Per Møller