2.7 KiB
2.7 KiB
GET /api/v1/community/{id}
Returns a community with id = {id}
Response:
{
"id": "string",
"name": "string",
"description": "string",
"ownerId": "string",
"creationDate": "number"
}
POST /api/v1/community
Requires an authorization header
Request:
{
"name": "string",
"description": "string?"
}
Creates a new community and returns it
Response:
{
"id": "string",
"name": "string",
"description": "string",
"ownerId": "string",
"creationDate": "number"
}
PATCH /api/v1/community/{id}
Requires an authorization header
Request:
{
"name": "string?",
"description": "string?"
}
Updates a community with id = {id}
Response:
{
"id": "string",
"name": "string",
"description": "string",
"ownerId": "string",
"creationDate": "number"
}
DELETE /api/v1/community/{id}
Requires an authorization header
Removes a community with id = {id}
Response:
{
"id": "string"
}
GET /api/v1/community/{id}/members
Requires an authorization header
Returns users for a community with id = {id}
Response:
{
"id": "string",
"name": "string",
"members": [
{
"id": "string",
"username": "string"
}
]
}
GET /api/v1/community/{id}/channels
Requires an authorization header
Returns channels for a community with id = {id}
Response:
{
"id": "string",
"name": "string",
"channels": [
{
"id": "string",
"name": "string"
}
]
}
GET /api/v1/community/{id}/roles
Requires an authorization header
Returns roles for a community with id = {id}
Response:
{
"id": "string",
"name": "string",
"roles": [
{
"id": "string",
"name": "string"
}
]
}
GET /api/v1/community/{id}/invites
Requires an authorization header
Returns invites for a community with id = {id}
Response:
{
"id": "string",
"name": "string",
"invites": [
{
"id": "string"
}
]
}
POST /api/v1/community/{id}/invite
Requires an authorization header
Request:
{
"totalInvites": "number?",
"expirationDate": "number?"
}
Creates an invite to a community with id = {id}
Response:
{
"id": "string",
"inviteId": "string"
}
DELETE /api/v1/community/{id}/members/{memberId}
Requires an authorization header
Removes a user with id = {memberId} from a community with id = {id}
Response:
{
"id": "string",
"userId": "string"
}