ScenebrewDevelopers
API referenceLibrary

Create Asset

POST
/v1/projects/{project_id}/assets

Create a asset in the project. Membership ids given here are linked right after. Requires the write scope.

AuthorizationBearer <token>

First-party API key (sbk_live_…), presented as a Bearer token.

In: header

Path Parameters

project_id*Project Id
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/assets" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "mesh"  }'
{  "name": "string",  "description": "string",  "tags": [],  "metadata": {},  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "slug": "string",  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",  "thumbnail_url": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "type": "string",  "category": "string",  "files": {},  "attachment": {    "media_type": "image/png",    "sha256": "a1abfd410973b0111c215baa879b9edcd739e601659ba44168269767cc2e9108",    "uri": "https://assets.example.invalid/noise-mask.png"  },  "format": "string",  "resolution": [    0  ],  "shader_name": "string",  "shader_parameters": {},  "texture_refs": [    {      "semantic": "string",      "file": "string",      "asset": {        "kind": "recipe",        "slug": "rcp_4p8q1r5t7g3k9x2m",        "uuid": "0199a1c0-0000-7000-8000-000000000013"      },      "resolution": [        0      ]    }  ],  "meshes": [    {      "slot": 0,      "name": "string",      "file": "string",      "material": "string",      "material_asset": {        "kind": "recipe",        "slug": "rcp_4p8q1r5t7g3k9x2m",        "uuid": "0199a1c0-0000-7000-8000-000000000013"      },      "metadata": {}    }  ],  "materials": [    {}  ],  "textures": [    {}  ],  "stored_files": []}