API reference
Privacy API reference descriptions are provided in English to preserve the exact published contract.
List standing and released legal holds Place a legal hold Release a legal hold List privacy requests Create a data-subject privacy request Get a privacy request Lift the processing restriction a RESTRICTION request placed Get the account retention policy Set the account retention policy Preview what a retention policy would remove now List standing and released legal holds GET /v1/accounts/{AC}/legal-holds
getV1AccountsByAcLegalHoldsPaginated 200
Required scope: `legal_holds:read`.
Parameters
Parameters Name Type Required Description limitquery · integer (1–100) cursorquery · string (max 2048 chars) ACpath · string (AC… SID) yes Account SID
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Place a legal hold POST /v1/accounts/{AC}/legal-holds
postV1AccountsByAcLegalHoldsIdempotency-Key required 201
The account's own compliance role (legal_holds:manage: OWNER, ADMIN, COMPLIANCE_MANAGER) places a hold on the account, a contact, a conversation, a campaign or a date range. While it stands, retention skips the data in scope and erasure requests that touch it are parked. ShipMsg staff holds need an approvalSid.
Required scope: any one of `legal_holds:write`, `legal_holds:manage`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID
Request body (4 fields) Request body Name Type Required Description approvalSidstring (AP… SID) caseRefstring (max 128 chars) yes customerVisibleboolean scopeobject yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Release a legal hold POST /v1/accounts/{AC}/legal-holds/{holdId}/release
postV1AccountsByAcLegalHoldsByHoldidReleaseIdempotency-Key required 200
Releasing lets retention and parked erasures remove the data again. The account's compliance role releases only holds it placed, with a step-up token for LEGAL_HOLD_RELEASE; a hold ShipMsg placed is released only by ShipMsg compliance.
Required scope: any one of `legal_holds:write`, `legal_holds:manage`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID holdIdpath · string (uuid) yes
Request body (2 fields) Request body Name Type Required Description caseRefstring (max 128 chars) yes stepUpTokenstring (max 256 chars)
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
List privacy requests GET /v1/accounts/{AC}/privacy/requests
getV1AccountsByAcPrivacyRequestsPaginated 200
Required scope: `privacy:read`.
Parameters
Parameters Name Type Required Description limitquery · integer (1–100) cursorquery · string (max 2048 chars) ACpath · string (AC… SID) yes Account SID
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Create a data-subject privacy request POST /v1/accounts/{AC}/privacy/requests
postV1AccountsByAcPrivacyRequestsIdempotency-Key required 202
Required scope: `privacy:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID
Request body (9 fields) Request body Name Type Required Description changesobject changes.attributesobject changes.displayNamenull | string (max 128 chars) changes.localenull | string (max 16 chars) changes.timezonenull | string (max 64 chars) kind"ERASURE" | "ACCESS" | "PORTABILITY" | "RECTIFICATION" | "RESTRICTION" yes reasonstring (max 2000 chars) yes stepUpTokenstring (max 256 chars) yes subjectobject yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Get a privacy request GET /v1/accounts/{AC}/privacy/requests/{DR}
getV1AccountsByAcPrivacyRequestsByDr200
Required scope: `privacy:read`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID DRpath · string (DR… SID) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Lift the processing restriction a RESTRICTION request placed POST /v1/accounts/{AC}/privacy/requests/{DR}/lift-restriction
postV1AccountsByAcPrivacyRequestsByDrLiftRestrictionIdempotency-Key required 200
Required scope: `privacy:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID DRpath · string (DR… SID) yes
Request body (2 fields) Request body Name Type Required Description reasonstring (max 2000 chars) yes stepUpTokenstring (max 256 chars) yes
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Get the account retention policy GET /v1/accounts/{AC}/privacy/retention-policy
getV1AccountsByAcPrivacyRetentionPolicy200
A null window means the data is kept until the customer deletes it, which is the default for an account that never set a policy.
Required scope: `privacy:read`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Set the account retention policy PUT /v1/accounts/{AC}/privacy/retention-policy
putV1AccountsByAcPrivacyRetentionPolicyIdempotency-Key required 200
Content is kept 30 to 3650 days and message records 1 to 120 months; null keeps them until deleted. A change that shortens either window removes data and needs a step-up token for RETENTION_POLICY_CHANGE; the response says what the retention job will remove on its next run.
Required scope: `retention:write`.
Parameters
Parameters Name Type Required Description ACpath · string (AC… SID) yes Account SID
Request body (4 fields) Request body Name Type Required Description analyticsMonthsinteger (1–36) messageContentDaysinteger (30–3650) | null yes messageMetadataMonthsinteger (1–120) | null yes stepUpTokenstring (max 256 chars)
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .
Preview what a retention policy would remove now GET /v1/accounts/{AC}/privacy/retention-policy/preview
getV1AccountsByAcPrivacyRetentionPolicyPreview200
A dry run with the retention job's own windows and legal-hold rules. Nothing is changed. Omit a window to preview keeping that data until deleted.
Required scope: `privacy:read`.
Parameters
Parameters Name Type Required Description messageContentDaysquery · integer (30–3650) messageMetadataMonthsquery · integer (1–120) ACpath · string (AC… SID) yes Account SID
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors .