Update or release a legal hold
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/LegalHolds/LH0123456789abcdef0123456789abcdef';const options = { method: 'POST', headers: { Authorization: 'Basic <credentials>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({Status: 'released', Reason: 'example', MatterId: '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/LegalHolds/LH0123456789abcdef0123456789abcdef \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data Status=released \ --data Reason=example \ --data MatterId=exampleReleases a hold (Status=released) and/or changes its Reason or MatterId. Releasing is final: a released hold cannot be made active again (409); releasing an already released hold changes nothing. Sending any scope field answers 400, since a hold’s scope never changes: release it and create another. Releases are audited as legal_hold.released. 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
AC000000000000000000Legal hold SID, LH followed by 32 hex digits
Example
LH0123456789abcdef0123456789abcdefRequest Body
Section titled “ Request Body ”object
Released to release the hold (active is accepted only while the hold is still active)
New reason, 1 to 1024 characters
New matter id, up to 256 characters
Responses
Section titled “ Responses ”OK
object
Account the hold belongs to.
Login that created the hold.
When the hold was created, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”.
When the hold was released, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null while active.
When the hold last changed, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”.
Your reference for the legal matter.
Why the content is held.
Login that released the hold; empty while active.
What the hold covers; every field set must match.
object
Holds everything of the account.
Holds the recordings and transcripts of this call.
Holds this conversation: a parent call SID or a chat conversation SID.
Holds content created at or after this time, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null when unset.
Holds content created at or before this time, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”; null when unset.
Holds content from or to this number, compared by digits.
Holds this one recording.
Legal hold SID: LH followed by 32 hex digits.
Active or released. Released holds no longer protect anything.
Absolute URL of this hold.
Example
{ "account_sid": "AC000000000000000000", "created_by": "AC000000000000000000", "date_created": "Thu, 26 Nov 2026 10:15:30 +0000", "date_updated": "Thu, 26 Nov 2026 10:15:30 +0000", "matter_id": "MATTER-2026-17", "reason": "Litigation hold for matter 2026-17", "released_by": "", "scope": { "all": false, "call_sid": "3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11", "phone_number": "+15550100123", "recording_sid": "9b1d7e0c-2f4a-4c1e-8f3b-5a6d7c8e9f00" }, "sid": "LH0123456789abcdef0123456789abcdef", "status": "active", "url": "https://api.siprtc.io/v1/Accounts/AC000000000000000000/LegalHolds/LH0123456789abcdef0123456789abcdef"}Scope field sent, invalid Status, or Reason / MatterId length (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}No such hold in this account (code 20404)
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}A released hold cannot be reactivated (code 20409)
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}