Retention, deletion, erasure and the audit log are available from the SDK and the HTTP API only.
The dashboard and the CLI don’t have them yet.
Before you begin
You need:- The owner or admin role in the workspace. An API key has the role it was created with. Other roles can read the retention policies but can’t change them, delete anything or read the audit log.
- An API key and Node.js 22 or later for the SDK, or an access token for the HTTP API. The quickstart shows how to install the SDK and sign in.
- Familiarity with call records: their parts, versions and copies.
The parts you can delete
A record has three parts that you can delete on their own:
Deleting the transcript takes the messages with it because the messages hold the same words.
The record’s details stay: who called, when, for how long, and why it ended.
Every deletion seals a new signed version of the record. The new version says what was removed,
when, why and by whom, under
fonoster.deletions. A webhook subscribed to
call_record.sealed hears about it.
Set a retention policy
A retention policy deletes one part of every record once the call is older than a number of days. For example, delete recordings after 90 days and keep transcripts. Each part has its own policy, and a part without a policy is kept forever.- SDK
- HTTP
This script deletes recordings after 90 days and messages after 30, then prints the
workspace’s policies:It prints one entry per policy:To remove a policy and keep that part forever again, set its days to
set-retention.js
null:retention policy: recording after 90 days.
Delete one part of a call
Delete a part of one call when someone asks you to remove a recording, for example. Give a reason: it goes into the audit log.- SDK
- HTTP
deletePart takes the call, the part and a reason:404.
Erase a call
Erasing a call deletes every file and every version of it. Use it for a privacy request such as a right-to-erasure request. In place of the record, Fonoster seals a signed tombstone that says when, why and by whom the call was erased. The tombstone holds no parties and no content.- SDK
- HTTP
eraseRecord takes the call and a reason:- The call no longer shows up in searches or under Calls.
- Reading the record answers
410with"error": "erased". - The phone numbers are cleared from the call’s details.
- The audit log still lists the erasure.
- No
call_record.sealedevent is sent for the tombstone.
erasure request for an erasure and
deletion request for a deleted part. Give a real reason, such as a ticket number, so the audit log
can answer “why”.
Read the audit log
The audit log of a call lists every deletion and erasure, oldest first. It stays available after the call is erased.- SDK
- HTTP
getAudit returns the call’s entries:Errors
The SDK methods for retention, erasure and the audit log are under
CallRecords in the
Node SDK reference.
Next steps
Call records
Read records, download recordings and verify signatures.
Record calls and ask for consent
Choose which calls are recorded in the first place.