Contents

API reference

Privacy

API reference descriptions are provided in English to preserve the exact published contract.

List standing and released legal holds

GET /v1/accounts/{AC}/legal-holds

Required scope: `legal_holds:read`.

Parameters

Parameters
NameTypeRequiredDescription
limitquery · integer (1–100)
cursorquery · string (max 2048 chars)
ACpath · string (AC… SID)yesAccount SID

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Place a legal hold

POST /v1/accounts/{AC}/legal-holds

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
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount SID
Request body (4 fields)
Request body
NameTypeRequiredDescription
approvalSidstring (AP… SID)
caseRefstring (max 128 chars)yes
customerVisibleboolean
scopeobjectyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Release a legal hold

POST /v1/accounts/{AC}/legal-holds/{holdId}/release

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
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount SID
holdIdpath · string (uuid)yes
Request body (2 fields)
Request body
NameTypeRequiredDescription
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

Required scope: `privacy:read`.

Parameters

Parameters
NameTypeRequiredDescription
limitquery · integer (1–100)
cursorquery · string (max 2048 chars)
ACpath · string (AC… SID)yesAccount 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

Required scope: `privacy:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount SID
Request body (9 fields)
Request body
NameTypeRequiredDescription
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
subjectobjectyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Get a privacy request

GET /v1/accounts/{AC}/privacy/requests/{DR}

Required scope: `privacy:read`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount 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

Required scope: `privacy:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount SID
DRpath · string (DR… SID)yes
Request body (2 fields)
Request body
NameTypeRequiredDescription
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

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
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount 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

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
NameTypeRequiredDescription
ACpath · string (AC… SID)yesAccount SID
Request body (4 fields)
Request body
NameTypeRequiredDescription
analyticsMonthsinteger (1–36)
messageContentDaysinteger (30–3650) | nullyes
messageMetadataMonthsinteger (1–120) | nullyes
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

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
NameTypeRequiredDescription
messageContentDaysquery · integer (30–3650)
messageMetadataMonthsquery · integer (1–120)
ACpath · string (AC… SID)yesAccount SID

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.