Set retention
/api/settings/retentionZero means keep forever, which is the default for both classes. Turning a window on schedules destruction of data that cannot be recovered or filled in later.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://example.com/api/settings/retention" \ -H "Content-Type: application/json" \ -d '{ "moderationFactRetentionDays": 0, "presenceFactRetentionDays": 0 }'{ "moderationFactRetentionDays": 0, "presenceFactRetentionDays": 0, "discordMessageRetentionDays": 0, "memberReportRetentionDays": null}Get data settings GET
Retention, measured storage, and what this deployment is running on. capacityBytes is an optional what-if input. It is not stored: nothing in Modbot behaves differently for having been told, so it is answered against rather than persisted.
Preview a purge GET
What a purge of one person would erase, and what it would keep. Counts only; nothing is changed. Every number is counted from the same tables the purge writes to. A field Modbot cannot answer for a platform is null rather than zero: a Discord account has no group ban list and no case files. Needs the `Administrator` permission.