> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developers.awork.com/files/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server. # Files & Images > Files & Images API Reference. awork allows you to upload files and images to tasks, projects, comments and many other entities. ## Upload a file to a task Uploading a file takes three steps. 1. Generate upload URL 2. Upload the file 3. Link it with an entity such as a task **`Generate Upload URL`** ```sh title="Generate Upload URL" curl -X POST https://api.awork.com/api/v1/files/generateUploadURL \ -H "Authorization: Bearer {token}" \ -H 'Content-Type: application/json' ``` The response will look like this: ```json { "uploadUrl": "https://upload.awork.com/...", "uploadId": "123e4567-e89b-12d3-a456-426614174000" } ``` Then use the returned `uploadUrl` to upload the file: **`Upload File`** ```sh title="Upload File" curl -X PUT https://upload.awork.com/... \ -H 'Content-Type: image/png' \ -H 'x-ms-blob-type: BlockBlob' \ --data-binary @/path/to/file.png ``` Once that is done, link the uploaded file with a task: **`Link File with Task`** ```sh title="Link File with Task" curl -X POST https://api.awork.com/api/v1/tasks/123e4567-e89b-12d3-a456-426614174000/files/byUploadId \ -H "Authorization: Bearer {token}" \ -H 'Content-Type: application/json' \ -d '{ "uploadId": "123e4567-e89b-12d3-a456-426614174000", "fileName": "file.png" }' ``` ## Upload a profile image Several entities in awork support profile images. This is how you can upload an image for a project profile icon: **`Request`** ```sh title="Request" curl -X POST https://api.awork.com/api/v1/files/images/projects/123e4567-e89b-12d3-a456-426614174000 \ -H "Authorization: Bearer {token}" \ -H 'Content-Type: multipart/form-data' \ -F 'File=@/path/to/file.png' ``` See more on working with files and images in the [Help Center](https://support.awork.com/en/articles/files-in-projects-M9elACnwiurN). > Files & Images API Reference.