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 the content of the file with the specified id.
      • GETReturns the content of the file with the specified id as pdf.
    • Custom Fields Overview
    • Workload & Planning Overview
    • Project Templates Overview
    • Workflows Overview
    • Login & Access Overview
    • API Management Overview
LogoLogo
SupportDeveloper ForumLogin
API v1 ReferenceFiles

Returns the content of the file with the specified id.

GET
https://api.awork.com/api/v1/files/:fileId/download
GET
/api/v1/files/:fileId/download
$curl -G https://api.awork.com/api/v1/files/fileId/download \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d width=800 \
> -d height=600 \
> -d crop=true \
> -d enlarge=false \
> -d inline=true
200Retrieved
1"iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeT"
Returns the content of the latest file version. If the file is an image and the width and height are set, the image will resized before it is returned. The get the content it is necessary to have the 'read' permissions on the entity the file is related to. <Check title="Required Permissions" icon="key">Any authenticated user.</Check>
Was this page helpful?
Previous

Returns the content of the file with the specified id as pdf.

Next
Built with

Returns the content of the latest file version. If the file is an image and the width and height are set, the image will resized before it is returned. The get the content it is necessary to have the ‘read’ permissions on the entity the file is related to.

Required Permissions
Any authenticated user.

Authentication

AuthorizationBearer

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

Path parameters

fileIdstringRequiredformat: "uuid"
The id of the file.

Query parameters

widthdoubleOptional
Set width to resize.
heightdoubleOptional
Set height to resize.
cropbooleanOptional
Whether to crop the image when resizing it.
enlargebooleanOptionalDefaults to true

Whether to enlarge the image if the width/height are bigger than the original image.

inlinebooleanOptionalDefaults to false

If inline is true, content-disposition header is inline, else it is attachment.

Response

OK