>>

Create Channel

This route requires a valid Authorization header.

POST/spheres/<sphere_id>/channels

Create a new channel within a sphere.

>>

Path Params

NameType
sphere_idNumber
>>

Request Body

FieldTypeDescription
nameStringThe name of the new channel.
typeSphereChannelTypeThe type of the new channel.
topicString?The topic of the new channel.
category_idNumber?The category of the new channel.
>>

Response

200SphereChannel

  • 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 \
  -H "Authorization: <token>" \
  --json '{"name":"horse","type":"TEXT"}'
  https://api.eludris.gay/spheres/4204171493377/channels

{
  "type": "TEXT",
  "id": 4204171493378,
  "sphere_id": 4204171493377,
  "name": "horse",
  "position": 0
}