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
      • GETReturns all documents.
      • POSTCreates a new document.
      • POSTRestores the document with the specified id from the trash.
      • GETReturns the document with the specified id.
      • PUTUpdates the document with the specified id.
      • DELDeletes the document with the specified id.
      • GETReturns the content of the current version of the document with the specified id.
      • PUTUpdates the content of the document with the specified id.
      • POSTAdds a list of document contributors to the document with the specified id.
      • PUTUpdates the access of a document contributor with the specified id to a document.
      • DELDeletes the document contributor with the specified id from a document.
      • POSTDuplicates the document with the specified id.
      • POSTAdds a list of document teams to a document with the specified id.
      • PUTUpdates the document team with the specified id.
      • DELDeletes the document team with the specified id from a document.
      • GETReturns all documents that belong to the document space with the specified id.
      • GETReturns all deleted documents of the document space with the specified id.
      • GETReturns the requesting user's private documents.
      • GETReturns the requesting user's private trashed documents.
      • GETReturns all documents that were shared with the requesting user.
      • GETRetrieves all documents for a project.
      • GETRetrieves all trashed documents for a project.
    • Search Overview
    • Companies Overview
    • Users Overview
    • Files & Images Overview
    • Custom Fields Overview
    • Workload & Planning Overview
    • Project Templates Overview
    • Workflows Overview
    • Login & Access Overview
    • API Management Overview
LogoLogo
SupportDeveloper ForumLogin
API v1 ReferenceDocuments

Creates a new document.

POST
https://api.awork.com/api/v1/documents
POST
/api/v1/documents
$curl -X POST https://api.awork.com/api/v1/documents \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: multipart/form-data" \
> -F content=@<file1>
200Successful
1{
2 "id": "123e4567-e89b-12d3-a456-426614174000",
3 "createdOn": "2022-03-11T15:33:47.100Z",
4 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
5 "updatedOn": "2022-03-11T21:15:00.100Z",
6 "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
7 "name": "string",
8 "currentDocumentVersionId": "123e4567-e89b-12d3-a456-426614174000",
9 "documentSpaceId": "123e4567-e89b-12d3-a456-426614174000",
10 "documentSpace": {
11 "id": "123e4567-e89b-12d3-a456-426614174000",
12 "createdOn": "2022-03-11T15:33:47.100Z",
13 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
14 "updatedOn": "2022-03-11T21:15:00.100Z",
15 "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
16 "name": "string",
17 "isExternal": true,
18 "emoji": "string",
19 "color": "purple",
20 "order": 1.1,
21 "workspaceAccessLevel": "string",
22 "contributors": [
23 {
24 "id": "123e4567-e89b-12d3-a456-426614174000",
25 "userId": "123e4567-e89b-12d3-a456-426614174000",
26 "accessLevel": "string",
27 "firstName": "Lisa",
28 "lastName": "Smith",
29 "hasImage": true,
30 "isDeactivated": false
31 }
32 ],
33 "teams": [
34 {
35 "id": "123e4567-e89b-12d3-a456-426614174000",
36 "teamId": "123e4567-e89b-12d3-a456-426614174000",
37 "accessLevel": "string",
38 "name": "Designers",
39 "icon": "paintbrush",
40 "color": "purple"
41 }
42 ]
43 },
44 "parentId": "123e4567-e89b-12d3-a456-426614174000",
45 "projectId": "123e4567-e89b-12d3-a456-426614174000",
46 "project": {
47 "id": "123e4567-e89b-12d3-a456-426614174000",
48 "name": "string",
49 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
50 "teams": [
51 {
52 "id": "123e4567-e89b-12d3-a456-426614174000",
53 "name": "string"
54 }
55 ],
56 "members": [
57 {
58 "id": "123e4567-e89b-12d3-a456-426614174000",
59 "projectRoleId": "123e4567-e89b-12d3-a456-426614174000",
60 "userId": "123e4567-e89b-12d3-a456-426614174000"
61 }
62 ],
63 "isPrivate": true,
64 "isExternal": true
65 },
66 "taskId": "123e4567-e89b-12d3-a456-426614174000",
67 "emoji": "string",
68 "isPrivate": true,
69 "order": 1.1,
70 "isExternal": true,
71 "isHiddenForConnectUsers": true,
72 "contributors": [
73 {
74 "id": "123e4567-e89b-12d3-a456-426614174000",
75 "userId": "123e4567-e89b-12d3-a456-426614174000",
76 "accessLevel": "string",
77 "firstName": "Lisa",
78 "lastName": "Smith",
79 "hasImage": true,
80 "isDeactivated": false,
81 "documentId": "123e4567-e89b-12d3-a456-426614174000",
82 "inheritedFromDocumentContributorId": "123e4567-e89b-12d3-a456-426614174000",
83 "inheritedDocumentContributor": {
84 "documentId": "123e4567-e89b-12d3-a456-426614174000",
85 "accessLevel": "string"
86 }
87 }
88 ],
89 "teams": [
90 {
91 "id": "123e4567-e89b-12d3-a456-426614174000",
92 "teamId": "123e4567-e89b-12d3-a456-426614174000",
93 "accessLevel": "string",
94 "name": "Designers",
95 "icon": "paintbrush",
96 "color": "purple",
97 "documentId": "123e4567-e89b-12d3-a456-426614174000",
98 "inheritedFromDocumentToTeamId": "123e4567-e89b-12d3-a456-426614174000",
99 "inheritedDocumentToTeam": {
100 "documentId": "123e4567-e89b-12d3-a456-426614174000",
101 "accessLevel": "string"
102 }
103 }
104 ],
105 "workspaceAccessLevel": "string",
106 "inheritedWorkspaceAccessFromDocumentId": "123e4567-e89b-12d3-a456-426614174000",
107 "inheritedWorkspaceAccessFromDocument": {
108 "workspaceAccessLevel": "string"
109 },
110 "movedToTrashOn": "2024-01-15T09:30:00Z",
111 "movedToTrashBy": "123e4567-e89b-12d3-a456-426614174000",
112 "rootDocumentCreatedBy": "123e4567-e89b-12d3-a456-426614174000"
113}
<Check title="Required Permissions" icon="key">Any authenticated user.</Check>
Was this page helpful?
Previous

