---
title: "Uploads a new version of the specified company file."
method: POST
path: "/companies/{companyId}/files/{fileId}/versions"
tags: ["companyFiles"]
---

# Uploads a new version of the specified company file.

`POST /companies/{companyId}/files/{fileId}/versions`

## Request

- Base URL: `https://api.awork.com/api/v1`
- URL: `https://api.awork.com/api/v1/companies/{companyId}/files/{fileId}/versions`
- Auth: HTTP bearer

<Check title="Required Permissions" icon="key">Any authenticated user.</Check>

## Path parameters

- `companyId` string, uuid, required
- `fileId` string, uuid, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required

## Response `200`

OK

- FileVersion
  - `id` string, uuid: The id of the file version.
  - `fileInfoId` string, uuid: The id of the file this version belongs to.
  - `version` number, double: The version of the file.
  - `size` integer: The size of the file, in bytes.
  - `width` number, double, nullable: The width if this is an image file.
  - `height` number, double, nullable: The height if this is an image file.
  - `createdOn` string, date-time: The date this file version was created.
  - `createdBy` string, uuid: The id of the user who created this file version.
  - `updatedOn` string, date-time: The date this file version was last modified.
  - `updatedBy` string, uuid: The id of the user who last modified this file version.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

## Changes

- **2026-09-20** `5332322ffca3`: 2 breaking, 1 warning, 9 info
  - added the new required request property `file`
  - the response's body type changed from no type to `object` for status `400`
  - removed the request property `File`
  - api operation id `companyFiles_CreateCompanyFileVersion` removed and replaced with `companyFiles_PostFilesVersionsByCompanyNameAndCompanyIdAndFileId`
  - …8 more
- **2026-09-17** `1556e0487867`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `oauth2` was added to the API
- **2026-09-12** `8e46cf415581`: 1 info
  - api operation id `CreateCompanyFileVersion` removed and replaced with `companyFiles_CreateCompanyFileVersion`

[Operation history](https://skmtc.dev/awork-io/apis/api-v1-reference/changes/companies/:companyId/files/:fileId/versions/post.md)

---

[API](https://skmtc.dev/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.dev/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/awork-io/apis/api-v1-reference/revisions/81151fac7e79?raw)
