---
title: "Publish file asset (working + live)"
method: PUT
path: "/api/v2/assets/publish"
tags: ["File Assets"]
---

# Publish file asset (working + live)

`PUT /api/v2/assets/publish`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v2/assets/publish`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v2/assets/publish/put.ts> (a function with typed inputs; its response is checked against the schema)

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).

## Request body `multipart/form-data`

- object: Flat multipart form: file, path, language

## Response `200`

Asset saved and published successfully

- ResponseEntityFileAssetView: Response entity wrapping a FileAssetView after a save or publish operation
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` FileAssetView: File asset view returned after a save or publish operation
    - `identifier` string: Asset identifier
    - `inode` string: Asset inode
    - `name` string: File name
    - `path` string: Host-qualified path to the asset
    - `lang` string: Language tag for the asset version
    - `live` boolean: Whether this is the live (published) version
    - `working` boolean: Whether this is the working version
    - `fileSize` integer: File size in bytes as stored in the content repository
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400`: Bad Request — missing file part, zero-byte file, unknown language, or invalid path
- `401`: Unauthorized — authentication required
- `403`: Forbidden — insufficient permissions on target folder
- `404`: Not Found — unknown host in path

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v2/assets/publish/put.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
