For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDeveloper ForumLogin
  • Overview
    • Introduction
    • Getting Started
    • Integration Example (PSA)
    • Authentication
    • Error Handling
    • Pagination
    • Filtering
    • Ordering
    • Rate Limits
    • Permissions
    • Webhooks
    • MCP Server
    • Versioning
    • Changelog
    • Support
  • API v1 Reference
    • Projects Overview
    • Tasks Overview
    • Time Tracking Overview
    • Documents Overview
    • Search Overview
    • Companies Overview
    • Users Overview
    • Files & Images Overview
      • GETReturns all temporary files of the current user.
      • POSTCreates a new temporary file.
      • GETReturns the temporary file with the specified id.
      • PUTUpdates the meta information of the temporary file with the specified id.
      • GETReturns the content of the temporary file with the specified id.
      • POSTSets the temporary file to a global or entity file.
    • Custom Fields Overview
    • Workload & Planning Overview
    • Project Templates Overview
    • Workflows Overview
    • Login & Access Overview
    • API Management Overview
LogoLogo
SupportDeveloper ForumLogin
API v1 ReferenceTemporary Files

Sets the temporary file to a global or entity file.

POST
https://api.awork.com/api/v1/temporaryfiles/:fileId/setentity
POST
/api/v1/temporaryfiles/:fileId/setentity
$curl -X POST https://api.awork.com/api/v1/temporaryfiles/fileId/setentity \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "name": "Final project report",
3 "description": "The client requested a cost overview and timeline",
4 "id": "123e4567-e89b-12d3-a456-426614174000",
5 "projectId": "123e4567-e89b-12d3-a456-426614174000",
6 "projectTemplateId": "123e4567-e89b-12d3-a456-426614174000",
7 "companyId": "123e4567-e89b-12d3-a456-426614174000",
8 "taskId": "123e4567-e89b-12d3-a456-426614174000",
9 "taskTemplateId": "123e4567-e89b-12d3-a456-426614174000",
10 "userId": "123e4567-e89b-12d3-a456-426614174000",
11 "documentId": "123e4567-e89b-12d3-a456-426614174000",
12 "fileName": "Final project report.xlsx",
13 "entityType": "project",
14 "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
15 "createdOn": "2024-01-15T09:30:00Z",
16 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
17 "updatedOn": "2024-01-15T09:30:00Z",
18 "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
19 "fileVersions": [
20 {
21 "id": "123e4567-e89b-12d3-a456-426614174000",
22 "fileInfoId": "123e4567-e89b-12d3-a456-426614174000",
23 "version": 13,
24 "size": 13590,
25 "width": 1920,
26 "height": 1200,
27 "createdOn": "2024-01-15T09:30:00Z",
28 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
29 "updatedOn": "2024-01-15T09:30:00Z",
30 "updatedBy": "123e4567-e89b-12d3-a456-426614174000"
31 }
32 ],
33 "isCommentFile": false,
34 "externalProvider": null,
35 "externalFileUrl": null,
36 "isHiddenForConnectUsers": true,
37 "entityId": "123e4567-e89b-12d3-a456-426614174000"
38}
<Check title="Required Permissions" icon="key">Any authenticated user.</Check>
Was this page helpful?
Previous

Returns the image of the company with the specified id.

Next
Built with
Required Permissions
Any authenticated user.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

fileIdstringRequiredformat: "uuid"

Request

This endpoint expects an object.
entityIdstring or nullOptionalformat: "uuid"
The id of the entity the file should be linked to. Set to null to change the file to a global file.
entityTypestring or nullOptional
The type of the linked entity. Necessary if EntityId is set.

Response

OK
namestring or null

The user-specified name of the file.

descriptionstring or null
The description of the file.
idstringformat: "uuid"
The id of the file info.
projectIdstring or nullformat: "uuid"
projectTemplateIdstring or nullformat: "uuid"
companyIdstring or nullformat: "uuid"
taskIdstring or nullformat: "uuid"
taskTemplateIdstring or nullformat: "uuid"
userIdstring or nullformat: "uuid"
documentIdstring or nullformat: "uuid"
fileNamestring or null
The name of the file.
entityTypestring or null
The name of the linked entity type.
mimeTypestring or null
The MIME type of the file.
createdOnstringformat: "date-time"
The date this file was created.
createdBystringformat: "uuid"
The id of the user who created this file.
updatedOnstringformat: "date-time"
The date this file was last modified.
updatedBystringformat: "uuid"
The id of the user who last modified this file.
fileVersionslist of objects or null
List of all versions.
isCommentFileboolean
Whether the file is related to a comment.
externalProviderstring or null
The external provider for the file. Like 'google' or 'onedrive'.
externalFileUrlstring or null
The file url of the external provider.
isHiddenForConnectUsersboolean
Whether the file is hidden for connect users.
entityIdstring or nullformat: "uuid"Deprecated
Deprecated. The id of the linked entity derived from entity specific owner ids.

Errors

400
Bad Request Error
404
Not Found Error