PATCH - Update Asset
Use this endpoint to update an asset
PATCH https://api.readyplayer.me/v1/assets/:id
Path Parameters
Name
Type
Description
id*
string
The id of the asset you want to update.
Request Body
Name
Type
Description
data.name
string
Minimum length of 1 character
data.iconUrl
url
Must be a valid url pointing to a PNG or JPG file.
data.modelUrl
url
Must be a valid url pointing to a GLB file.
data.gender
enum(string)
Possible values: male, female
data.type
enum(string)
Possible values: outfit
{
"data": {
"id": "640f2b0ed1dbab604a9955d0",
"type": "outfit",
"gender": "female",
"iconUrl": "https://example.org/icon.png",
"modelUrl": "https://example.org/model.glb",
"status": "draft",
"organizationId": "53a58ec6df126a3df8ce0d72",
"name": "Asset test updated",
"applicationIds": [],
"createdAt": "2023-03-14T09:32:31.423Z",
"updatedAt": "2023-03-14T09:32:48.804Z",
"publishedAt": "2023-03-14T09:32:48.804Z",
}
}{
"type": "BadRequestError",
"status": 400,
"message": "Bad Request",
"data": {
"body": [
{
"instancePath": "/data/name",
"schemaPath": "#/properties/data/properties/name/minLength",
"keyword": "minLength",
"params": {
"limit": 1
},
"message": "must NOT have fewer than 1 characters"
}
]
}
}{
"type": "ForbiddenError",
"status": 403,
"message": "Cannot execute \"update\" on \"Asset\""
}Example Request Body
{
"data": {
"name": "New Asset",
"type": "outfit",
"gender": "male",
"modelUrl": "https://example.org/model.glb",
}
}Example Response
{
"data": {
"id": "640f2b0ed1dbab604a9955d0",
"type": "outfit",
"gender": "male",
"iconUrl": "https://www.example.org/logo.png",
"modelUrl": "https://www.example.org/model.glb",
"organizationId": "63a58eb6df136d3df8ce0d74",
"name": "asset updated",
"applicationIds": [],
"createdAt": "2023-03-13T13:54:22.559Z",
"updatedAt": "2023-03-13T13:54:22.559Z"
}
}Last updated
Was this helpful?

