Create Channel
This route requires a valid Authorization header.
POST/spheres/<sphere_id>/channels
Create a new channel within a sphere.
Path Params
| Name | Type | 
|---|---|
| sphere_id | Number | 
Request Body
| Field | Type | Description | 
|---|---|---|
| name | String | The name of the new channel. | 
| type | SphereChannelType | The type of the new channel. | 
| topic | String? | The topic of the new channel. | 
| category_id | Number? | The category of the new 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 \
  -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
}