patch/users/@me/settings

Update current user settings

Updates the current user's settings and preferences. Allows modification of notification settings, privacy options, display preferences, and other user-configurable options. Returns updated settings.

update_current_user_settings

Request body

application/json

json
{
  "type": "object",
  "properties": {
    "flags": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Bitfield of user settings flags"
    },
    "status": {
      "$ref": "#/components/schemas/UserStatusType"
    },
    "status_resets_at": {
      "description": "When status resets",
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})?$"
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 8640000000000000
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "status_resets_to": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/UserStatusType"
        },
        {
          "type": "null"
        }
      ]
    },
    "theme": {
      "$ref": "#/components/schemas/UserThemeType"
    },
    "guild_positions": {
      "description": "Ordered array of guild IDs for sidebar positioning",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeType"
      }
    },
    "locale": {
      "$ref": "#/components/schemas/Locale"
    },
    "restricted_guilds": {
      "description": "Guilds with DM restrictions",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeType"
      }
    },
    "bot_restricted_guilds": {
      "description": "Guilds with bot DM restrictions",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeType"
      }
    },
    "default_guilds_restricted": {
      "type": "boolean",
      "description": "Default DM restriction for new guilds"
    },
    "bot_default_guilds_restricted": {
      "type": "boolean",
      "description": "Default bot DM restriction for new guilds"
    },
    "inline_attachment_media": {
      "type": "boolean",
      "description": "Display attachments inline"
    },
    "inline_embed_media": {
      "type": "boolean",
      "description": "Display embed media inline"
    },
    "gif_auto_play": {
      "type": "boolean",
      "description": "Auto-play GIFs"
    },
    "render_embeds": {
      "type": "boolean",
      "description": "Render message embeds"
    },
    "render_reactions": {
      "type": "boolean",
      "description": "Display reactions"
    },
    "animate_emoji": {
      "type": "boolean",
      "description": "Animate custom emoji"
    },
    "animate_stickers": {
      "$ref": "#/components/schemas/StickerAnimationOptionsInput"
    },
    "render_spoilers": {
      "$ref": "#/components/schemas/RenderSpoilersInput"
    },
    "message_display_compact": {
      "type": "boolean",
      "description": "Compact message display"
    },
    "friend_source_flags": {
      "$ref": "#/components/schemas/FriendSourceFlags",
      "description": "Friend request source permissions"
    },
    "incoming_call_flags": {
      "$ref": "#/components/schemas/IncomingCallFlags",
      "description": "Incoming call settings"
    },
    "group_dm_add_permission_flags": {
      "$ref": "#/components/schemas/GroupDmAddPermissionFlags",
      "description": "Group DM add permissions"
    },
    "guild_folders": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": -1,
            "maximum": 9007199254740991,
            "description": "Unique identifier for the folder (-1 for uncategorized)"
          },
          "name": {
            "description": "Display name of the folder",
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "default": 0,
            "description": "Color of the folder as integer",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ColorType"
              },
              {
                "type": "null"
              }
            ]
          },
          "flags": {
            "default": 0,
            "$ref": "#/components/schemas/GuildFolderFlags"
          },
          "icon": {
            "default": "folder",
            "description": "Selected icon for the guild folder",
            "$ref": "#/components/schemas/GuildFolderIconType"
          },
          "guild_ids": {
            "description": "Guild IDs in this folder",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnowflakeType"
            }
          }
        },
        "required": [
          "id",
          "guild_ids"
        ]
      },
      "description": "Guild folder organization"
    },
    "custom_status": {
      "description": "Custom status",
      "anyOf": [
        {
          "$ref": "#/components/schemas/CustomStatusPayload"
        },
        {
          "type": "null"
        }
      ]
    },
    "afk_timeout": {
      "type": "integer",
      "minimum": 60,
      "maximum": 600,
      "description": "AFK timeout in seconds (60-600)"
    },
    "time_format": {
      "$ref": "#/components/schemas/TimeFormatTypesInput"
    },
    "developer_mode": {
      "type": "boolean",
      "description": "Developer mode enabled"
    },
    "trusted_domains": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 253
      },
      "description": "Trusted external link domains. Use \"*\" to trust all domains."
    },
    "default_hide_muted_channels": {
      "type": "boolean",
      "description": "Hide muted channels by default in new guilds"
    },
    "sensitive_content_friend_dm_filter": {
      "$ref": "#/components/schemas/SensitiveMediaFilterLevelInput",
      "description": "Sensitive media filter level for DMs from friends"
    },
    "sensitive_content_non_friend_dm_filter": {
      "$ref": "#/components/schemas/SensitiveMediaFilterLevelInput",
      "description": "Sensitive media filter level for DMs from non-friends"
    },
    "sensitive_content_guild_filter": {
      "$ref": "#/components/schemas/SensitiveMediaGuildFilterLevelInput"
    },
    "suppress_unprivileged_self_mentions": {
      "type": "boolean",
      "description": "Suppress direct mentions and reply mentions from unprivileged users"
    },
    "suppress_unprivileged_self_mentions_bypass_user_ids": {
      "description": "User IDs that bypass self-mention suppression",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SnowflakeType"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "staff_dm_access_user_ids": {
      "description": "User IDs with Staff DM Access enabled",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SnowflakeType"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "profile_privacy": {
      "$ref": "#/components/schemas/ProfilePrivacyLevelInput",
      "description": "Controls who sees the full profile: all guild members, only small-guild members, or only friends"
    },
    "default_share_voice_activity": {
      "type": "boolean",
      "description": "Default share_voice_activity applied to new friend relationships"
    },
    "synced_preferences": {
      "description": "Account-wide client preferences as a base64-encoded protobuf snapshot. Replaces the entire stored snapshot; pass null to clear it.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 699052
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Responses

200

Success

json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "The current online status of the user"
    },
    "status_resets_at": {
      "description": "ISO8601 timestamp of when the status will reset",
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "status_resets_to": {
      "description": "The status to reset to after the scheduled reset",
      "type": [
        "string",
        "null"
      ]
    },
    "theme": {
      "type": "string",
      "description": "The UI theme preference"
    },
    "locale": {
      "$ref": "#/components/schemas/Locale"
    },
    "restricted_guilds": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeStringType"
      },
      "description": "Guild IDs where direct messages are restricted"
    },
    "bot_restricted_guilds": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeStringType"
      },
      "description": "Guild IDs where bot direct messages are restricted"
    },
    "default_guilds_restricted": {
      "type": "boolean",
      "description": "Whether new guilds have DM restrictions by default"
    },
    "bot_default_guilds_restricted": {
      "type": "boolean",
      "description": "Whether new guilds have bot DM restrictions by default"
    },
    "inline_attachment_media": {
      "type": "boolean",
      "description": "Whether to display attachments inline in chat"
    },
    "inline_embed_media": {
      "type": "boolean",
      "description": "Whether to display embed media inline in chat"
    },
    "gif_auto_play": {
      "type": "boolean",
      "description": "Whether GIFs auto-play in chat"
    },
    "render_embeds": {
      "type": "boolean",
      "description": "Whether to render message embeds"
    },
    "render_reactions": {
      "type": "boolean",
      "description": "Whether to display reactions on messages"
    },
    "animate_emoji": {
      "type": "boolean",
      "description": "Whether to animate custom emoji"
    },
    "animate_stickers": {
      "$ref": "#/components/schemas/StickerAnimationOptions",
      "description": "Sticker animation preference setting"
    },
    "render_spoilers": {
      "$ref": "#/components/schemas/RenderSpoilers",
      "description": "Spoiler rendering preference setting"
    },
    "message_display_compact": {
      "type": "boolean",
      "description": "Whether to use compact message display mode"
    },
    "friend_source_flags": {
      "$ref": "#/components/schemas/FriendSourceFlags"
    },
    "incoming_call_flags": {
      "$ref": "#/components/schemas/IncomingCallFlags"
    },
    "group_dm_add_permission_flags": {
      "$ref": "#/components/schemas/GroupDmAddPermissionFlags"
    },
    "guild_folders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The unique identifier for the folder (-1 for uncategorized)",
            "anyOf": [
              {
                "$ref": "#/components/schemas/SignedInt32Type"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "description": "The display name of the folder",
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "description": "The color of the folder as an integer",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Int32Type"
              },
              {
                "type": "null"
              }
            ]
          },
          "flags": {
            "default": 0,
            "$ref": "#/components/schemas/GuildFolderFlags"
          },
          "icon": {
            "default": "folder",
            "description": "Selected icon for the guild folder",
            "$ref": "#/components/schemas/GuildFolderIconType"
          },
          "guild_ids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnowflakeStringType"
            },
            "description": "The IDs of guilds contained in this folder"
          }
        },
        "required": [
          "flags",
          "icon",
          "guild_ids"
        ],
        "additionalProperties": false
      },
      "description": "The folder structure for organizing guilds in the sidebar"
    },
    "custom_status": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/CustomStatusResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The custom status set by the user"
    },
    "afk_timeout": {
      "description": "The idle timeout in seconds before going AFK",
      "$ref": "#/components/schemas/Int32Type"
    },
    "time_format": {
      "$ref": "#/components/schemas/TimeFormatTypes",
      "description": "The preferred time format setting"
    },
    "developer_mode": {
      "type": "boolean",
      "description": "Whether developer mode is enabled"
    },
    "trusted_domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of trusted external link domains"
    },
    "default_hide_muted_channels": {
      "type": "boolean",
      "description": "Whether muted channels are hidden by default in new guilds"
    },
    "sensitive_content_friend_dm_filter": {
      "$ref": "#/components/schemas/SensitiveMediaFilterLevel",
      "description": "Sensitive media filter level for DMs from friends"
    },
    "sensitive_content_non_friend_dm_filter": {
      "$ref": "#/components/schemas/SensitiveMediaFilterLevel",
      "description": "Sensitive media filter level for DMs from non-friends"
    },
    "sensitive_content_guild_filter": {
      "$ref": "#/components/schemas/SensitiveMediaGuildFilterLevel"
    },
    "suppress_unprivileged_self_mentions": {
      "type": "boolean",
      "description": "Whether direct mentions and reply mentions from unprivileged users are suppressed"
    },
    "suppress_unprivileged_self_mentions_bypass_user_ids": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeStringType"
      },
      "description": "User IDs that bypass self-mention suppression"
    },
    "staff_dm_access_user_ids": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeStringType"
      },
      "description": "User IDs with Staff DM Access enabled"
    },
    "synced_preferences": {
      "type": "string",
      "description": "Account-wide client preferences as a base64-encoded protobuf snapshot. Empty string when nothing has been synced yet."
    },
    "profile_privacy": {
      "$ref": "#/components/schemas/ProfilePrivacyLevel",
      "description": "Controls who sees the full profile: all guild members, only small-guild members, or only friends"
    },
    "default_share_voice_activity": {
      "type": "boolean",
      "description": "Default value of share_voice_activity applied to newly accepted friend relationships. Read-only here; mutated via PUT /users/@me/settings/voice-activity-sharing."
    }
  },
  "required": [
    "status",
    "theme",
    "locale",
    "restricted_guilds",
    "bot_restricted_guilds",
    "default_guilds_restricted",
    "bot_default_guilds_restricted",
    "inline_attachment_media",
    "inline_embed_media",
    "gif_auto_play",
    "render_embeds",
    "render_reactions",
    "animate_emoji",
    "animate_stickers",
    "render_spoilers",
    "message_display_compact",
    "friend_source_flags",
    "incoming_call_flags",
    "group_dm_add_permission_flags",
    "guild_folders",
    "custom_status",
    "afk_timeout",
    "time_format",
    "developer_mode",
    "trusted_domains",
    "default_hide_muted_channels",
    "sensitive_content_friend_dm_filter",
    "sensitive_content_non_friend_dm_filter",
    "sensitive_content_guild_filter",
    "suppress_unprivileged_self_mentions",
    "suppress_unprivileged_self_mentions_bypass_user_ids",
    "staff_dm_access_user_ids",
    "synced_preferences",
    "profile_privacy",
    "default_share_voice_activity"
  ],
  "additionalProperties": false
}
400

