Assets (v1)
OpenCloud v1 reference for Assets.
Base URL: https://apis.roblox.com/assets
Endpoints
Section titled “Endpoints”| Method | Path | Name |
|---|---|---|
POST | /v1/assets | postAssets |
GET | /v1/assets/:assetId | getAssetsAssetId |
PATCH | /v1/assets/:assetId | patchAssetsAssetId |
POST | /v1/assets/:assetId:archive | postAssetsAssetIdArchive |
POST | /v1/assets/:assetId:restore | postAssetsAssetIdRestore |
GET | /v1/assets/:assetId/versions | getAssetsAssetIdVersions |
POST | /v1/assets/:assetId/versions:rollback | postAssetsAssetIdVersionsRollback |
GET | /v1/assets/:assetId/versions/:versionNumber | getAssetsAssetIdVersionsVersionNumber |
GET | /v1/operations/:operationId | getOperationsOperationId |
postAssets
Section titled “postAssets”POST /v1/assets
Creates an asset with provided content and metadata. You can’t add SocialLink objects when you create an asset. Instead, use Update Asset. Provide the Asset, binary asset file path, and content type in the form data.
Scopes: asset:read, asset:write
Usage
import { fetchApi } from 'rozod';import { postAssets } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(postAssets, { body: { /* ... */ }});Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
request | object | See below |
fileContent | File |
request fields:
| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
path | string | |
done | boolean | |
error | object | See below |
response | object | See below |
error fields:
| Field | Type | Description |
|---|---|---|
code | number | |
message | string |
response fields:
| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Invalid argument. Failed to parse the request or the file. |
| 401 | The API key is not valid for this operation / You don’t have the authorization. |
| 500 | Server internal error / Unknown error. |
getAssetsAssetId
Section titled “getAssetsAssetId”GET /v1/assets/:assetId
Retrieve specific asset metadata.
Scopes: asset:read
Usage
import { fetchApi } from 'rozod';import { getAssetsAssetId } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(getAssetsAssetId, { assetId: /* string */, readMask: /* string? */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
readMask | string? | No | Asset metadata fields to retrieve, including the description, display name, icon, social links, and previews. Examples: description%2CdisplayName, previews%2CtwitchSocialLink. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Malformed request, likely due to an invalid read mask. |
| 401 | The API key is not valid for this operation / You don’t have the authorization. |
| 403 | Doesn’t have the required permission. |
| 404 | Asset doesn’t exist. |
| 500 | Server internal error / Unknown error. |
patchAssetsAssetId
Section titled “patchAssetsAssetId”PATCH /v1/assets/:assetId
Updates an asset with provided content and metadata, including the description, display name, icon, social links, and previews. Currently can only update the content body for Models. Icons and Previews must be Image assets. Icons must have square dimensions. Provide the Asset, binary asset file path, and content type in the form data.
Scopes: asset:read, asset:write
Usage
import { fetchApi } from 'rozod';import { patchAssetsAssetId } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(patchAssetsAssetId, { assetId: /* string */, updateMask: /* string? */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
updateMask | string? | No | Asset metadata fields to update, including the description, display name, icon, and previews. Examples: description%2CdisplayName, previews%2CtwitchSocialLink. |
Request Body
Section titled “Request Body”All fields are optional (PATCH partial update)
| Field | Type | Description |
|---|---|---|
request | object | See below |
fileContent | File |
request fields:
| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
path | string | |
done | boolean | |
error | object | See below |
response | object | See below |
error fields:
| Field | Type | Description |
|---|---|---|
code | number | |
message | string |
response fields:
| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Invalid argument. Failed to parse the request or the file. |
| 401 | The API key is not valid for this operation / You don’t have the authorization. |
| 500 | Server internal error / Unknown error. |
postAssetsAssetIdArchive
Section titled “postAssetsAssetIdArchive”POST /v1/assets/:assetId:archive
Archives the asset. Archived assets disappear from the website and are no longer usable or visible in Roblox experiences, but you can restore them.
Scopes: asset:read, asset:write
Usage
import { fetchApi } from 'rozod';import { postAssetsAssetIdArchive } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(postAssetsAssetIdArchive, { assetId: /* string */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Bad request - invalid request. |
| 403 | Forbidden - API key without Write scope or user doesn’t have access. |
| 404 | Asset not found. |
postAssetsAssetIdRestore
Section titled “postAssetsAssetIdRestore”POST /v1/assets/:assetId:restore
Restores an archived asset.
Scopes: asset:read, asset:write
Usage
import { fetchApi } from 'rozod';import { postAssetsAssetIdRestore } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(postAssetsAssetIdRestore, { assetId: /* string */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Bad request - invalid request. |
| 403 | Forbidden - API key without Write scope or user doesn’t have access. |
| 404 | Asset not found. |
getAssetsAssetIdVersions
Section titled “getAssetsAssetIdVersions”GET /v1/assets/:assetId/versions
List all versions of a specific asset, with optional pagination.
Scopes: asset:read
Usage
import { fetchApi } from 'rozod';import { getAssetsAssetIdVersions } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(getAssetsAssetIdVersions, { assetId: /* string */, maxPageSize: /* integer? */, pageToken: /* string? */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
maxPageSize | integer? | No | Specifies the number of asset versions to include in the response. Valid values range from 1 to 50 (inclusive). Defaults to 8 when not provided. |
pageToken | string? | No | A token for pagination. The value is obtained from a previous request and allows for retrieving the next page of asset versions. |
Response
Section titled “Response”Array of objects:
| Field | Type | Description |
|---|---|---|
creationContext | object | See below |
path | string | |
moderationResult | object | See below |
published | boolean |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Bad request - invalid parameters. |
| 403 | Forbidden - API key without Read scope or user doesn’t have access. |
| 404 | Asset not found. |
postAssetsAssetIdVersionsRollback
Section titled “postAssetsAssetIdVersionsRollback”POST /v1/assets/:assetId/versions:rollback
Rollback an asset to a specific previous version. Provide the asset version path in the form data.
Scopes: asset:read, asset:write
Usage
import { fetchApi } from 'rozod';import { postAssetsAssetIdVersionsRollback } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(postAssetsAssetIdVersionsRollback, { assetId: /* string */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
assetVersion | string |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
creationContext | object | See below |
path | string | |
moderationResult | object | See below |
published | boolean |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Bad request - invalid request body. |
| 403 | Forbidden - API key without Write scope or user doesn’t have access. |
| 404 | Asset or Asset Version not found. |
getAssetsAssetIdVersionsVersionNumber
Section titled “getAssetsAssetIdVersionsVersionNumber”GET /v1/assets/:assetId/versions/:versionNumber
Retrieve a specific asset version by the asset ID and the version number.
Scopes: asset:read
Usage
import { fetchApi } from 'rozod';import { getAssetsAssetIdVersionsVersionNumber } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(getAssetsAssetIdVersionsVersionNumber, { assetId: /* string */, versionNumber: /* string */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | string | Yes | The unique identifier of the asset. |
versionNumber | string | Yes | The version number. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
creationContext | object | See below |
path | string | |
moderationResult | object | See below |
published | boolean |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 403 | Forbidden - API key without Read scope or user doesn’t have access. |
| 404 | Asset or Asset Version not found. |
getOperationsOperationId
Section titled “getOperationsOperationId”GET /v1/operations/:operationId
Get the result of an asset creation or update using the returned Operation ID. Requires Read for the API key permission and asset:read for OAuth 2.0 apps.
Scopes: asset:read
Usage
import { fetchApi } from 'rozod';import { getOperationsOperationId } from 'rozod/lib/opencloud/v1/assets';
const data = await fetchApi(getOperationsOperationId, { operationId: /* string */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
operationId | string | Yes | The unique identifier of the operation. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
path | string | |
done | boolean | |
error | object | See below |
response | object | See below |
error fields:
| Field | Type | Description |
|---|---|---|
code | number | |
message | string |
response fields:
| Field | Type | Description |
|---|---|---|
assetType | string | |
assetId | number | |
creationContext | object | See below |
description | string | |
displayName | string | |
path | string | |
revisionId | string | |
revisionCreateTime | string | |
moderationResult | object | See below |
icon | string | |
previews | object[] | See below |
state | `“Unspecified" | "Active" |
socialLink | object | See below |
creationContext fields:
| Field | Type | Description |
|---|---|---|
assetPrivacy | `“default" | "restricted" |
creator | object | See below |
expectedPrice | number |
creator fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
groupId | number |
moderationResult fields:
| Field | Type | Description |
|---|---|---|
moderationState | string |
previews[] item fields:
| Field | Type | Description |
|---|---|---|
asset | string | |
altText | string |
socialLink fields:
| Field | Type | Description |
|---|---|---|
title | string | |
uri | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | Invalid argument. Failed to parse the request or the file. |
| 401 | The API key is not valid for this operation / You don’t have the authorization. |
| 500 | Server internal error / Unknown error. |