Restores the document with the specified id from the trash.

Next
Built with
Required Permissions
Any authenticated user.

Authentication

AuthorizationBearer

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

Request

This endpoint expects a multipart form containing an optional file.
namestring or nullOptional0-1000 characters
The name of the document.
documentSpaceIdstring or nullOptionalformat: "uuid"
The id of the document space.
parentIdstring or nullOptionalformat: "uuid"
The id of the document's parent document.
projectIdstring or nullOptionalformat: "uuid"
The id of the project this document references.
taskIdstring or nullOptionalformat: "uuid"
The id of the task this document references.
emojistring or nullOptional0-25 characters
The emoji of the document.
isPrivatebooleanOptional
Whether the document is private.
orderdouble or nullOptional
The order of the document in either the list of private docs, the referenced document space or in the referenced project.
workspaceAccessLevelenum or nullOptional

Determines the level of access to this document granted to all workspace users. Can be either null (inherited), none, read, or manage.

Allowed values:
isHiddenForConnectUsersboolean or nullOptional
Whether the document is hidden for connect users.
contentfileOptional
The content of the document.

Response

OK
idstringformat: "uuid"
The id of the entity.
createdOnstringformat: "date-time"
The date this entity was created.
createdBystringformat: "uuid"
The id of the user who created this entity.
updatedOnstringformat: "date-time"
The date this entity was last modified.
updatedBystringformat: "uuid"
The id of the user who last modified this entity.
namestring or null
The name of the document.
currentDocumentVersionIdstring or nullformat: "uuid"
The id of the current document version.
documentSpaceIdstring or nullformat: "uuid"
The id of the document space.
documentSpaceobject
parentIdstring or nullformat: "uuid"
The id of the document's parent document.
projectIdstring or nullformat: "uuid"
The id of the project this document references.
projectobject
taskIdstring or nullformat: "uuid"
The id of the task this document references.
emojistring or null
The emoji of the document.
isPrivateboolean
Whether the document is private.
orderdouble or null
The order of the document in either the list of private docs, the referenced document space or in the referenced project.
isExternalboolean
Whether the document belongs to an external project.
isHiddenForConnectUsersboolean
Whether the document is hidden for connect users.
contributorslist of objects or null
The contributors of this document.
teamslist of objects or null
The teams this document is connected to.
workspaceAccessLevelstring or null

Determines the level of access to this document granted to all workspace users. Can be either not set (no access), read, or manage.

inheritedWorkspaceAccessFromDocumentIdstring or nullformat: "uuid"
The id of the document the workspace access level permission has been inherited from.
inheritedWorkspaceAccessFromDocumentobject
movedToTrashOnstring or nullformat: "date-time"
The date the document has been moved to the trash
movedToTrashBystring or nullformat: "uuid"
The id of the user that moved the document to the trash.
rootDocumentCreatedBystringformat: "uuid"
The user id of the creator of the root document of this document's document tree.