Bad Request - The request was malformed or contained invalid data

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Machine-readable error code"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "description": "Field-specific validation errors",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Field path that failed validation"
          },
          "code": {
            "description": "Machine-readable validation error code",
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "Human-readable validation error message"
          }
        },
        "required": [
          "path",
          "message"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": {}
}
401

Unauthorized - Authentication is required or the token is invalid

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Machine-readable error code"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "description": "Field-specific validation errors",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Field path that failed validation"
          },
          "code": {
            "description": "Machine-readable validation error code",
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "Human-readable validation error message"
          }
        },
        "required": [
          "path",
          "message"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": {}
}
403

Forbidden - You do not have permission to perform this action

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Machine-readable error code"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "description": "Field-specific validation errors",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Field path that failed validation"
          },
          "code": {
            "description": "Machine-readable validation error code",
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "Human-readable validation error message"
          }
        },
        "required": [
          "path",
          "message"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": {}
}
429

Too Many Requests - You are being rate limited

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Machine-readable error code"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "description": "Field-specific validation errors",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Field path that failed validation"
          },
          "code": {
            "description": "Machine-readable validation error code",
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "Human-readable validation error message"
          }
        },
        "required": [
          "path",
          "message"
        ],
        "additionalProperties": false
      }
    },
    "retry_after": {
      "type": "number",
      "description": "Seconds to wait before retrying"
    },
    "global": {
      "type": "boolean",
      "description": "Whether this is a global rate limit"
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": {}
}
500

Internal Server Error - An unexpected error occurred

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Machine-readable error code"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "description": "Field-specific validation errors",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Field path that failed validation"
          },
          "code": {
            "description": "Machine-readable validation error code",
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "Human-readable validation error message"
          }
        },
        "required": [
          "path",
          "message"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": {}
}