---
title: "Get download url for a file"
method: GET
path: "/matters/{matterId}/documents/files/{fileId}/download"
tags: ["Files"]
---

# Get download url for a file

`GET /matters/{matterId}/documents/files/{fileId}/download`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}/download`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Returns a presigned download URL for the current version of the file, or for a specific version when 'versionId' is supplied.
The URL is valid for 1 hour. The response 'Content-Disposition' uses the file name and extension.

## Path parameters

- `matterId` string, required
- `fileId` string, required

## Query parameters

- `versionId` string

## Response `200`

When request is successful. Returns a 'DownloadFileInfo' object.

- DownloadFileInfo
  - `fileId` string, nullable: Unique identifier of the requested file
  - `name` string, nullable: Name of the file, excluding file extension.
  - `fileExtension` string, nullable: Extension of the file.
  - `downloadUrl` string, nullable: Temporary presigned URL to download the file content with an HTTP GET request. Valid for 1 hour from the time of the API call (see Expiry).
  - `expiry` string, date-time: UTC date/time when the download link is no longer accessible (1 hour after issue)
  - `sizeBytes` integer: Size of the content behind DownloadUrl (in bytes). For the extracted text endpoint this is the size of the extracted text, not of the original file.

## Other responses

- `400`: When a supplied id is not a valid GUID, or when 'versionId' is not a version of this file ("Provided invalid versionId").
- `403`: When the requested file does not belong to the account making the request.
- `404`: When the file does not exist, does not belong to the specified matter, or has no uploaded version yet.

## Changes

- **2026-08-26** `db1b8a86b58e`: 2 breaking, 10 warning
  - the response's body type changed from `object` to `string` for status `400`
  - the response's body type changed from `object` to `string` for status `404`
  - removed the optional property `detail` from the response with the `400` status
  - removed the optional property `detail` from the response with the `404` status
  - …8 more

[Operation history](https://skmtc.dev/smokeball/apis/smokeball-api/changes/matters/:matterId/documents/files/:fileId/download/get.md)

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
