Create a challenge
POST
/bot/challenge
const url = 'https://play-api.jc.id.lv/bot/challenge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"team":"example","name":"example","timeControl":{"Unlimited":{}}}'};
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/challenge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "team": "example", "name": "example", "timeControl": { "Unlimited": {} } }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
team
required
string
name
required
string
timeControl
Optional — the server defaults an omitted time control to Unlimited.
object
One of:
A single-key time-control wrapper.
object
Unlimited
required
object
A single-key time-control wrapper.
object
SuddenDeath
required
object
initialSeconds
required
integer
A single-key time-control wrapper.
object
Fischer
required
object
initialSeconds
required
integer
incrementSeconds
required
integer
A single-key time-control wrapper.
object
PerMove
required
object
secondsPerMove
required
integer
Examplegenerated
{ "team": "example", "name": "example", "timeControl": { "Unlimited": {} }}Responses
Section titled “Responses”Challenge created.
Media typeapplication/json
object
id
required
string
challenger
required
target
required
timeControl
required
One of:
A single-key time-control wrapper.
object
Unlimited
required
object
A single-key time-control wrapper.
object
SuddenDeath
required
object
initialSeconds
required
integer
A single-key time-control wrapper.
object
Fischer
required
object
initialSeconds
required
integer
incrementSeconds
required
integer
A single-key time-control wrapper.
object
PerMove
required
object
secondsPerMove
required
integer
targetOnline
Advisory — whether the target holds an account stream.
boolean
Examplegenerated
{ "id": "example", "challenger": { "Guest": { "id": "example" } }, "target": { "Guest": { "id": "example" } }, "timeControl": { "Unlimited": {} }, "targetOnline": true}Challenging yourself.
Too many pending challenges.