Create a competition
POST/v1/competitions
const url = 'https://api.ligr.live/rest/v1/competitions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","gfxName":"example","sport":"football","age":"Adults","gender":"Male","gradeId":1}'};
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://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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Competition metadata. Omitted age, gender, and gradeId values default to Unknown. No grade lookup is required.
object
Default Entity name
Entity identifier
Responses
Section titled “Responses”Created
object
Entity identifier
Default Entity name
Name predominantly display in graphics
object
CDN URL of the competition logo. Present only on the competition routes.
CDN URL of the primary watermark. Present only on the competition routes.
CDN URL of the secondary watermark. Present only on the competition routes.
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
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Competition not found
object
Examplegenerated
{ "message": "example"}Organization has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}