roles_modify_positions
roles_modify_positions
Section titled “roles_modify_positions”Category: roles
Bulk-reorder guild roles via PATCH /guilds/\{guild.id\}/roles.
When to use
Section titled “When to use”- Move several roles in one transaction (e.g. swap two adjacent roles).
When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild containing the roles |
positions | array | yes | Roles whose position changes (other roles are auto-renumbered) |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{roles:[\{id, name, position\}], count\} — full role list after the change.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
roles | array | yes | |
count | integer | yes |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |