Skip to content
exwave.Docs

Asset Storage API

This page lists every request that your backend and your game can send to Asset Storage. For each one, it shows the answer and the errors you can get. For a walk-through, see Get started.

Address. Every request goes to <Asset Storage URL>/v1/platforms/<platform ID>/assets. You’ll find both values in Nexus → Asset Storage, under Reach your files.

Credentials. Send one of these in the Authorization header, as Bearer <token>:

  • An organization API key, which starts with exn_. It needs the Assets permission: Read for downloads, listing and usage, Write for uploads and deletes. Access rules don’t apply to it. Use it on your backend only: Asset Storage refuses API keys sent from a web page.
  • A player access token (PAT) for this platform. Access rules decide what the player can do. See Games & player access tokens.

Bodies. Send JSON with Content-Type: application/json. Asset Storage refuses fields it doesn’t know.

Paths. A path is made of names separated by /, such as public/levels/level-02.json. It can’t start or end with /, contain //, or use . or .. as a name. It can’t contain control characters, { or }. A player can write {player} as a whole name, for their own folder. A path is 860 bytes at most.

In a query string, encode paths as your HTTP library does: {player} becomes %7Bplayer%7D.

An upload takes three requests: ask for a link, send the file, then complete the upload.

POST /v1/platforms/<platform ID>/assets/uploads
Field Type Description
path string Where to store the file.
content_length number The file’s size in bytes. 5,000,000,000 at most.
content_type string Optional. The file’s media type, such as image/png. Without it, application/octet-stream.

Asset Storage checks your access rules and your storage allowance, and keeps the space for this upload. It answers 201 Created:

{
"upload_id": "0b6c2f0e-4f8e-4f4b-9a37-2f1c3d9e8a10",
"path": "saves/managed:283749102938475021/slot1.sav",
"method": "PUT",
"url": "https://...",
"headers": {
"content-length": "2048",
"content-type": "application/octet-stream"
},
"expires_at": "2026-11-25T14:30:00Z"
}

path is the real path, with the player’s ID in place of {player}.

Send the file to url with method, before expires_at. Send every header in headers exactly as given, because they are part of the signature. The file must be exactly content_length bytes.

Don’t send an Authorization header to url. If your HTTP client sets Content-Length itself, let it.

POST /v1/platforms/<platform ID>/assets/uploads/<upload ID>/complete

This request has no body. Asset Storage checks that the file arrived with the right size. It answers 200 OK with the file:

{
"path": "saves/managed:283749102938475021/slot1.sav",
"size": 2048,
"etag": "\"9a0364b9e99bb480dd25e1f0284c8555\"",
"content_type": "application/octet-stream",
"owner": "managed:283749102938475021",
"updated_at": "2026-11-25T14:16:02Z"
}

Until you complete an upload, no one can download the file. A player can only complete their own uploads. Uploading to a path that already has a file replaces it.

POST /v1/platforms/<platform ID>/assets/downloads
Field Type Description
paths string[] The files you want, from 1 to 100.
expires_in_seconds number Optional, API keys only. How long the links work, up to 604,800 (7 days). Players always get the default.

The answer has one entry for each path, in the same order:

{
"files": [
{
"path": "public/manifest.json",
"url": "https://...",
"etag": "\"6cd3556deb0da54bca060b4c39479839\"",
"size": 13,
"content_type": "application/json",
"expires_at": "2026-11-25T14:31:40Z"
},
{
"path": "premium/dlc.pak",
"error": { "code": "forbidden" }
}
]
}

Download each url with a GET, before expires_at. An entry with error has one of these codes:

Code Cause Fix
invalid_path The path breaks the path rules. Correct the path.
forbidden No access rule lets this player download the file. Check the rule with the rule tester.
not_found No file has this path. Check the path, or upload the file first.

The etag changes when the file changes. Keep it with your copy of the file, and skip the download when it hasn’t changed.

GET /v1/platforms/<platform ID>/assets?prefix=saves/{player}/&delimiter=/
Parameter Description
prefix Optional. List only the paths that start with it.
delimiter Optional. Only /. Lists the files directly under prefix, and the folders one level down.
limit Optional. Files per page, from 1 to 1,000. 100 by default.
cursor Optional. The next_cursor of the previous page.
{
"files": [
{
"path": "saves/managed:283749102938475021/slot1.sav",
"size": 2048,
"etag": "\"9a0364b9e99bb480dd25e1f0284c8555\"",
"content_type": "application/octet-stream",
"owner": "managed:283749102938475021",
"updated_at": "2026-11-25T14:16:02Z"
}
],
"next_cursor": null,
"folders": ["saves/managed:283749102938475021/backups/"]
}

When next_cursor isn’t null, there are more files: send it as cursor to get the next page. With delimiter=/, the first page also has folders, up to 1,000. If there are more, the answer has "folders_truncated": true.

A player can only list inside a rule that lets them download, and only sees the files that they can download.

