LogoLogo
WebsiteBlogForumsSign up
  • Welcome
  • How Ready Player Me works
  • FAQ
  • 👩‍💻Integration Guides
    • Overview
    • Unity
      • Quickstart
      • Avatar Creator Integration
        • WebView Avatar Creator
          • Avatar Creator for Android & iOS
          • Avatar Creator for WebGL
        • Build your own Avatar Creator
          • Start with the sample
          • Elements
            • Asset Selection Element
            • Color Selection Element
            • Template Selection Element
            • Body Shapes Selection Element
            • Gender Selection Element
            • Avatar List Element
            • Photo Capture Element
            • Signup Element
            • Login Element
            • Logout Element
          • User Management
      • Load 2D Renders
      • Avatar Loader Window
      • Setup Multiplayer
      • Setup for XR (Beta)
        • Setup the Player Avatar
        • Setup Meta Movement SDK
        • Setup Final IK
        • Setup XR Hands
          • RpmHandDriver script
        • Facial Animations
        • VR Avatar Creator
      • Animations
        • Ready Player Me Animation Library
        • Mixamo Animations
      • Optimize
        • Avatar Configuration
        • Avatar Caching
        • Defer Agents
      • Code Samples
        • Loading 3D Avatars
        • Loading 2D Avatars
        • Avatar Creator (WebGL)
        • Avatar Creator (Desktop)
        • Avatar Creator (Mobile)
        • Distance-based LODs
      • Troubleshooting
        • Editor UI Window Issues
        • Avatar loading issues
        • iOS issues
        • WebGL issues
        • Firewall issues
        • Updating the SDK
          • Unity SDK 3.0.0 Migration guide
          • Unity SDK 4.0.0 Migration guide
          • Unity SDK 5.0.0
          • Unity SDK 7.0.0
          • WebView 2.0 Migration
        • Package installation issues
      • Help us improve the Unity SDK
      • FAQ for Unity
      • Early Access Features
    • Unreal Engine
      • Quickstart
        • Import SDK Manually
      • Avatar Creator Integration
        • Build your own Avatar Creator
          • Sample Structure
          • Customization Guide
        • WebView Avatar Creator
      • Load Avatars
      • Animations
        • Ready Player Me Animation Library
        • Loading Mixamo animations
        • Mannequin animation retargeting
        • Blender FBX export to UE
        • Oculus Lipsync integration
      • Optimize
        • Avatar configuration
        • Avatar caching
        • Avatar preloading
      • Code Samples
        • Unreal Engine 5 samples
        • Lyra project integration example
        • VR Avatars
        • Unreal Engine 4
      • Troubleshooting
        • Project compilation issues
        • Missing materials on built applications
        • Avatar loading issues
        • Animation issues
        • Unreal SDK breaking changes
        • Avatar lighting issues
        • Updating from earlier versions
          • Unreal SDK 3.0.0 Migration guide
        • Auto LOD issues
      • Help us improve the Unreal Engine SDK
      • FAQ for Unreal Engine
      • Early Access Features
    • React
      • Quickstart
    • React Native
    • iOS Native
    • Android Native
    • Web Integration
      • Quickstart
      • User Management
        • Guest Accounts
        • Account Linking
      • Avatar Creator integration
      • Optimize
    • API Integration
      • Quickstart
      • Custom Avatar Creator
      • User management
        • Ready Player Me Account
        • Anonymous Accounts
    • UX/UI Guidelines
      • Summary & quick tips
      • UX and UI guidelines and essentials
        • Foundation for good user experience
          • Layout
          • Colors
          • Typography
          • Icons
          • Dark mode and light mode
        • Mobile best practices
          • Layout
        • Making Ready Player Me feel native
          • Seamless Avatar Integration
          • Consistent Branding
          • Responsive Layout
          • Performance Optimization
        • Discoverability of the avatar editor
          • Onboarding tutorial
          • Clear navigation
          • Contextual Placement
  • 🖌️Customizing Guides
    • Studio (Developer Dashboard)
    • Avatar Creator Appearance
      • Avatar URLs
      • Avatar Shortcodes
    • Upload and Manage Custom Assets
      • Asset Manager in Studio
      • Configure in Studio
      • Manage custom assets using the API
      • Unlocking assets through API (Beta)
    • Create Custom Assets
      • Fullbody Outfits
        • Checking Skin Weights
      • Tops, Bottoms, Shoes
        • Editing templates
      • Hairstyle
      • Headwear
      • Facewear
      • Glasses
      • Hero Characters
      • Modeling Guidelines
  • 🔃API Reference
    • REST API
      • Authentication
      • Avatars
        • GET - 3D avatar
        • GET - 2D Render of an Avatar
        • GET - Metadata
        • PUT - Equip an asset
        • PUT - Unequip an asset
      • Assets
        • Asset Entity Properties
        • POST - Create Asset
        • GET - List Assets
        • PATCH - Update Asset
        • POST - Upload Asset Files
        • POST - Add Asset to Application
        • DELETE - Remove Asset from Application
        • PUT - Unlock asset for a user
        • PUT - Lock asset for a user
      • Users
        • POST - Create User
      • Auth
        • GET - Token
      • Changelog
    • Avatars
      • Full-body avatars
      • Full-body XR avatars
      • Half-body avatars
      • Morph targets
        • Apple ARKit
        • Oculus OVR LipSync
    • Avatar Creator
  • 🔉Support
    • Forums
    • Licensing & Privacy
