Skip to main content
PUT
Update session retention settings
Needs the session-retention:write scope. Send only the fields you want to change; omitted fields keep their current values. Each threshold is a whole number of days from 15 to 120. The response is the saved settings.
Erasure is permanent. Turning a rule on, or lowering a threshold, starts erasing matching sessions within about 30 minutes, and the API doesn’t ask for confirmation. Read the current settings with Get settings before you change them.
Every change is recorded in the audit log. Erased sessions are closed for good, and their history gets a session_erased_by_system_due_to_retention_threshold event; see List history. For what each rule and setting does, see Session retention.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
after_closing_enabled
boolean

Erase a session once it has stayed closed for after_closing_days days. A reopened session never matches.

after_closing_days
integer

Days after a session is closed before it is erased: a whole number from 15 to 120.

Required range: 15 <= x <= 120
after_inactivity_enabled
boolean

Erase a session once it has had no activity for after_inactivity_days days. An open session is closed first.

after_inactivity_days
integer

Days without activity before a session is erased: a whole number from 15 to 120.

Required range: 15 <= x <= 120
erase_title
boolean

Erasure also replaces the session title.

erase_custom_data
boolean

Erasure also empties the session custom data.

erase_ai_traces
boolean

Erasure also removes the AI traces recorded for the session.

erase_summary
boolean

Erasure also clears the session summary.

anonymize_contact
boolean

Erasure also removes every link between the session and its contact.

Response

Default Response

after_closing_enabled
boolean
required

Erase a session once it has stayed closed for after_closing_days days. A reopened session never matches.

after_closing_days
integer
required

Days after a session is closed before it is erased: a whole number from 15 to 120.

Required range: 15 <= x <= 120
after_inactivity_enabled
boolean
required

Erase a session once it has had no activity for after_inactivity_days days. An open session is closed first.

after_inactivity_days
integer
required

Days without activity before a session is erased: a whole number from 15 to 120.

Required range: 15 <= x <= 120
erase_title
boolean
required

Erasure also replaces the session title.

erase_custom_data
boolean
required

Erasure also empties the session custom data.

erase_ai_traces
boolean
required

Erasure also removes the AI traces recorded for the session.

erase_summary
boolean
required

Erasure also clears the session summary.

anonymize_contact
boolean
required

Erasure also removes every link between the session and its contact.