Skip to main content
All docs

Basketball API reference

Every basketball endpoint of the KeepTheScore API, with its parameters, request body and responses, generated from the live API.

Keys, tokens, request bodies and rate limits are explained in the API guide. In the paths below, {token} is a board token when you send an API key, or one of the board's own tokens without one.

This page is generated from the live API. The same reference is available as OpenAPI 3 at /apispec.json, if you'd rather generate a client than read tables.

Basketball

POST /api/v1/sport/{token}/basketball/away/bonus/toggle

Toggle bonus for away team in basketball.

When show_double_bonus is enabled on the board, this cycles through three states: no bonus -> bonus -> double bonus -> no bonus When show_double_bonus is disabled, this performs a simple toggle: no bonus <-> bonus If double_bonus is active and the bonus is toggled off, double_bonus is also turned off.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
204 No Content —
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —
POST /api/v1/sport/{token}/basketball/away/fouls/increment

Increment away team fouls for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/away/points/increment

Increment away team points for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/away/timeouts/increment

Increment away team timeouts for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/final/toggle

Toggle the FINAL state of a basketball scoreboard.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/home/bonus/toggle

Toggle bonus for home team in basketball.

When show_double_bonus is enabled on the board, this cycles through three states: no bonus -> bonus -> double bonus -> no bonus When show_double_bonus is disabled, this performs a simple toggle: no bonus <-> bonus If double_bonus is active and the bonus is toggled off, double_bonus is also turned off.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
204 No Content —
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —
POST /api/v1/sport/{token}/basketball/home/fouls/increment

Increment home team fouls for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/home/points/increment

Increment home team points for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/home/timeouts/increment

Increment home team timeouts for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/period/increment

Increment period for basketball.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/possession/toggle

Toggle possession between home and away teams.

When toggling possession, one team gets possession and the other loses it.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message
POST /api/v1/sport/{token}/basketball/reset

Reset all game state to initial values for a new basketball game.

Path parameters

NameTypeRequiredDescription
token string yes

Responses

StatusMeaningBody
200 OK MessageResponse
400 Malformed request —
403 This token does not allow the board to be edited —
404 Board not found —
429 Too many requests —
500 Internal server error —

Response body (200) — MessageResponse (JSON)

FieldTypeAlways presentDescription
message string yes Status message