Create an import upload
POST/v2/themes/{themeId}/rive-graphics/uploads
POST
/v2/themes/{themeId}/rive-graphics/uploads
const url = 'https://api.ligr.live/rest/v2/themes/1/rive-graphics/uploads';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"filename":"example","size":1,"sha256":"example","retainSource":true,"target":{"graphicId":"example","assetId":"example","updatedAt":"example","lockToken":"example"}}'};
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/v2/themes/1/rive-graphics/uploads \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filename": "example", "size": 1, "sha256": "example", "retainSource": true, "target": { "graphicId": "example", "assetId": "example", "updatedAt": "example", "lockToken": "example" } }'Beta. This operation can change between minor versions. See Beta status.
Create a signed upload session for a native Rive source.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”themeId
required
number format: double
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
filename
required
string
size
required
integer format: int32
sha256
required
Lowercase hexadecimal SHA-256.
string
retainSource
Preserve an editable source or complete project archive. Defaults to false.
boolean
target
object
graphicId
required
string
assetId
Selects one existing Rive asset for replacement. Omit only for an empty draft.
string
updatedAt
required
ISO 8601 timestamp of the working draft.
string
lockToken
REST acquires an API-key lock; a dashboard token is not required.
string
Examplegenerated
{ "filename": "example", "size": 1, "sha256": "example", "retainSource": true, "target": { "graphicId": "example", "assetId": "example", "updatedAt": "example", "lockToken": "example" }}Responses
Section titled “Responses”Created
Media typeapplication/json
object
jobId
required
string
candidateId
required
string
url
required
string
expiresAt
required
string
headers
required
object
x-amz-checksum-sha256
required
string
Examplegenerated
{ "jobId": "example", "candidateId": "example", "url": "example", "expiresAt": "example", "headers": { "x-amz-checksum-sha256": "example" }}Invalid Rive request
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Theme, import, graphic, version, or file not found
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive import or graphic state conflict
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive candidate or source is no longer available
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive file or configuration cannot be used
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive source imports are unavailable
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}