DELETE /v1/platforms/<platform ID>/assets?path=saves/{player}/slot1.sav

Asset Storage answers 204 No Content, and frees the space. A player can only delete files in their own folder, under a rule that lets them upload.

GET /v1/platforms/<platform ID>/assets/usage
{
"location": "fr",
"quota_bytes": 524288000,
"used_bytes": 18234,
"reserved_bytes": 0,
"file_count": 2,
"read_only": false
}

quota_bytes is your plan’s allowance. reserved_bytes is the space kept for uploads that aren’t complete yet. When read_only is true, uploads are refused and downloads still work.

A player also gets player: their usage under each upload rule they have used. With an API key, add ?player=<player ID> to get one player’s usage:

{
"player": [
{
"rule_id": "6a1d4c52-0f36-4c1b-8d0e-5b7f2e3a9c41",
"pattern": "saves/{player}/**",
"prefix": "saves/managed:283749102938475021/",
"files": 1,
"bytes": 2048,
"reserved_files": 0,
"reserved_bytes": 0,
"max_files_per_player": 20,
"max_bytes_per_player": 50000000
}
]
}

prefix is the player’s folder under that rule. The max_ values are null when the rule has no limit.

Uploads, downloads and listings describe a file with these fields:

Field Description
path The file’s path.
size Its size in bytes.
etag A value that changes each time the file changes.
content_type The content type it was uploaded with.
owner The player whose limits count the file, in a player’s folder. Otherwise null.
updated_at When it was last uploaded.

Asset Storage limits how often each player, and each platform, can ask for links. Over the limit, it answers 429 with the code rate_limited and a Retry-After header. Wait that many seconds, then try again.

To stay under the limit, ask for several files in one download request instead of one request per file.

An error answer has a status code and a JSON body:

{
"error": {
"code": "limit_exceeded",
"message": "the player's limit for this rule is reached"
}
}

Use code in your code. message is for people, and can change.

Error Cause Fix
401 unauthorized The Authorization header is missing, or the token or key isn’t valid. A PAT stops working after 15 minutes at most. Send Bearer <token>. Ask for a new PAT, or check that the API key wasn’t revoked.
403 forbidden The caller isn’t allowed. The message says why: the API key lacks the Assets permission, the PAT is for another platform, or no access rule allows it. Add the permission to the key, or use a PAT for this platform. For players, check the rule with the rule tester.
403 api_key_in_browser A web page sent an organization API key. Keep API keys on your backend. In the game, use the player’s PAT. If a key was ever in a web build, revoke it.
403 storage_read_only Uploads are paused for this platform, for example because a payment needs attention. Check Billing in Nexus. Downloads still work.
404 platform_not_found The platform ID is wrong, or the API key belongs to another organization. Copy the platform ID from Reach your files.
404 storage_not_enabled Asset Storage isn’t turned on for this platform. Turn it on in Nexus → Asset Storage.
404 upload_not_found The upload ID is wrong, or the upload belongs to another player. Use the upload_id from your upload request.
404 file_not_found You tried to delete a file that doesn’t exist. Check the path.
409 quota_exceeded The upload would go over your plan’s allowance. Delete files, or change plan in Billing.
409 limit_exceeded The upload would go over the player’s Files per player or Space per player. Delete some of the player’s files, or raise the limit in the rule.
409 not_uploaded You completed the upload before the file arrived. Send the file to url, then complete again.
409 upload_finished The upload is already complete, or its link has expired. Ask for a new upload link.
413 file_too_large The file is larger than the rule’s Largest file, or larger than 5 GB. Send a smaller file, or raise the limit in the rule.
415 content_type_not_allowed The rule’s Allowed content types doesn’t list this content type. Send an allowed type, or add it to the rule.
422 invalid_path The path breaks the path rules. Correct the path.
422 invalid_content_type content_type isn’t a media type such as image/png. Correct the content type.
422 invalid_request A download request has no paths, or more than 100. Send from 1 to 100 paths.
422 invalid_expiry expires_in_seconds is 0 or more than 604,800. Use a value from 1 to 604,800.
422 invalid_delimiter delimiter isn’t /. Use /, or leave it out.
422 invalid_player The player parameter isn’t a player ID. Use an ID such as managed:283749102938475021.
422 size_mismatch The file you sent isn’t the size you gave in content_length. Asset Storage deleted it. Ask for a new link with the right size, and upload again.
429 rate_limited Too many requests. Wait for the seconds in Retry-After, then try again.
503 unavailable, auth_unavailable, storage_unavailable Asset Storage, Auth or the storage provider is briefly unavailable. Try again in a few seconds.

Some answers have a plain text message instead of JSON. You get 415 when the request has no Content-Type: application/json header. You get 400 or 422 when a parameter or a field is unknown or has the wrong type. Check the header and the names.

The link itself can also refuse a file. If the PUT to url fails with 403, the link has expired or a header differs from headers. Ask for a new link and send the headers exactly.