Unlocking assets through API (Beta)
Unlock/lock specific assets for certain users through API calls
Last updated
Was this helpful?
Unlock/lock specific assets for certain users through API calls
Last updated
Was this helpful?
This documentation covers a set of API endpoints to manage assets for users, including unlocking and locking them and equipping and unequipping them on avatars.
For all subsequent requests to the Asset endpoints, you need an API Key. Please go to to create one.
You can authorize by adding x-api-key to the header of the request.
Refer to for more info about common error codes and else.
Before you can start unlocking an asset for users you need to have an asset that is locked
- not usable without unlocking. You can think of a locked = true
asset as premium, something that needs to be bought or earned and locked = false
as free.
POST
https://api.readyplayer.me/v1/assets
data.name*
string
Minimum length of 1 character
data.type*
enum(string)
Possible values:
outfit
data.gender*
enum(string)
Possible values:
male
,
female
data.modelUrl*
url
Must be a valid url pointing to a GLB file.
data.iconUrl*
url
Must be a valid url pointing to a PNG or JPG file.
data.organizationId*
string
The id of the organization you wish to create the asset under.
\
\
This is directly linked to your permissions, and you will only be able to create assets for organizations which you have permission to.
data.applicationIds
array
List of application ids, this asset should be added to. If empty, this asset is not added to any application.
data.locked
boolean
If set as true
, the created asset is not usable without unlocking it for the specific user first.
PATCH
https://api.readyplayer.me/v1/assets/:id
id*
string
The id of the asset you want to update.
data.name
string
Minimum length of 1 character
data.type
enum(string)
Possible values:
outfit
data.gender
enum(string)
Possible values:
male
,
female
data.modelUrl
url
Must be a valid url pointing to a GLB file.
data.iconUrl
url
Must be a valid url pointing to a PNG or JPG file.
data.locked
String
If set as true
, the asset is not usable without unlocking it for the specific user first.
Locked assets should be unlocked first to be usable by the user. You should unlock the asset for the user after they have successfully purchased it or claimed through other means.
PUT
https://api.readyplayer.me/v1/assets/:id/unlock
*
String
The id of the asset you want to unlock
data.userId*
String
The id of the user you want to unlock the asset for
If the asset is already unlocked for this user, the endpoint will respond with an error.
While the user might initiate the flow, such as by making a purchase, ensure that the call is made from your backend, as it involves your API key.
You can lock a previously unlocked asset for a given user.
PUT
https://api.readyplayer.me/v1/assets/:id/lock
*
String
The id of the asset you want to lock
data.userId*
String
The id of the user you want to lock the asset for
If the asset hasn’t been unlocked for this user, this endpoint will respond with an error.
Successfully calling this endpoint will also automatically unequip this asset from all of the user’s avatars.
If you unlocked an asset for a user, you can equip the asset to any of your user’s avatars.
PUT
https://api.readyplayer.me/v1/avatars/:id/equip
*
String
The id of the avatar you want to equip the asset to
data.assetId*
String
The id of the asset you want to equip
Similarly, as with equip-asset
, you can also unequip an asset from an avatar.
In the request’s body, provide the avatar’s ID and the asset’s ID.
PUT
https://api.readyplayer.me/v1/avatars/:id/unequip
*
String
The id of the avatar you want to remove the asset from
data.assetId*
String
The id of the asset you want to unequip
See for more information about asset management.