# Updates metadata for the specified file.

PUT https://api.awork.com/api/v1/documents/{documentId}/files/{fileId}

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

## Request example

```sh
curl -X PUT --globoff 'https://api.awork.com/api/v1/documents/{documentId}/files/{fileId}' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  --data '{
  "name": "Final project report",
  "description": "The client requested a cost overview and timeline"
}'
```

- path parameter `documentId`: string (required). The document id.

- path parameter `fileId`: string (required). The file id.

## Request body (application/json)

- `name`: string or null

- `description`: string or null

## Response 200

OK

application/json

```json
{
  "name": "Final project report",
  "description": "The client requested a cost overview and timeline",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "entityId": "123e4567-e89b-12d3-a456-426614174000",
  "projectId": "123e4567-e89b-12d3-a456-426614174000",
  "projectTemplateId": "123e4567-e89b-12d3-a456-426614174000",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "taskId": "123e4567-e89b-12d3-a456-426614174000",
  "taskTemplateId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "documentId": "123e4567-e89b-12d3-a456-426614174000",
  "fileName": "Final project report.xlsx",
  "entityType": "project",
  "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  "createdOn": "2026-01-15T09:30:00Z",
  "createdBy": "123e4567-e89b-12d3-a456-426614174000",
  "updatedOn": "2026-01-15T09:30:00Z",
  "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
  "fileVersions": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "fileInfoId": "123e4567-e89b-12d3-a456-426614174000",
      "version": 13,
      "size": 13590,
      "width": 1920,
      "height": 1200,
      "createdOn": "2026-01-15T09:30:00Z",
      "createdBy": "123e4567-e89b-12d3-a456-426614174000",
      "updatedOn": "2026-01-15T09:30:00Z",
      "updatedBy": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "isCommentFile": false,
  "externalProvider": null,
  "externalFileUrl": null,
  "isHiddenForConnectUsers": true
}
```

## Response 400

Bad Request

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```

## Response 401

Unauthorized

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```

## Response 404

Not Found

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```
