POSTPro+
/api/v1/models/{model_id}/assets/{asset_id}/file

Attach Asset File

Attach or replace the file on an asset that already exists. The asset keeps its id, so an asset: reference already written into a description or a published page stays valid — which is what makes this the right way to re-publish an updated image.

Pass ?locale=de to write that language's variant and leave the other languages untouched; without it, the default file is replaced. One asset can hold a file per language, and a single asset: reference then resolves to the right one for each reader.

Every upload stores a new file rather than overwriting the previous one, so an earlier model version still opens the file it was saved with. 100 MB max. Returns 404 if the asset doesn't exist — create it first, with create_asset or the Upload Asset endpoint.

AuthenticationBearer mpt_... or OAuth JWT
Plan RequirementPro+

Parameters

NameTypeRequiredDefaultDescription
asset_idString (UUID)[Attach Asset File] UUID of the existing asset to attach the file to. Path parameter. Returns 404 if no such asset exists in the model — this endpoint never creates one.
fileMultipart file (max 100 MB)[Attach Asset File] The binary file to attach. Multipart form field — any field name other than 'label' is treated as the file. Filename and content-type are taken from the multipart headers.
localeString[Attach Asset File] Write the file as this language's variant, for example `de`, leaving the other languages untouched. Leave it out — or pass the model's default language — to replace the default file.
model_idString (UUID)[Attach Asset File] UUID of the model the asset belongs to. Path parameter.

Example Response

{"asset_id": "7b12...", "file_id": "9d4e...", "filename": "architecture-de.png", "content_type": "image/png", "size_bytes": 192104, "locale": "de"}

This content was written collaboratively with AI.