POST - Upload Asset Files

Use this endpoint to upload asset models and icons

POST https://api.readyplayer.me/v1/temporary-media

If the model and icon files you wish to use for your assets aren't available on a public URL, you can use this endpoint to upload the files to Ready Player Me. This endpoint will return a URL for each file upload which you can then use in POST - Create Asset, or PATCH - Update Asset.

Headers

NameTypeDescription

Content-Type*

multipart/form-data

Request Body

NameTypeDescription

file*

file

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

Please note, that this is only temporary storage. Files uploaded to this endpoint are being removed after 24h

Example Response

{
    "data": {
        "url": "your-image-or-model-url"
    }
}

Last updated