>>

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

NameType
sphere_idNumber
channel_idNumber
>>

Request Body

FieldTypeDescription
name?StringThe new name of the channel.
topic?String?The new topic of the channel.
position?NumberThe new position of the channel.
category_id?NumberThe id of the new category of the channel.
>>

Response

201SphereChannel

  • Text

A text channel.

FieldTypeDescription
type"TEXT"The type of this Sphere Channel variant.
idNumberThe ID of this text channel.
sphere_idNumberThe ID of the sphere that this text channel belongs to.
nameStringThe name of this text channel.
topic?StringThe topic of this text channel.
positionNumberThis text channel’s position inside of its sphere.
category_idNumberThe ID of the category this channel belongs to.
  • Voice

A voice channel.

FieldTypeDescription
type"VOICE"The type of this Sphere Channel variant.
idNumberThe ID of this voice channel.
sphere_idNumberThe ID of the sphere that this voice channel belongs to.
nameStringThe name of this voice channel.
positionNumberThis voice channel’s position inside of its sphere.
category_idNumberThe 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