Skip to content

Create an image template

POST/v1/image-templates

POST
/v1/image-templates
curl --request POST \
--url https://api.ligr.live/rest/v1/image-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "width": 1, "height": 1, "entityType": "player", "sport": "football" }'

Creates an image template. The size, the entity type and the sport cannot change later.

Media typeapplication/json

Create an image template. The size, the entity type and the sport cannot change later.

object
name
required
string
>= 1 characters <= 255 characters
width
required
integer format: int32
>= 1 <= 8192
height
required
integer format: int32
>= 1 <= 8192
entityType
required

The kind of entity a template holds one image for.

string
Allowed values: player team competition
sport
required
string
Allowed values: football rugbyUnion rugbyLeague netball cricket futsal iceHockey fieldHockey waterPolo handBall lacrosse touchFootball ausRules basketball rugbySevens gridiron volleyball baseball tennis

Created

Media typeapplication/json

One image slot, such as a player cut-out or a team banner, with a fixed pixel size. Each player, team or competition of the entity type can hold one image for the template.

object
id
required

Entity identifier

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

Pixel width every image of the template must have.

number format: double
height
required

Pixel height every image of the template must have.

number format: double
entityType
required

The kind of entity a template holds one image for.

string
Allowed values: player team competition
sport
required
string
Allowed values: football rugbyUnion rugbyLeague netball cricket futsal iceHockey fieldHockey waterPolo handBall lacrosse touchFootball ausRules basketball rugbySevens gridiron volleyball baseball tennis
defaultImageUrl
required

URL of the default image. Null: the template has no default image.

string
nullable
defaultFileId
required

File id of the default image. Send it as defaultFileId on a Rive asset exposure to use it as the fallback image. Null: the template has no default image.

number format: double
nullable
createdAt
required
string
updatedAt
required
string
Example
{
"entityType": "player",
"sport": "football"
}

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

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