Create Sphere
This route requires a valid Authorization
header.
POST/spheres
Create a new sphere.
A user can only own up to 100 spheres at once, if you, for any reason need to create more, you’ll need to delete some of your spheres.
If you still aren’t allowed to create a sphere after doing so, then you will have to wait for the server to run its scheduled cleanup to actually remove the old sphere data from the database. This limitation is imposed to avoid abuse.
Request Body
Field | Type | Description |
---|---|---|
slug | String | The slug of the sphere. This field has to be between 1 and 32 characters. |
type | SphereType | The sphere’s type. |
name | String? | The sphere’s display name. This field has to be between 1 and 32 characters. |
description | String? | The sphere’s description. This field has to be between 1 and 4096 characters. |
icon? | Number | The sphere’s icon. This field has to be a valid file ID in the “sphere-icons” bucket. |
banner? | Number | The sphere’s banner. This field has to be a valid file ID in the “sphere-banners” bucket. |
Response
200Sphere
Field | Type | Description |
---|---|---|
id | Number | The spheres’s ID. |
owner_id | Number | The ID of the sphere’s owner. |
name? | String | The name of the sphere. |
slug | String | The slug of the sphere. |
type | SphereType | The sphere’s type. |
description? | String | The sphere’s description, can be between 1 and 4096 characters. |
icon? | Number | The sphere’s icon. This field has to be a valid file ID in the “sphere-icons” bucket. |
banner? | Number | The sphere’s banner. This field has to be a valid file ID in the “sphere-banners” bucket. |
badges | Number | The sphere’s badges as a bitfield. |
categories | Array of Categorys | The categories that this sphere contains. |
members | Array of Members | The members that are inside this sphere. |
emojis | Array of Emojis | The emojis that this sphere has. |
Example
curl \
-H "Authorization: <token>" \
--json '{"slug":"horse","type":"Hybrid"}'
https://api.eludris.gay/spheres
{
"id": 4204171493377,
"owner_id": 4203748065281,
"slug": "horse",
"type": "HYBRID",
"badges": 0,
"channels": [{
"type": "TEXT",
"id": 4204171493378,
"sphere_id": 4204171493377,
"name": "general",
"position": 0
}]
}