Edit Channel
This route requires a valid Authorization
header.
PATCH/spheres/<sphere_id>/channels/<channel_id>
Edit a channel.
Name must be less than or equal to 32 characters long if provided.
Topic must be less than or equal to 4096 characters long if provided.
Position must be greater than or equal to 0. It is automatically upper-bounded to the number of channels in the category.
If category_id is provided, position must also be provided.
Path Params
Name | Type |
---|---|
sphere_id | Number |
channel_id | Number |
Request Body
Field | Type | Description |
---|---|---|
name? | String | The new name of the channel. |
topic? | String? | The new topic of the channel. |
position? | Number | The new position of the channel. |
category_id? | Number | The id of the new category of the channel. |
Response
- Text
A text channel.
Field | Type | Description |
---|---|---|
type | "TEXT" | The type of this Sphere Channel variant. |
id | Number | The ID of this text channel. |
sphere_id | Number | The ID of the sphere that this text channel belongs to. |
name | String | The name of this text channel. |
topic? | String | The topic of this text channel. |
position | Number | This text channel’s position inside of its sphere. |
category_id | Number | The ID of the category this channel belongs to. |
- Voice
A voice channel.
Field | Type | Description |
---|---|---|
type | "VOICE" | The type of this Sphere Channel variant. |
id | Number | The ID of this voice channel. |
sphere_id | Number | The ID of the sphere that this voice channel belongs to. |
name | String | The name of this voice channel. |
position | Number | This voice channel’s position inside of its sphere. |
category_id | Number | The ID of the category this channel belongs to. |
Example
curl --request PATCH \
-H "Authorization: <token>" \
--json '{"name":"Bean","position":42,"category_id":1337}' \
https://api.eludris.gay/spheres/1234/channels/5678