members_unban
members_unban
Section titled “members_unban”Category: members
Remove a ban for a user (allowing them to rejoin).
When to use
Section titled “When to use”- Restore a previously-banned user.
When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild to unban from |
user_id | string | yes | Banned user to release |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{unbanned, user_id, guild_id\}. Idempotent — unbanning a non-banned user returns 404 from Discord.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
unbanned | boolean | yes | |
user_id | string | yes | Discord user ID |
guild_id | string | yes | Discord guild (server) ID |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |