General API reference
Every general 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.
General
List the boards this key reaches, newest first.
Responses
| Status | Meaning | Error codes | Body |
|---|---|---|---|
200 |
OK | — | BoardList |
401 |
Missing, invalid, expired or revoked key | unauthorized |
Error |
429 |
Too many requests | rate_limited |
Error |
500 |
Internal server error | internal_error |
Error |
Response body (200) — BoardList (JSON)
| Field | Type | Always present | Description |
|---|---|---|---|
boards |
array of BoardSummary | no | Newest first. |
Create a board from a template, a blank sport scoreboard, or a plain leaderboard.
Body: exactly one of `template_slug`, `sport` or `board_type` (only "LEADERBOARD": a plain leaderboard on Leaderboarded); optional `brand` (sport only, defaults to the brand of the host called), `name`, and `participants` (`[{"name": str, "score"?: number}]`, LEADERBOARD only), which replace a template's demo participants or seed a plain leaderboard. A `participants` list is never empty and holds at most the plan's participant limit; a per-call cap also applies, and the error names the limit. A longer list refuses the whole create. Needs an admin key that reaches all boards. Not safe to retry: there is no idempotency key yet, so a repeated request creates a second board. After a timeout, read the board before you send it again.
Responses
| Status | Meaning | Error codes | Body |
|---|---|---|---|
201 |
Created | — | BoardCreated |
400 |
Bad Request | validation_error |
Error |
401 |
Missing, invalid, expired or revoked key | unauthorized |
Error |
403 |
Forbidden | forbidden |
Error |
409 |
Conflict | board_quota_exceeded, plan_required, creation_cooldown, participant_limit_reached, validation_error |
Error |
429 |
Too many requests | rate_limited |
Error |
500 |
Internal server error | internal_error |
Error |
503 |
Service Unavailable | service_unavailable |
Error |
Response body (201) — BoardCreated (JSON)
| Field | Type | Always present | Description |
|---|---|---|---|
board |
object | no | The new board, as the list returns it. |
Delete a board. Needs a key with the admin permission.
Destructive: It deletes the board with all its participants and scores, and no API call undoes it. Ask the user before calling this.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
board_token |
string | yes |
Responses
| Status | Meaning | Error codes | Body |
|---|---|---|---|
204 |
No Content | — | — |
401 |
Missing, invalid, expired or revoked key | unauthorized |
Error |
403 |
Forbidden | forbidden |
Error |
404 |
Not Found | board_not_found |
Error |
429 |
Too many requests | rate_limited |
Error |
500 |
Internal server error | internal_error |
Error |
Return all sport scoreboard data as JSON.
The answer is the scoreboard's whole document. Its sections depend on the sport; most sports have home, away, game, board and timers.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes | The token of the board to retrieve. |
Responses
| Status | Meaning | Error codes | Body |
|---|---|---|---|
200 |
OK | — | SportDataResponse |
403 |
A board token was sent without an API key | — | — |
404 |
Board not found | — | — |
429 |
Too many requests | — | — |
500 |
Internal server error | — | — |
Response body (200) — SportDataResponse (JSON)
| Field | Type | Always present | Description |
|---|---|---|---|
type |
string | yes | The scoreboard's type |
home |
object | no | The home team: name, colours, score and the sport's own counters |
away |
object | no | The away team, with the same fields as the home team |
game |
object | no | The state of the game: period, possession and so on |
board |
object | no | The scoreboard's settings: layout, labels and switches |
timers |
object | no | The clocks, each with its state and its settings |
board_token |
string | no | The board token. Only in answers to an API key or to the board's admin token. |
List the templates a board can be created from. No key needed.
Responses
| Status | Meaning | Error codes | Body |
|---|---|---|---|
200 |
OK | — | TemplateList |
429 |
Too many requests | rate_limited |
Error |
500 |
Internal server error | internal_error |
Error |
Response body (200) — TemplateList (JSON)
| Field | Type | Always present | Description |
|---|---|---|---|
templates |
array of Template | no | In gallery order. |
Models
| Field | Type | Always present | Description |
|---|---|---|---|
board_token |
string | no | Names the board in /api/<board_token>/… with the same key. Grants nothing on its own. |
title |
string | no | |
custom_name |
string | no | |
type |
string | no | |
sport |
string | no | |
brand |
string | no | The brand the board was created on. |
created |
string | no | ISO 8601 timestamp. |
updated |
string | no | ISO 8601 timestamp. |
| Field | Type | Always present | Description |
|---|---|---|---|
slug |
string | no | Pass as `template_slug` to POST /api/v1/account/boards. |
name |
string | no | |
description |
string | no | |
type |
string | no | The board type it creates. |
sport |
string | no | |
brand |
string | no | The brand a board made from it lands on. |
accepts_participants |
boolean | no | Whether the create takes a `participants` list with this template. |