Update recording settings
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/RecordingSettings/Default';const options = { method: 'POST', headers: { Authorization: 'Basic <credentials>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ FriendlyName: 'example', 'Voice.Mode': 'app_controlled', 'Voice.Channels': 'dual', 'Voice.Voicemail': 'allowed', 'Chat.Storage': 'store', 'Chat.ArchiveTranscripts': 'true', 'Chat.ArchiveAfterIdleHours': '1', EncryptionEnabled: 'true', EncryptionType: 'none', EncryptionKeySid: 'example', 'Retention.RecordingsDays': '1', 'Retention.VoicemailDays': '1', 'Retention.TranscriptsDays': '1', 'Retention.ChatMessagesDays': '1', 'Access.PlaybackRoles': 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/RecordingSettings/Default \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data FriendlyName=example \ --data Voice.Mode=app_controlled \ --data Voice.Channels=dual \ --data Voice.Voicemail=allowed \ --data Chat.Storage=store \ --data Chat.ArchiveTranscripts=true \ --data Chat.ArchiveAfterIdleHours=1 \ --data EncryptionEnabled=true \ --data EncryptionType=none \ --data EncryptionKeySid=example \ --data Retention.RecordingsDays=1 \ --data Retention.VoicemailDays=1 \ --data Retention.TranscriptsDays=1 \ --data Retention.ChatMessagesDays=1 \ --data Access.PlaybackRoles=exampleChanges the account’s recording policy. Only the parameters you send change; the result must still be a valid policy, and unknown parameters are refused. Send form parameters with the PascalCase dotted names below, or a JSON body with the snake_case shape GET returns (e.g. {“voice”: {“mode”: “never”}}); read-only fields echoed back (account_sid, url, dates) are ignored. EncryptionType wins over EncryptionEnabled; EncryptionEnabled=true alone picks customer_key when EncryptionKeySid is set, else platform; EncryptionEnabled=false alone turns encryption off. customer_key needs EncryptionKeySid naming one of the account’s Credentials/PublicKeys. Encryption changes apply to new recordings only. Saving settings for the first time answers 201, later saves 200; each save is audited as settings.updated. Retention.ConsentsDays is accepted and ignored. Only the account owner (Basic auth with the account’s Auth ID and Auth Secret) or a platform admin may call it; other logins get 403.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Account Auth ID (AC followed by the account id) the request acts on
Example
AC000000000000000000Request Body
Section titled “ Request Body ”object
Name of the settings, 1 to 64 characters. Default \
When calls are recorded: app_controlled (whatever your application or the API asks), always (every call from answer, plus app requests), on_demand (explicit requests only; the implicit recording of
Channels of policy-started recordings: dual (one channel per party) or mono
Whether
Chat message bodies: store, or never_store (bodies are blanked once the conversation has been idle Chat.ArchiveAfterIdleHours; metadata stays)
Archive each idle conversation as a Transcript (encrypted like recordings)
Hours a conversation must be idle before it is archived or redacted, 1 to 720. Default 24
Encrypt new recordings and transcripts. Must agree with EncryptionType when both are sent
None, platform (envelope encryption with a platform key; the API decrypts for playback) or customer_key (data keys wrapped with your RSA public key; only your private key decrypts)
Public key SID (CR followed by 32 hex digits) used for customer_key encryption
Days to keep call recordings; 0 keeps them forever, else 1 to 3650
Days to keep voicemail (
Days to keep archived transcripts; 0 keeps them forever, else 1 to 3650
Days to keep chat message bodies; 0 keeps them forever, else 1 to 3650
Comma-separated roles that may play recordings and read transcripts: tenant, admin, supervisor, agent, member, qa_agent. At least one; replaces the whole list
Responses
Section titled “ Responses ”Settings updated
object
Who may play recordings and read transcripts.
object
Roles that may play recordings and read transcripts: tenant, admin, supervisor, agent, member, qa_agent.
Account the settings apply to (a sub-account reads its parent’s).
Chat storage and transcript archiving.
object
Hours of inactivity after which a conversation is archived or redacted, 1 to 720.
Whether idle conversations are archived as Transcripts.
Chat message bodies: store, or never_store (blanked once the conversation is idle).
When the settings were first saved, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null for defaults never saved.
When the settings were last saved, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null for defaults never saved.
Whether new recordings and transcripts are encrypted.
Public key SID used for customer_key encryption; null otherwise.
None, platform or customer_key.
Name of the settings.
How long content is kept, in days.
object
Days chat message bodies are kept; 0 keeps them forever.
Days call recordings are kept; 0 keeps them forever.
Days archived transcripts are kept; 0 keeps them forever.
Days voicemail (
Absolute URL of the settings.
Call recording policy, enforced at every recording start.
object
Channels of policy-started recordings: dual or mono.
When calls are recorded: app_controlled, always, on_demand or never.
Whether
Example
{ "account_sid": "AC000000000000000000", "chat": { "archive_after_idle_hours": 24, "archive_transcripts": false, "storage": "store" }, "encryption_enabled": false, "encryption_type": "none", "friendly_name": "Default", "retention": { "chat_messages_days": 0, "recordings_days": 0, "transcripts_days": 0, "voicemail_days": 0 }, "url": "https://api.siprtc.io/v1/Accounts/AC000000000000000000/RecordingSettings/Default", "voice": { "channels": "dual", "mode": "app_controlled", "voicemail": "allowed" }}Settings saved for the first time
object
Who may play recordings and read transcripts.
object
Roles that may play recordings and read transcripts: tenant, admin, supervisor, agent, member, qa_agent.
Account the settings apply to (a sub-account reads its parent’s).
Chat storage and transcript archiving.
object
Hours of inactivity after which a conversation is archived or redacted, 1 to 720.
Whether idle conversations are archived as Transcripts.
Chat message bodies: store, or never_store (blanked once the conversation is idle).
When the settings were first saved, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null for defaults never saved.
When the settings were last saved, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null for defaults never saved.
Whether new recordings and transcripts are encrypted.
Public key SID used for customer_key encryption; null otherwise.
None, platform or customer_key.
Name of the settings.
How long content is kept, in days.
object
Days chat message bodies are kept; 0 keeps them forever.
Days call recordings are kept; 0 keeps them forever.
Days archived transcripts are kept; 0 keeps them forever.
Days voicemail (
Absolute URL of the settings.
Call recording policy, enforced at every recording start.
object
Channels of policy-started recordings: dual or mono.
When calls are recorded: app_controlled, always, on_demand or never.
Whether
Example
{ "account_sid": "AC000000000000000000", "chat": { "archive_after_idle_hours": 24, "archive_transcripts": false, "storage": "store" }, "encryption_enabled": false, "encryption_type": "none", "friendly_name": "Default", "retention": { "chat_messages_days": 0, "recordings_days": 0, "transcripts_days": 0, "voicemail_days": 0 }, "url": "https://api.siprtc.io/v1/Accounts/AC000000000000000000/RecordingSettings/Default", "voice": { "channels": "dual", "mode": "app_controlled", "voicemail": "allowed" }}Unknown or invalid parameter, inconsistent encryption flags, or EncryptionKeySid not a key of this account (code 20001)
object
Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.
Human readable explanation.
Link to more information; currently always empty.
HTTP status code of the response.
Example
{ "code": 20404, "message": "the requested resource was not found", "more_info": "", "status": 404}Authentication failed: missing or invalid credentials (JSON string from the API gateway)
Example generated
exampleOnly the account owner or an admin may do this, or the login does not belong to this account (code 20403)
object
Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.
Human readable explanation.
Link to more information; currently always empty.
HTTP status code of the response.
Example
{ "code": 20404, "message": "the requested resource was not found", "more_info": "", "status": 404}Storage or account lookup unavailable (code 20503)
object
Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.
Human readable explanation.
Link to more information; currently always empty.
HTTP status code of the response.
Example
{ "code": 20404, "message": "the requested resource was not found", "more_info": "", "status": 404}