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

# Get upload url for a file

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

## Request

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

Returns a presigned PUT URL for uploading a new version of an existing file. The URL is valid for 1 hour.

## Path parameters

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

## Response `200`

When request is successful. Returns an 'UploadFileInfo' object.

- UploadFileInfo
  - `fileId` string, nullable: Unique identifier of the file.
  - `uploadUrl` string, nullable: Temporary presigned URL to upload the file content to. Send the raw file bytes with an HTTP PUT request. The URL is valid for 1 hour from the time of the API call (see Expiry). Important note: When uploading to this URL, set the 'Content-Type' header to an empty value. Example cURL: curl --location --request PUT 'URL_GOES_HERE' \ --header 'Content-Type: ""' \ --data '@/C:/dir/test.pdf'
  - `expiry` string, date-time: UTC date/time when the upload link is no longer accessible (1 hour after issue).

## Other responses

- `400`: When a supplied id is not a valid GUID.
- `403`: When the requested file does not belong to the account making the request.
- `404`: When the file does not exist or does not belong to the specified matter.

## Changes

- **2026-08-26** `db1b8a86b58e`: 1 info
  - added the non-success response with the status `400`

[Operation history](https://skmtc.dev/smokeball/apis/smokeball-api/changes/matters/:matterId/documents/files/:fileId/upload/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)
