Manage assets
Edit an asset's name, description or group, or disable an asset you no longer need. These operations use the MoonApiX asset_id. See Query assets for details and preparation status for a target model.
Edit an asset or move it to another group
PATCH /v1/assets/{asset_id}Only an asset owned by the authenticated account and not disabled can be edited. Send at least one of name, description or group_id; omitted fields keep their current values.
curl -X PATCH https://moonapix.com/v1/assets/asset_xxx \
-H "Authorization: Bearer <MOONAPIX_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "product-reference",
"description": "Updated reference",
"group_id": "group_target"
}'| Field | Type | Description |
|---|---|---|
name | string | Optional. Must not be empty after trimming whitespace. |
description | string | Optional. An empty string clears the description. |
group_id | string | Optional. Move to this group, which must belong to the authenticated account, be enabled and have the same domain as the asset. |
Success returns HTTP 200 with the updated asset object. V2 assets retain their identity and storage representation; historical assets keep their existing response representation. Editing does not start model preparation. Moving preserves the asset_id, file content and existing authentication references without uploading or authenticating again. This operation cannot replace the asset's file content.
| HTTP status | Error code | Description |
|---|---|---|
400 | invalid_asset_id, invalid_name, invalid_group_id, missing_update_fields | Invalid ID, name or update fields. |
404 | asset_not_found | The asset does not exist, belongs to another account or is disabled. |
404 | group_not_found | The target group does not exist, belongs to another account or is not enabled. |
409 | group_domain_mismatch | The target group and asset have different domains. |
Delete an asset
DELETE /v1/assets/{asset_id}curl -X DELETE https://moonapix.com/v1/assets/asset_xxx \
-H "Authorization: Bearer <MOONAPIX_API_KEY>"Deletion is a soft delete: it changes the asset owned by the authenticated account to status=disabled. No request body is required. Success returns HTTP 200 with the asset object and deleted=true. Key response fields are:
{
"object": "asset",
"asset_id": "asset_xxx",
"status": "disabled",
"deleted": true
}Other fields follow the asset's existing representation. This example is not a target-model preparation query. Confirm deletion using HTTP 200, deleted=true and status=disabled. A missing asset, an asset owned by another account or an already disabled asset returns HTTP 404 / asset_not_found; a repeated deletion does not return another success object.
Soft deletion retains history and audit records. It does not physically remove managed files or revoke existing authentication references in other services. It is not a storage cleanup operation, an immediate invalidation of issued URLs or cancellation of submitted generation tasks. Deleting a group is a separate operation and does not delete its member assets; see Delete an asset group.