Register a webhook
POST
/bot/webhook
const url = 'https://play-api.jc.id.lv/bot/webhook';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com"}'};
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/webhook \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com" }'Register an HTTPS callback the server POSTs turns to. The URL must be HTTPS and resolve to a public address; the server runs an ownership handshake before storing it. Registered bots only; enabled per server.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string format: uri
Examplegenerated
{ "url": "https://example.com"}Responses
Section titled “Responses”Registered. The signing secret is shown exactly once.
Media typeapplication/json
object
url
required
string format: uri
secret
required
Per-bot HMAC key; shown once.
string
Examplegenerated
{ "url": "https://example.com", "secret": "example"}The caller is anonymous or static; this feature needs a registered identity.
URL-policy violation or failed handshake (the body says which).
Rate limited — check the Retry-After header.
Webhooks disabled on this server.