File Assets

Publish file asset (working + live)

Changed on

Creates or updates a file asset at the given host-qualified path and immediately publishes it (promotes to live). Submit via multipart/form-data with fields: file (binary), path (//host/folder/file.ext), language (optional).

put/api/v2/assets/publish

Request

Request body multipart/form-data

object required

Flat multipart form: file, path, language

Response

Asset saved and published successfully

i18nMessagesMapobject
permissionsstring[]

Example response

{
  "entity": {
    "identifier": "48190c8c-42c4-46af-8d1a-0cd5db894797",
    "inode": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "banner.vtl",
    "path": "//demo.dotcms.com/application/containers/default/banner.vtl",
    "lang": "en-US",
    "working": true,
    "fileSize": 4096
  }
}

Changes