Skip to main content
POST
/
deal-folder
/
files
/
{file}
/
replace
Replace the current version of a file slot
curl --request POST \
  --url http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "status": "success",
  "message": "File replaced successfully.",
  "data": {
    "id": 11,
    "deal_folder_file_id": 5,
    "file_path": "deal-folders/12/slot-1/v1/foo.mp4",
    "file_name": "foo.mp4",
    "file_size": 8421376,
    "file_mime_type": "video/mp4",
    "thumbnail_path": null,
    "version_number": 1,
    "is_current": true,
    "uploaded_by_user_id": 42,
    "created_at": "2026-04-01T12:00:00Z",
    "updated_at": "2026-04-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.

Path Parameters

file
integer
required

DealFolderFile ID (slot ID).

Example:

5

Body

multipart/form-data
file
file
required

New file version. Max 250 MB.

Response

File replaced

status
string
Example:

"success"

message
string
Example:

"File replaced successfully."

data
object

A single uploaded version of a Deal Folder file slot.