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.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.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.applicationIds

array

List of application ids, this asset should be added to. If empty, this asset is not added to any application.

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

Example Request Body

{
    "data": {
        "name": "New Asset",
        "type": "outfit",
        "gender": "male",
        "modelUrl": "https://example.org/model.glb",
        "iconUrl": "https://example.org/icon.png",
        "organizationId": "62a58eb4df136d4df8ce0d74",
        "applicationIds": ["63a48eb488936d4df8ce0d74","63a48eb488939999f8ce0d74"]
    }
}

Last updated

#130: Asset API

Change request updated