---
title: "Get a file"
method: GET
path: "/api/v1/files/{id}"
tags: ["Files"]
---

# Get a file

`GET /api/v1/files/{id}`

## Request

- Base URL: `https://your-deployment.example.com`
- URL: `https://your-deployment.example.com/api/v1/files/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns a file you own or that has been shared with you, with a short-lived signed `download_url` once it is downloadable. This is both the upload poll (after `POST /api/v1/files`) and the way to fetch any file id another endpoint hands back. `download_url` is `null` until `moderation_status` is `clean`; it expires at `download_url_expires_at`, so re-read this endpoint rather than storing it. Safe (GET) requests are exempt from the per-day API-key quota: a poll consumes no daily slot, and only the per-minute burst limit applies. Authenticate with an API key (`b4m_live_`) carrying `files:read`, or a JWT.

## Path parameters

- `id` string, required

## Response `200`

The file, and a download URL if it is downloadable.

- GetFileResponse200
  - `id` string, required
  - `file_name` string, required
  - `mime_type` string, required
  - `file_size` number, required
  - `moderation_status` 'pending' | 'scanning' | 'clean' | 'blocked' | 'null', nullable, required
  - `download_url` string, nullable, required
  - `download_url_expires_at` string, nullable, required
  - `created_at` string, required

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The API key lacks `files:read`.
- `404`: No file with that id is visible to the caller.
- `405`: The path does not serve this HTTP method.
- `422`: Request failed validation.
- `429`: Per-user rate limit exceeded.

---

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