> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Download file content

> Get a presigned download URL for a file.

`GET /api/v1/cloud/files/{file_id}/content`

Returns a [File content link](/cloud-agents/api/files/schemas#file-content-link). The returned URL is time-limited and can be used to download the file content directly.

Files can be downloaded only when the File object's `downloadable` field is `true`.

## Path parameters

| Parameter | Type   | Required | Description                     |
| --------- | ------ | -------- | ------------------------------- |
| `file_id` | string | Yes      | File ID with the `file_` prefix |

## Headers

| Header          | Required | Description         |
| --------------- | -------- | ------------------- |
| `Authorization` | Yes      | `Bearer $QODER_PAT` |

## Example request

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/files/file_019e3bb9b0c2752688aeb5fdacf00565/content" \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "expires_at": "2026-05-18T16:34:52Z",
  "url": "https://storage.qoder.com/files/..."
}
```

## Response fields

| Field        | Type   | Description                                        |
| ------------ | ------ | -------------------------------------------------- |
| `url`        | string | Presigned download URL                             |
| `expires_at` | string | UTC expiration time for the URL in RFC 3339 format |

## Notes

* Request a new URL after `expires_at`.
* Clients should parse the JSON response, read the `url` field, and send a GET request to that URL.

## Errors

| HTTP | Type                   | Trigger                                      |
| ---- | ---------------------- | -------------------------------------------- |
| 401  | `authentication_error` | Missing or invalid authentication token      |
| 403  | `permission_error`     | File cannot be downloaded through `/content` |
| 404  | `not_found_error`      | File with the given ID does not exist        |
| 409  | `conflict_error`       | File exists but is not in `ready` status     |
| 410  | `not_found_error`      | File is in `deleted` status                  |

See [Errors](/cloud-agents/api/conventions/errors) for the full error envelope.

## Related

<CardGroup cols={2}>
  <Card title="Attach and download files" icon="paperclip" href="/cloud-agents/files">
    Upload files to give your agent context, and download files it produces.
  </Card>
</CardGroup>
