---
title: "Get file download URL"
method: GET
path: "/api/v1/files/{file_id}/download-url"
tags: ["Files"]
---

# Get file download URL

`GET /api/v1/files/{file_id}/download-url`

## Request

- Base URL: `https://api.studio.kaitoi.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.studio.kaitoi.io/api/v1/files/{file_id}/download-url`
- Auth: HTTP bearer

Returns a short-lived signed URL for downloading a REST API uploaded file. The URL is time-limited and should not be stored permanently.

## Path parameters

- `file_id` string, required

## Query parameters

- `expiresInSeconds` integer: Signed URL lifetime in seconds. Defaults to 3600 and is capped at 86400.
- `externalUserId` string, nullable: Optional developer-user guard. When provided, a download URL is issued only if the file's stored externalUserId matches this value.

## Headers

- `authorization` string, nullable

## Response `200`

Signed download URL.

- PublicFileDownloadUrl
  - `fileId` string, required: Stable file identifier.
  - `downloadUrl` string, required: Short-lived signed URL for downloading the file.
  - `expiresAt` string, date-time, required: Signed URL expiration timestamp.

## Other responses

- `400`: The file id is malformed.
- `401`: Missing, malformed, expired, or revoked bearer token.
- `403`: The API key lacks the required scope or account capability.
- `404`: The file does not exist or is not owned by this user.
- `422`: Validation Error
- `429`: The client or API key exceeded the REST API rate limit.
- `503`: The shared REST API rate limiter is temporarily unavailable.

---

[API](https://skmtc.dev/kaitoi/apis/kaitoi-rest-api.md) · [All operations](https://skmtc.dev/kaitoi/apis/kaitoi-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kaitoi/apis/kaitoi-rest-api/revisions/239a74aa2c64?raw)
