Skip to content

Create a theme

POST/v2/themes

POST
/v2/themes
curl --request POST \
--url https://api.ligr.live/rest/v2/themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "sports": [ "football" ], "variables": [ { "id": "example", "name": "example", "type": "string", "defaultValue": "example", "description": "example", "enumOptions": [ "example" ], "isStyle": true } ] }'

Beta. This operation can change between minor versions. See Beta status.

Creates a theme your organization owns. The theme appears on the Themes page of the dashboard and in the competition theme picker like any other theme, once a theme version is active. Your organization can own up to five themes.

Media typeapplication/json

Body of POST /v2/themes.

object
name
required
string
>= 1 characters
sports
required

Sport keys the theme supports, for example ["football"]. At least one.

Array<string>
>= 1 items
Allowed values: football rugbyUnion rugbyLeague netball cricket futsal iceHockey fieldHockey waterPolo handBall lacrosse touchFootball ausRules basketball rugbySevens gridiron volleyball baseball tennis
variables

Theme variables the graphics can read. Default: none.

Array<object>

A theme variable an operator sets per competition: a colour, a label or a sponsor name.

object
id
required

Use the same string as name.

string
name
required

Unique within the theme.

string
type
required
string
Allowed values: string number boolean enum
defaultValue

The value in force when a competition sets nothing.

string
nullable
description
string
nullable
enumOptions

Required for enum, at least one option.

Array<string>
nullable
isStyle

True when the variable holds a colour, a font or another style value.

boolean
nullable

Created

Media typeapplication/json
object
id
required

Entity identifier

integer format: int32
>= 1
name
required
string
activeVersion
required

Theme version the overlays render. Null means no version is active.

integer format: int32
nullable
versions
required

Published theme version numbers, in ascending order.

Array<integer>
graphics
required
Array<object>
object
graphicId
required

Stable graphic identifier. It does not change between versions.

string
name
required
string
type
required

code or rive.

string
workingVersion
required

Version number of the editable working copy.

integer format: int32
publishedVersions
required

Published version numbers, in ascending order.

Array<integer>
Examplegenerated
{
"id": 1,
"name": "example",
"activeVersion": 1,
"versions": [
1
],
"graphics": [
{
"graphicId": "example",
"name": "example",
"type": "example",
"workingVersion": 1,
"publishedVersions": [
1
]
}
]
}

Request is invalid

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Theme not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Your organization owns as many themes as it can create

Media typeapplication/json

Body of a 409 answer when the organization owns as many themes as it can create.

code is always THEME_LIMIT_REACHED.

object
message
required
string
code
required
string
Examplegenerated
{
"message": "example",
"code": "example"
}

Api key has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}