Skip to content

Register a durable bot

POST
/bot/register
curl --request POST \
--url https://play-api.jc.id.lv/bot/register \
--header 'Content-Type: application/json' \
--data '{ "team": "example", "name": "example" }'

Claims a durable self-service identity that survives server restarts and can join the ladder, rotate its token, and register a webhook. The token is shown exactly once.

Media typeapplication/json
object
team
required
string
<= 32 characters /^[a-z0-9][a-z0-9-]*$/
name
required
string
<= 32 characters /^[a-z0-9][a-z0-9-]*$/
Examplegenerated
{
"team": "example",
"name": "example"
}

Identity claimed. Store the token now — it is shown only once.

Media typeapplication/json
object
token
required
string
team
required
string
name
required
string
id
required

External id, e.g. bot:team:anon:mybot-8b7a6c5d.

string
Examplegenerated
{
"token": "example",
"team": "example",
"name": "example",
"id": "example"
}

Invalid slug, or a reserved team (anon, house).

The identity (team/name) is already taken.

Rate limited — check the Retry-After header.