---
title: "Creates external file references for the specified company."
method: POST
path: "/companies/{companyId}/externalfiles"
tags: ["companyFiles"]
---

# Creates external file references for the specified company.

`POST /companies/{companyId}/externalfiles`

## Request

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

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

## Path parameters

- `companyId` string, uuid, required

## Request body

- ExternalFileForm[]
  - `name` string, required: The name of the file.
  - `description` string, nullable: The description of the file.
  - `externalProvider` string, required: The external provider for the file. Like 'google' or 'onedrive'.
  - `externalFileUrl` string, required: The file url of the external provider.
  - `mimeType` string, nullable: The mime type if the external file.

## Response `200`

OK

- FileInfo[]
  - `name` string, nullable: The user-specified name of the file.
  - `description` string, nullable: The description of the file.
  - `id` string, uuid: The id of the file info.
  - `entityId` string, uuid, nullable: Deprecated. The id of the linked entity derived from entity specific owner ids.
  - `projectId` string, uuid, nullable
  - `projectTemplateId` string, uuid, nullable
  - `companyId` string, uuid, nullable
  - `taskId` string, uuid, nullable
  - `taskTemplateId` string, uuid, nullable
  - `userId` string, uuid, nullable
  - `documentId` string, uuid, nullable
  - `fileName` string, nullable: The name of the file.
  - `entityType` string, nullable: The name of the linked entity type.
  - `mimeType` string, nullable: The MIME type of the file.
  - `createdOn` string, date-time: The date this file was created.
  - `createdBy` string, uuid: The id of the user who created this file.
  - `updatedOn` string, date-time: The date this file was last modified.
  - `updatedBy` string, uuid: The id of the user who last modified this file.
  - `fileVersions` FileVersion[], nullable: List of all versions.
    - `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.
  - `isCommentFile` boolean: Whether the file is related to a comment.
  - `externalProvider` string, nullable: The external provider for the file. Like 'google' or 'onedrive'.
  - `externalFileUrl` string, nullable: The file url of the external provider.
  - `isHiddenForConnectUsers` boolean: Whether the file is hidden for connect users.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

## Changes

- **2026-09-20** `5332322ffca3`: 1 breaking, 23 warning, 3 info
  - the response's body type changed from `object` to `array` for status `200`
  - removed the optional property `companyId` from the response with the `200` status
  - removed the optional property `createdBy` from the response with the `200` status
  - removed the optional property `createdOn` from the response with the `200` status
  - …23 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 `CreateExternalFiles` removed and replaced with `companyFiles_CreateExternalFiles`
- **2026-08-21** `a13e7c704262`: 3 breaking, 1 info
  - the `items/externalFileUrl` request property's minLength was increased from `0` to `1`
  - the `items/externalProvider` request property's minLength was increased from `0` to `1`
  - the `items/name` request property's minLength was increased from `0` to `1`
  - response property `entityId` deprecated

[Operation history](https://skmtc.dev/awork-io/apis/api-v1-reference/changes/companies/:companyId/externalfiles/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)
