Servers

Server settings

Write permission: platform admin, server creator, or canAdmin/canEditServer role

Queries

serverById

GET
/api/v1/servers/:serverId

Get server details by ID.

Terminal

curl "https://start.chat/api/v1/servers/{serverId}" \
-H "Authorization: Bearer sk_live_xxx"

serverMembers

GET
/api/v1/servers/:serverId/members

List members of a server.

Terminal

curl "https://start.chat/api/v1/servers/{serverId}/members" \
-H "Authorization: Bearer sk_live_xxx"

userServers

GET
/api/v1/servers

List servers the authenticated user belongs to.

Terminal

curl "https://start.chat/api/v1/servers" \
-H "Authorization: Bearer sk_live_xxx"

searchJoinableServers

GET
/api/v1/servers/joinable

Search for public servers the user can join.

Terminal

curl "https://start.chat/api/v1/servers/joinable" \
-H "Authorization: Bearer sk_live_xxx"

Update

PATCH
/api/v1/servers/:id

Update server settings (name, description, icon, etc.).

Parameters

FieldTypeRequiredDescription
idstringYes
namestringNo
welcomestringNo
descriptionstringNo
iconstringNo
bannerstringNo
domainstringNo
privatebooleanNo
tintnumberNo

Example

Terminal

curl -X PATCH "https://start.chat/api/v1/servers/{id}" \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"id": "abc123"
}'
import { setup, mutate } from '@start-chat/sdk'
await setup({ apiKey: 'sk_live_xxx' })
const result = await mutate.server.update({
id: 'abc123',
})

Response

{
"ok": true,
"data": {
"id": "abc123",
"name": "general",
"creatorId": "usr_abc123",
"channelSort": {},
"state": {},
"description": "A description",
"icon": "value",
"isPrivateChat": false,
"updatedAt": 1709251200000,
"createdAt": 1709251200000
}
}