resourcepack.ai
DOCS

Packs

Change a Custom GUI's files

Renames it, and/or changes its files: each of files replaces the file of that name or adds it, and remove takes files out, then it is checked and saved as the editor's Save would. A page links to another with an ordinary href to its file name; the MC GUI docs say what else a page can do (commands, placeholders, sounds). Free.

POST/packs/{pack}/custom-guis/{gui}

Path parameters

packstringrequired

The pack's slug, as returned by the packs endpoints.

guistringrequired

The Custom GUI's id from the list.

Body

namestringmax 50 characters

A new name.

filesarray of object

Files to write, as {name, content}: a bare file name (shop.html, style.css) and its text, or a picture as a data: URL.

removearray of string

File names to delete.

Response · 200

Saved. The Custom GUI and its files, as get_custom_gui answers.

Error codes

Branch on error.code, never on the message.

invalid_json400

The request body wasn't a JSON object.

invalid_request400

Something in the body or query is wrong. message says what.

invalid_api_key401

The key isn't one of ours, or it has been revoked.

missing_api_key401

No Authorization: Bearer header was sent.

wrong_key_kind401

An MCP key sent to the REST API, or an API key sent to the MCP server. Each only opens its own.

account_suspended403

The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.

forbidden403

Valid key, but not permitted to do this in this pack.

plan_required403

The key is valid, but its account's plan does not include the API.

not_found404

No such pack, asset or job.