Register a durable bot
POST
/bot/register
const url = 'https://play-api.jc.id.lv/bot/register';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"team":"example","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
team
required
string
name
required
string
Examplegenerated
{ "team": "example", "name": "example"}Responses
Section titled “Responses”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.