Change a channel
const url = 'https://api.gampeon.com/v1/communities/1/channels/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","topic":"example","slowmode":1,"parentId":1,"overrides":[{"roleId":1,"allow":1,"deny":1}],"position":1,"userLimit":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.gampeon.com/v1/communities/1/channels/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "topic": "example", "slowmode": 1, "parentId": 1, "overrides": [ { "roleId": 1, "allow": 1, "deny": 1 } ], "position": 1, "userLimit": 1 }'Needs manageChannels. overrides replaces all overrides of the channel. position is the index in the full channel list (categories included).
Not available with access tokens.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Community ID
Channel ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "name": "example", "topic": "example", "slowmode": 1, "parentId": 1, "overrides": [ { "roleId": 1, "allow": 1, "deny": 1 } ], "position": 1, "userLimit": 1}Responses
Section titled “Responses”Changed fields
object
Example generated
{ "updated": [ "example" ]}Error codes: invalid_field
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed, missing_permission
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}