Permissions
Bnder API documentation for Permissions. Read the API Overview to get started and learn more.
Grant a permission to a user or role
Grants the specified permission to a user or role, determined by the body content
PUT/consumer/v1/guilds/guildId /permissions/grant
| Parameters | Description |
|---|---|
| guildId | The id of a discord guild |
Request body
| Field | Type | Description |
|---|---|---|
| permission | string | The permission to apply |
| user_id | string | The user ID to apply the permission to |
| role_id | string | The role ID to apply the permission to |
| project_id | string | The project ID to apply the permission to |
Response
Status: 204 - Permission granted
empty response
Revoke a permission from a user or role
Revokes the specified permission from a user or role, determined by the body content
PUT/consumer/v1/guilds/guildId /permissions/revoke
| Parameters | Description |
|---|---|
| guildId | The id of a discord guild |
Request body
| Field | Type | Description |
|---|---|---|
| permission | string | The permission to apply |
| user_id | string | The user ID to apply the permission to |
| role_id | string | The role ID to apply the permission to |
| project_id | string | The project ID to apply the permission to |
Response
Status: 204 - Permission granted
empty response
Apply a permission preset to a user or role
Applies a permission preset to a user or role, determined by the body content
PUT/consumer/v1/guilds/guildId /permissions/preset
| Parameters | Description |
|---|---|
| guildId | The id of a discord guild |
Request body
| Field | Type | Description |
|---|---|---|
| preset | string | The permission preset to apply |
| user_id | string | The user ID to apply the preset to |
| role_id | string | The role ID to apply the preset to |
| project_id | string | The project ID to apply the preset to |
Response
Status: 204 - Preset applied
empty response
Get permissions of a role
Get all bnder permission for the specified role
GET/consumer/v1/guilds/guildId /permissions/roles/roleId
| Parameters | Description |
|---|---|
| guildId | The id of a discord guild |
| roleId | The ID of the role |
Request body
empty
Response
Status: 200 - Permissions retrieved
| Field | Type | Description |
|---|---|---|
| globalPermissions | object | Global permissions are permissions that apply to all projects. They are not project-specific. |
| projectPermissions | object | Project permissions are permissions that apply to specific projects. They are project-specific. |
| discordPermissions | string | Discord permissions are permissions for discord. |
Get permissions of a user
Get all bnder permission for the specified user
GET/consumer/v1/guilds/guildId /permissions/users/userId
| Parameters | Description |
|---|---|
| guildId | The id of a discord guild |
| userId | The ID of the user |
Request body
empty
Response
Status: 200 - Permissions retrieved
| Field | Type | Description |
|---|---|---|
| globalPermissions | object | Global permissions are permissions that apply to all projects. They are not project-specific. |
| projectPermissions | object | Project permissions are permissions that apply to specific projects. They are project-specific. |
| discordPermissions | string | Discord permissions are permissions for discord. |