Create a channel or category
const url = 'https://api.gampeon.com/v1/communities/1/channels';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"category","name":"example","topic":"example","parentId":1,"overrides":[{"roleId":1,"allow":1,"deny":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 POST \ --url https://api.gampeon.com/v1/communities/1/channels \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "category", "name": "example", "topic": "example", "parentId": 1, "overrides": [ { "roleId": 1, "allow": 1, "deny": 1 } ], "userLimit": 1 }'Needs manageChannels. Text channel names are lowercase (spaces become -). Channels inherit the overrides of their category, then apply their own. Announcement channels start read-only for everyone. Voice channels have no messages; userLimit caps how many people can be in one at once. Only viewChannels, sendMessages, manageMessages, connect, speak, stream can be set per channel. Up to 100 channels.
Not available with access tokens.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Community ID
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Created
object
Example generated
{ "id": 1}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: channel_limit_reached
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"}