Skip to content

Create a competition

POST/v1/competitions

POST
/v1/competitions
curl --request POST \
--url https://api.ligr.live/rest/v1/competitions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "gfxName": "example", "sport": "football", "age": "Adults", "gender": "Male", "gradeId": 1 }'

Creates a competition. Matches inherit the default rules for the selected sport.

Media typeapplication/json

Competition metadata. Omitted age, gender, and gradeId values default to Unknown. No grade lookup is required.

object
name
required

Default Entity name

string
>= 6 characters <= 39 characters
gfxName
string
sport
required
string
Allowed values: football rugbyUnion rugbyLeague netball cricket futsal iceHockey fieldHockey waterPolo handBall lacrosse touchFootball ausRules basketball rugbySevens gridiron volleyball baseball tennis
age
string
Allowed values: Adults U7 U8 U9 U10 U11 U12 U13 U14 U15 U16 U17 U18 U19 U20 U21 U22 U23 Senior Unknown
gender
string
Allowed values: Male Female Mixed Unknown
gradeId

Entity identifier

integer format: int32
>= 1

Created

Media typeapplication/json
object
id
required

Entity identifier

integer format: int32
>= 1
name
required

Default Entity name

string
>= 6 characters <= 39 characters
gfxName
required

Name predominantly display in graphics

string
nullable >= 6 characters <= 19 characters
sport
required
string
Allowed values: football rugbyUnion rugbyLeague netball cricket futsal iceHockey fieldHockey waterPolo handBall lacrosse touchFootball ausRules basketball rugbySevens gridiron volleyball baseball tennis
dataProvider
object
name
required
string
Allowed values: RB OPTA_CRICKET OPTA_FOOTBALL OPTA_RUGBY_UNION STATSLLC GENIUS_BASKETBALL GENIUS_GRIDIRON GENIUS_VOLLEYBALL GENIUS_FOOTBALL GENIUS_ICE_HOCKEY PIXELLOT CLOUDMIX CHAMPION ligr-live-score MLB IMG_FOOTBALL CRIONET_TENNIS SPORT_RADAR_FOOTBALL
id
required
string
logoUrl

CDN URL of the competition logo. Present only on the competition routes.

string
watermarkUrl

CDN URL of the primary watermark. Present only on the competition routes.

string
secondaryWatermarkUrl

CDN URL of the secondary watermark. Present only on the competition routes.

string
matchConfig

The match rules that every match of the competition inherits: the periods, the clock, the data coverage and, for some sports, rules. The shape depends on the sport. A match config overrides these values for one match. Change them with PATCH /v1/competitions/{competitionId}.

Example
{
"id": 24,
"name": "UEFA Champions League",
"gfxName": "Champions League",
"sport": "football",
"matchConfig": {
"startingLineupSize": 11,
"maxBenchSize": 7,
"periods": {
"regular": {
"number": 2,
"name": "Regular",
"length": 45,
"breakLength": 15
}
},
"dataCoverage": {
"stats": "minimum"
}
}
}

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"
}

Competition not found

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

Organization 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"
}