Users

Delete my messages with optional filters

Immediately deletes messages the caller has authored, subject to optional date-range and per-context filters (DMs, group DMs, guilds, with optional guild exclusions; or an inaccessible-only mode for contexts the caller is no longer a member of). Requires sudo mode verification. The deletion runs asynchronously; the caller receives a system DM with totals when it completes.

post/users/@me/messages/bulk-delete-mine

Request body

scope'selected' | 'inaccessible_only'

Which set of contexts the deletion targets

include_dmsboolean

Include 1:1 direct messages the caller still has open.

include_dms_closedboolean

Include 1:1 direct messages the caller has previously closed. Independent of include_dms — set include_dms=false and include_dms_closed=true to target closed DMs only.

include_group_dmsboolean

Include group DMs the caller is still a member of.

include_guildsboolean

Include text channels in guilds the caller is a member of.

guild_filter_mode'exclude' | 'include_only'

How the guild filter list is interpreted when include_guilds is true.

excluded_guild_idsSnowflakeType[]

Guild IDs to leave untouched. Used when include_guilds is true, guild_filter_mode is exclude, and scope is selected.

included_guild_idsSnowflakeType[]

The only guild IDs to apply this operation to. Used when include_guilds is true, guild_filter_mode is include_only, and scope is selected.

start_datestring date-time nullable

Inclusive ISO8601 lower bound for message timestamps. Null/omitted means unbounded in the past.

end_datestring date-time nullable

Exclusive ISO8601 upper bound for message timestamps. Null/omitted means unbounded in the future.

passwordstring
mfa_method'totp' | 'webauthn'

MFA method to use for verification

mfa_codestring

MFA verification code from an authenticator app

webauthn_responseobject

WebAuthn authentication response

webauthn_challengestring

WebAuthn challenge string

Response

No Content

Changes

No recorded changes to this endpoint across all 1 revision of this API.