Skip to main content
POST
/
api
/
bots
Create bot
curl --request POST \
  --url http://localhost:8091/api/bots \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "<string>",
  "serverId": "<string>",
  "displayName": "<string>"
}
'
{
  "data": {
    "bot": {
      "id": "<string>",
      "username": "<string>",
      "displayName": "<string>",
      "status": "<string>",
      "bot": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "avatarPath": "<string>"
    },
    "token": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Session token obtained from /api/auth/login or /api/auth/register. Pass as: Authorization: Bearer

Body

application/json
username
string
required

Bot username

Required string length: 1 - 32
serverId
string
required

Server to add the bot to

displayName
string

Bot display name

Response

201 - application/json

Bot created

data
object