POST - Create Asset

Note: All body parameters need to be inside a 'data' object, as shown in the example request at the bottom.

Use this endpoint to create a new asset

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, neutral

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 access to.

data.applications

array

List of applications-asset relations this defines to which applications this asset should be linked to. If empty, this asset is not added to any applications.

data.locked

boolean

default: false

Returns the created asset entity

Example Request Body

{
    "data": {
        "name": "New Asset",
        "type": "outfit",
        "gender": "male",
        "locked": false,
        "modelUrl": "https://example.org/model.glb",
        "iconUrl": "https://example.org/icon.png",
        "organizationId": "62a58eb4df136d4df8ce0d74",
        "applications": [
            {
                 "id": "6479be53386e0a8665161420",
                 "organizationId": "62a58eb4df136d4df8ce0d74",
                 "isVisibleInEditor": true
            }
        ],
    }
}

Last updated