patch/guilds/{guild_id}/members/{user_id}

Update guild member

Update guild member. Requires manage_members permission. Can modify member nickname, voice state, and other member properties.

update_guild_member

Parameters

NameInTypeDescription
guild_id*pathSnowflakeTypeThe ID of the guild
user_id*pathSnowflakeTypeThe ID of the user

Request body

application/json

json
{
  "type": "object",
  "properties": {
    "nick": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The nickname to set for the member (1-32 characters)"
    },
    "roles": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SnowflakeType"
      },
      "maxItems": 100,
      "description": "Array of role IDs to assign to the member (max 100)"
    },
    "avatar": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/Base64ImageType"
        },
        {
          "type": "null"
        }
      ],
      "description": "Base64-encoded image data for the member guild avatar"
    },
    "banner": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/Base64ImageType"
        },
        {
          "type": "null"
        }
      ],
      "description": "Base64-encoded image data for the member guild banner"
    },
    "bio": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The member guild profile bio (1-320 characters)"
    },
    "pronouns": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The member guild profile pronouns (1-40 characters)"
    },
    "accent_color": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 16777215,
          "format": "int32"
        },
        {
          "type": "null"
        }
      ],
      "description": "The accent color for the member guild profile as an integer"
    },
    "profile_flags": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/GuildMemberProfileFlags"
        },
        {
          "type": "null"
        }
      ]
    },
    "mention_flags": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/MentionReplyPreferences",
          "description": "Per-guild reply mention preference override for this member; NO_PREFERENCE inherits the user's account-wide setting"
        },
        {
          "type": "null"
        }
      ]
    },
    "mute": {
      "type": "boolean",
      "description": "Whether the member is muted in voice channels"
    },
    "deaf": {
      "type": "boolean",
      "description": "Whether the member is deafened in voice channels"
    },
    "communication_disabled_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO8601 timestamp until which the member is timed out"
    },
    "timeout_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The reason for timing out the member (1-512 characters)"
    },
    "channel_id": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/SnowflakeType"
        },
        {
          "type": "null"
        }
      ],
      "description": "The voice channel ID to move the member to"
    },
    "connection_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The voice connection ID for the member"
    }
  },
  "required": [
    "nick",
    "communication_disabled_until"
  ]
}

Responses

200

Success

json
{
  "type": "object",
  "properties": {
    "user": {
      "$ref": "#/components/schemas/UserPartialResponse"
    },
    "nick": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The nickname of the member in this guild"
    },
    "avatar": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The hash of the member guild-specific avatar"
    },
    "banner": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The hash of the member guild-specific banner"
    },
    "accent_color": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/Int32Type"
        },
        {
          "type": "null"
        }
      ],
      "description": "The accent colour of the member guild profile as an integer"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 250,
      "description": "Array of role IDs the member has"
    },
    "joined_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO8601 timestamp of when the user joined the guild"
    },
    "mute": {
      "type": "boolean",
      "description": "Whether the member is muted in voice channels"
    },
    "deaf": {
      "type": "boolean",
      "description": "Whether the member is deafened in voice channels"
    },
    "communication_disabled_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO8601 timestamp until which the member is timed out"
    },
    "profile_flags": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/GuildMemberProfileFlags"
        },
        {
          "type": "null"
        }
      ]
    },
    "mention_flags": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/MentionReplyPreferences",
          "description": "Per-guild reply mention preference override; NO_PREFERENCE means inherit the user-level mention_flags."
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "user",
    "roles",
    "joined_at",
    "mute",
    "deaf"
  ]
}
400

Bad Request - The request was malformed or contained invalid data

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
401

Unauthorized - Authentication is required or the token is invalid

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
403

Forbidden - You do not have permission to perform this action

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
429

Too Many Requests - You are being rate limited

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "RATE_LIMITED"
      ]
    },
    "message": {
      "type": "string"
    },
    "retry_after": {
      "type": "number",
      "description": "Seconds to wait before retrying"
    },
    "global": {
      "type": "boolean",
      "description": "Whether this is a global rate limit"
    }
  },
  "required": [
    "code",
    "message",
    "retry_after"
  ]
}
500

Internal Server Error - An unexpected error occurred

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}