Requires MANAGE_PERMISSIONS. targetID is preferred; roleID and userID are accepted aliases. To remove an overwrite, set action to DELETE or remove to true. Otherwise allow and deny default to empty arrays and replace the target's overwrite.

Request

POST http://localhost:8989/api/channels/{channelID}/permissions

Path parameters

Parameter name Value Description Additional
channelID string

Channel identifier.

Required

Request body

The request body takes a complete Channel Permission Request resource, containing the following writable properties:

{
    "action": "string",
    "allow": [
        "string"
    ],
    "deny": [
        "string"
    ],
    "remove": "boolean",
    "roleID": "string",
    "targetID": "string",
    "userID": "string"
}

Properties

Name Type Description Additional
action string

Possible values are:

  • DELETE
Optional
allow[] array of string

Possible values are:

  • VIEW_CHANNEL
  • SEND_MESSAGES
  • EMBED_LINKS
  • ATTACH_FILES
  • READ_HISTORY
  • USE_REACTIONS
  • MUTE_OTHERS
  • DEAF_OTHERS
  • MANAGE_CHANNELS
  • MANAGE_ROLES
  • MANAGE_PERMISSIONS
  • KICK_MEMBERS
  • BAN_MEMBERS
  • PIN_MESSAGES
  • MANAGE_MESSAGES
  • MANAGE_EMOJIS
  • CONNECT
  • SPEAK
  • PRIORITY_SPEAKER
  • MOVE_MEMBERS
  • ADMINISTRATOR
  • MODERATOR
  • VIEW_AUDIT_LOG
  • MANAGE_SERVER
Optional
deny[] array of string

Possible values are:

  • VIEW_CHANNEL
  • SEND_MESSAGES
  • EMBED_LINKS
  • ATTACH_FILES
  • READ_HISTORY
  • USE_REACTIONS
  • MUTE_OTHERS
  • DEAF_OTHERS
  • MANAGE_CHANNELS
  • MANAGE_ROLES
  • MANAGE_PERMISSIONS
  • KICK_MEMBERS
  • BAN_MEMBERS
  • PIN_MESSAGES
  • MANAGE_MESSAGES
  • MANAGE_EMOJIS
  • CONNECT
  • SPEAK
  • PRIORITY_SPEAKER
  • MOVE_MEMBERS
  • ADMINISTRATOR
  • MODERATOR
  • VIEW_AUDIT_LOG
  • MANAGE_SERVER
Optional
remove boolean Optional
roleID string Optional
targetID string Optional
userID string Optional

Authorisation

This request requires the use of one of following authorisation methods: API key .

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
200 OK

Overwrite updated or removed.

Channel Permission Mutation Response
400 Bad Request

The request is invalid, references a missing resource, or conflicts with existing state.

Error Response
401 Unauthorized

The Authorization header is missing or malformed.

Error Response
403 Forbidden

The token is invalid or expired, or the requester lacks a required permission.

Error Response
500 Internal Server Error

The server could not complete the operation.

Error Response

Explore this API

channelID

Channel identifier.

body
Request Content-Type
Response Content-Type

Choose an authorisation method:

API key API key to be used for request
Try it out!