Powered by GitBook
On this page
  • Authorizing requests:
  • 1. Create a locked asset
  • Use this endpoint to create a new locked asset by setting locked property as true
  • Use this endpoint to turn an existing asset into a locked asset
  • 2. Unlock an Asset for the User
  • Use this endpoint for unlocking an asset for a user
  • 3. Lock an Asset for a User
  • Use this endpoint for locking an unlocked asset for a user
  • 4. Equip an Asset on an Avatar
  • Use this endpoint to equip an unlocked asset to a user's avatar
  • 5. Unequip an Asset from an Avatar
  • Use this endpoint to unequip an asset from a user's avatar

Was this helpful?

  1. Customizing Guides
  2. Upload and Manage Custom Assets

Unlocking assets through API (Beta)

Unlock/lock specific assets for certain users through API calls

PreviousManage custom assets using the APINextCreate Custom Assets

Last updated 11 months ago

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.

Authorizing requests:

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.

--header 'x-api-key: {your-api-key}'

Refer to for more info about common error codes and else.

The API key needs to have "WRITE" permissions for Users, Assets and Avatars.

1. Create a locked asset

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.

Use this endpoint to create a new locked asset by setting locked property as true

POST https://api.readyplayer.me/v1/assets

Request Body

Name
Type
Description

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.

{
    "data": {
        "id": "640f2b0ed1dbab604a9955d0",
        "type": "outfit",
        "gender": "male",
        "iconUrl": "https://www.example.org/logo.png",
        "modelUrl": "https://www.example.org/model.glb",
        "status": "draft",
        "organizationId": "63a58eb6df136d3df8ce0d74",
        "name": "My new asset",
        "applicationIds": [],
        "createdAt": "2023-03-13T13:54:22.559Z",
        "updatedAt": "2023-03-13T13:54:22.559Z",
        "publishedAt": "2023-03-13T13:54:22.559Z",
    }
}
{
    "type": "BadRequestError",
    "status": 400,
    "message": "Bad Request",
    "data": {
        "body": [
            {
                "instancePath": "/data",
                "schemaPath": "#/properties/data/required",
                "keyword": "required",
                "params": {
                    "missingProperty": "name"
                },
                "message": "must have required property 'name'"
            }
        ]
    }
}
{
    "type": "ForbiddenError",
    "status": 403,
    "message": "Cannot execute \"create\" on \"Asset\""
}

Use this endpoint to turn an existing asset into a locked 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.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.

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

2. Unlock an Asset for the User

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.

Use this endpoint for unlocking an asset for a user

PUT https://api.readyplayer.me/v1/assets/:id/unlock

Path Parameters

Name
Type
Description

*

String

The id of the asset you want to unlock

Request Body

Name
Type
Description

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.

3. Lock an Asset for a User

You can lock a previously unlocked asset for a given user.

Use this endpoint for locking an unlocked asset for a user

PUT https://api.readyplayer.me/v1/assets/:id/lock

Path Parameters

Name
Type
Description

*

String

The id of the asset you want to lock

Request Body

Name
Type
Description

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.

4. Equip an Asset on an Avatar

If you unlocked an asset for a user, you can equip the asset to any of your user’s avatars.

Use this endpoint to equip an unlocked asset to a user's avatar

PUT https://api.readyplayer.me/v1/avatars/:id/equip

Path Parameters

Name
Type
Description

*

String

The id of the avatar you want to equip the asset to

Request Body

Name
Type
Description

data.assetId*

String

The id of the asset you want to equip

5. Unequip an Asset from an Avatar

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.

Use this endpoint to unequip an asset from a user's avatar

PUT https://api.readyplayer.me/v1/avatars/:id/unequip

Path Parameters

Name
Type
Description

*

String

The id of the avatar you want to remove the asset from

Request Body

Name
Type
Description

data.assetId*

String

The id of the asset you want to unequip

See for more information about asset management.

🖌️
Studio -> API Keys
API docs
Manage custom outfits using the API