User content collections
Recent mentions and saved messages are private lists that only the account owning them can read. Two further routes delete the messages the caller authored, one filtered and immediate, the other unfiltered and delayed by a day. Data harvests live on Data harvests.
Every route here is user-only. Fluxer rejects a bot or OAuth2 bearer credential with 403 ACCESS_DENIED, and an account that has an outstanding required action with 403 ACCOUNT_SUSPICIOUS_ACTIVITY.
Every route except Delete current user’s messages reaches the main Gateway, and a Gateway failure returns 502 BAD_GATEWAY, 503 SERVICE_UNAVAILABLE, or 504 GATEWAY_TIMEOUT. Save message resolves the channel before it writes, so a failure there stores nothing. The request still returns 204 when a Saved Message Create, Saved Message Delete, or Recent Mention Delete Dispatch fails to publish after the write.
Saved message object
Section titled “Saved message object”A saved entry is a private bookmark pairing one message with the channel it was saved from. Saving a message notifies nobody, including its author.
An entry stores no copy of the message. Fluxer resolves the message against current permissions on every read, so one entry can have a message on one read and none on the next.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| id1 | snowflake | The ID of the saved entry |
| channel_id2 | snowflake | The channel the message was saved from |
| message_id | snowflake | The ID of the saved message |
| status | string | The saved message status of the entry |
| message3 | ?message object | The message as the caller can currently see it, or null |
1 Always equal to message_id, because one message can be saved at most once per account
2 The channel supplied when the message was saved, and it is not re-derived on read
3 Null exactly when status is missing_permissions, and otherwise the message resolved for the caller at read time. A message that still exists and needs READ_MESSAGE_HISTORY the caller no longer holds is also null.
Saved message statuses
Section titled “Saved message statuses”| Value | Description |
|---|---|
| available | The message resolved and is included in the entry |
| missing_permissions1 | The caller can no longer reach the channel or read the message, so message is null |
1 Reported when resolving the channel fails with MISSING_PERMISSIONS, UNKNOWN_CHANNEL, UNKNOWN_GUILD, ACCESS_DENIED, or NSFW_CONTENT_AGE_RESTRICTED. Also reported when the channel resolves and a stored message needs READ_MESSAGE_HISTORY the caller does not hold.
Bulk message deletion scopes
Section titled “Bulk message deletion scopes”| Value | Description |
|---|---|
| selected | The supplied context toggles and guild filter choose what is deleted |
| inaccessible_only1 | The deletion covers only guilds the caller has left and group DMs the caller is no longer a member of |
1 One-to-one direct messages are never eligible under this scope
Guild filter modes
Section titled “Guild filter modes”| Value | Description |
|---|---|
| exclude | The deletion covers every eligible guild except excluded_guild_ids |
| include_only | The deletion covers only included_guild_ids |
List recent mentions
Section titled “List recent mentions”GET/v1/users/@me/mentionsLists the caller’s recent mention history. Returns an array of message objects the caller can still read, in descending message ID order.
Fluxer resolves each retained entry against current permissions. A message that has been deleted, or whose channel the caller can no longer reach, is omitted without being removed from history. The filters and limit apply before that resolution, so a full page can return fewer messages than limit.
Query parameters
Section titled “Query parameters”| Field | Type | Description |
|---|---|---|
| limit?1 | integer | The maximum number of mentions read from history (1-100, default 25) |
| roles?2 3 | boolean | Whether entries recorded as role mentions are included (default true) |
| everyone?2 3 4 | boolean | Whether entries recorded as everyone mentions are included (default true) |
| guilds?2 5 | boolean | Whether entries in a guild channel are included (default true) |
| before? | snowflake | The upper bound on entry message ID, exclusive |
1 A value outside the range fails with VALUE_MUST_BE_INTEGER_IN_RANGE at the limit path. The value is read with a leading-integer parse, so 25abc is accepted as 25
2 Only the exact strings true, True, and 1 are read as true. Every other value, TRUE and yes included, is read as false
3 The filter excludes every entry with the named mention kind, so a message that arrived through both a direct and a role mention is excluded while roles is false
4 An @here mention is recorded as an everyone mention. It is recorded only for an account holding a live Gateway session on the guild when the mention was fanned out
5 Every recorded entry has a guild, so setting this to false always returns an empty array
The response has no cursor metadata, so before and limit are the only pagination controls.
Fluxer drops a direct mention at message creation when the mentioned account has blocked the author, so it never reaches the history. An @everyone or @here mention is not recorded while suppress_everyone is enabled for the guild, and a role mention is not recorded while suppress_roles is enabled. A message that also has a direct mention is still recorded. Changing those guild notification settings later does not retroactively add or remove history.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | array[message object] | Readable mentions were returned |
| 403 | error response | A retained entry sits in a guild whose membership state cannot be resolved, returning ACCESS_DENIED, or in an age-restricted channel the account has not verified for, returning NSFW_CONTENT_AGE_RESTRICTED |
Rate limit
Section titled “Rate limit”40 requests per 10 seconds for each authenticated user, on the user:mentions:read bucket.
Mark recent mentions read
Section titled “Mark recent mentions read”POST/v1/users/@me/mentions/readRemoves entries from the caller’s recent mention history. Returns 204 with an empty body. Emits one Recent Mention Delete Gateway event for each entry it removes.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| message_ids1 | array[snowflake] | The recent mention message IDs to remove (1-100 entries) |
1 An ID absent from the history is an idempotent no-op that emits no Dispatch. A duplicate ID is not deduplicated, so an ID naming a real entry twice emits the Dispatch twice
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | Every supplied ID was processed |
Side effects
Section titled “Side effects”Fluxer looks up every supplied ID first and deletes only the entries that exist. Recent Mention Delete reaches the caller’s own sessions once for every entry found, so a request naming only unknown IDs writes nothing.
Rate limit
Section titled “Rate limit”60 requests per 10 seconds for each authenticated user, on the user:mentions:delete bucket, which is shared with Delete recent mention.
Delete recent mention
Section titled “Delete recent mention”DELETE/v1/users/@me/mentions/{message_id}Removes one entry from the caller’s recent mention history. Returns 204 with an empty body. Emits a Recent Mention Delete Gateway event when an entry is removed.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| message_id | snowflake | The message ID of the recent mention entry |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The entry was removed, or no entry named that message |
Side effects
Section titled “Side effects”A matching entry is deleted and Recent Mention Delete reaches the caller’s own sessions. When no entry existed the request writes nothing. The message stays in its channel, and the caller’s channel mention count and unread badge are unchanged.
Rate limit
Section titled “Rate limit”60 requests per 10 seconds for each authenticated user, on the user:mentions:delete bucket, which is shared with Mark recent mentions read.
List saved messages
Section titled “List saved messages”GET/v1/users/@me/saved-messagesLists the caller’s saved message collection. Returns an array of saved message objects in descending message ID order.
The response is a bare array with no cursor metadata, so before and limit are the only pagination controls. An entry whose channel the caller can no longer reach, or whose message the caller can no longer read, comes back with status missing_permissions and a null message. An entry whose message no longer exists is deleted and omitted. The array can hold fewer entries than limit.
Query parameters
Section titled “Query parameters”| Field | Type | Description |
|---|---|---|
| limit?1 2 | integer | The maximum number of entries read from the collection (1-100, default 25) |
| before?2 | snowflake | The upper bound on entry message ID, exclusive |
1 A value outside the range fails with VALUE_MUST_BE_INTEGER_IN_RANGE at the limit path
2 Applied to the stored entries before each one is resolved
A guild configuring message_history_cutoff still serves a message posted at or after the cutoff to a member without READ_MESSAGE_HISTORY, so the entry stays available. A message posted before the cutoff is reported as missing_permissions.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | array[saved message object] | Saved entries were returned |
| 403 | error response | A stored entry sits in a guild whose membership state cannot be resolved, returning ACCESS_DENIED, or in an age-restricted channel, returning NSFW_CONTENT_AGE_RESTRICTED |
Side effects
Section titled “Side effects”The cleanup deletion emits no Saved Message Delete.
Rate limit
Section titled “Rate limit”40 requests per 10 seconds for each authenticated user, on the user:saved_messages:read bucket.
Save message
Section titled “Save message”POST/v1/users/@me/saved-messagesAdds a message to the caller’s private saved message collection. Returns 204 with an empty body. Emits a Saved Message Create Gateway event.
The caller needs access to the channel and to the message.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| channel_id1 | snowflake | The channel containing the message |
| message_id | snowflake | The ID of the message to save |
1 The saved entry retains this channel ID verbatim
Collection limit
Section titled “Collection limit”An account holds at most the instance-configured max_bookmarks limit entries. Fluxer resolves the account’s effective value on every save, and the default is 50. Reaching the ceiling fails with 400 MAX_BOOKMARKS, whose body has max_bookmarks reporting the ceiling.
The check runs before Fluxer touches the channel or the message, so re-saving an already stored message is refused at the ceiling too.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | Message is present in the saved collection |
| 400 | error response | The collection is at its ceiling and the request returns MAX_BOOKMARKS |
| 403 | error response | The caller lacks VIEW_CHANNEL or guild membership, returning MISSING_PERMISSIONS, the membership state cannot be resolved, returning ACCESS_DENIED, or the channel needs age verification, returning NSFW_CONTENT_AGE_RESTRICTED |
| 404 | error response | The channel returns UNKNOWN_CHANNEL, its guild returns UNKNOWN_GUILD, the message returns UNKNOWN_MESSAGE, or the account returns UNKNOWN_USER |
Side effects
Section titled “Side effects”Saving an already stored message rewrites the entry. Saved Message Create reaches the caller’s own sessions on every accepted save, a repeat save included, with the complete message object as the caller can currently see it.
Rate limit
Section titled “Rate limit”30 requests per 10 seconds for each authenticated user, on the user:saved_messages:write bucket, which is shared with Unsave message.
Unsave message
Section titled “Unsave message”DELETE/v1/users/@me/saved-messages/{message_id}Removes a message from the caller’s private saved message collection. Returns 204 with an empty body. Emits a Saved Message Delete Gateway event.
No current access to the channel is required.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| message_id | snowflake | The message ID of the saved entry |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | Message is absent from the saved collection |
Side effects
Section titled “Side effects”Fluxer issues the delete unconditionally, and Saved Message Delete reaches the caller’s own sessions on every accepted request, including one naming a message the account never saved. The saved entry is removed and the message stays in its channel.
Rate limit
Section titled “Rate limit”30 requests per 10 seconds for each authenticated user, on the user:saved_messages:write bucket, which is shared with Save message.
Delete current user’s messages
Section titled “Delete current user’s messages”POST/v1/users/@me/messages/bulk-delete-mineDeletes the messages the caller authored that the supplied filter selects. Requires sudo mode. Returns 202 with an empty body before deletion begins.
Deletion emits batched Message Delete Bulk Dispatches as it progresses, and finally a Message Create for the completion direct message.
JSON body
Section titled “JSON body”The caller proves sudo mode either with the five sudo fields below or with an existing proof in the request. An existing proof travels in the X-Fluxer-Sudo-Mode-JWT request header.
| Field | Type | Description |
|---|---|---|
| scope? | string | The deletion scope, default selected |
| include_dms? | boolean | Whether one-to-one DMs the caller still has open are included (default true) |
| include_dms_closed?1 | boolean | Whether one-to-one DMs the caller has closed are included (default true) |
| include_group_dms?2 | boolean | Whether group DMs the caller is still a member of are included (default true) |
| include_guilds?2 | boolean | Whether channels in guilds the caller is still a member of are included (default true) |
| guild_filter_mode?3 | string | The guild filter mode, default exclude |
| excluded_guild_ids? | array[snowflake] | The guilds left untouched in exclude mode (max 500 IDs, default empty) |
| included_guild_ids? | array[snowflake] | The only guilds targeted in include_only mode (max 500 IDs, default empty) |
| start_date?4 | ?ISO8601 timestamp | The inclusive lower bound on message time, or null for no lower bound |
| end_date?4 | ?ISO8601 timestamp | The exclusive upper bound on message time, or null for no upper bound |
| password?5 | string | The account password (8-256 characters) |
| mfa_method?5 | string | The sudo MFA method, either totp or webauthn |
| mfa_code?5 | string | The sudo authenticator code, or an unconsumed backup code (1-32 characters) |
| webauthn_response?5 | WebAuthn assertion object | The sudo WebAuthn assertion |
| webauthn_challenge?5 | string | The sudo WebAuthn challenge (1-256 characters) |
1 Independent of include_dms, so setting include_dms false and include_dms_closed true targets closed direct messages only
2 Under the selected scope a group DM is eligible only while the caller is still a recipient, and a guild channel only while the caller is still a member
3 Evaluated only while include_guilds is true and scope is selected
4 Supplying both bounds requires start_date strictly earlier than end_date, and an equal pair fails validation on end_date
5 The five sudo fields are the sudo verification object. Which combination is accepted depends on the account’s configured authenticators
The selected scope requires at least one of the four context toggles to be true, and a request that disables all four fails validation on include_dms. The inaccessible_only scope ignores the toggles and the guild filter.
Neither scope includes the caller’s personal notes channel, so this operation cannot delete a personal note.
Request filtered data harvest accepts the same filter shape and applies it to the messages an archive contains. That operation requires no sudo mode.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 202 | empty | Deletion was accepted for asynchronous processing |
| 400 | error response | The date range or context selection is invalid, or a supplied sudo proof is wrong and the request returns INVALID_PASSWORD, PASSWORD_NOT_SET, or INVALID_MFA_CODE |
| 403 | error response | No accepted sudo proof is present and the request returns SUDO_MODE_REQUIRED |
| 500 | error response | Deletion could not be enqueued |
Side effects
Section titled “Side effects”An account holding an MFA authenticator that proved sudo mode with MFA receives a fresh proof in the response header. A request that already had a valid proof gets that same token echoed back without an extended lifetime.
Fluxer enqueues the work with at most 5 attempts. As deletion progresses, each affected channel emits Message Delete Bulk in batches of at most 100 message IDs, and the deleted messages’ attachments are permanently removed.
On completion the system account sends the caller a direct message in the account locale reporting the total deleted message count and the number of channels touched. That message arrives through the ordinary Message Create Dispatch.
Rate limit
Section titled “Rate limit”5 requests per 30 minutes for each authenticated user, on the user:messages:bulk_delete_mine_filtered bucket.
Request bulk message deletion
Section titled “Request bulk message deletion”POST/v1/users/@me/messages/deleteSchedules deletion of every message the caller has ever sent. Returns 204 with an empty body. Emits a User Update Gateway event.
The request requires sudo mode. Delete current user’s messages is the immediate counterpart and takes a filter. This form takes none and waits a day, so the caller can change their mind.
Calling the operation again replaces the pending schedule. The account holds at most one pending deletion, reported by the pending bulk message deletion object on the user object.
JSON body
Section titled “JSON body”The body is the sudo verification object. It has no other field, and an existing proof travels in the X-Fluxer-Sudo-Mode-JWT request header.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The deletion was scheduled |
| 400 | error response | A supplied sudo proof is wrong and the request returns INVALID_PASSWORD, PASSWORD_NOT_SET, or INVALID_MFA_CODE |
| 403 | error response | No accepted sudo proof is present and the request returns SUDO_MODE_REQUIRED |
| 500 | error response | The deletion could not be scheduled |
The 204 has X-Fluxer-Sudo-Mode-JWT when sudo verification issued or reused a token.
Side effects
Section titled “Side effects”Any pending deletion for the account is removed from the queue first. The account then records a scheduled moment exactly one day in the future together with the number of messages and channels the deletion would affect. Those counts are computed once at scheduling time and are not recomputed while the deletion waits.
The updated counts and schedule are published to the caller through User Update. No message is deleted by this request, so no channel receives a Dispatch until the scheduled work runs.
Rate limit
Section titled “Rate limit”6 requests per minute for each authenticated user, on the user:messages:bulk_delete bucket, which is shared with Cancel bulk message deletion.
Cancel bulk message deletion
Section titled “Cancel bulk message deletion”DELETE/v1/users/@me/messages/deleteCancels a pending bulk message deletion. Returns 200 on success. Emits a User Update Gateway event.
No sudo verification applies. An account with no pending deletion still returns 200 and still emits the Dispatch. Once the scheduled work has started there is nothing left to cancel, and the deleted messages are not restored.
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the cancellation was applied, always true |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | The pending deletion, if any, was cancelled |
| 500 | error response | The cancellation could not be applied |
Side effects
Section titled “Side effects”The scheduled moment and both stored counts are cleared from the account, the queued work is removed, and User Update reaches the caller with pending_bulk_message_deletion set to null.
Rate limit
Section titled “Rate limit”6 requests per minute for each authenticated user, on the user:messages:bulk_delete bucket, which is shared with Request bulk message deletion.