---
title: "Get file upload by ID"
method: GET
path: "/api/files/{id}"
tags: ["FileUploads"]
---

# Get file upload by ID

`GET /api/files/{id}`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/files/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/files/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a single file upload along with associated user and thumbnail information by ID.

## Path parameters

- `id` string, required

## Response `200`

Successful operation

- FileUploadResource: File upload details.
  - `id` integer: Unique identifier of the file upload
  - `original_name` string: The original name of the file
  - `stored_name` string: The stored name of the file
  - `mime_type` string: The MIME type of the file
  - `file_size` integer: The size of the file in bytes
  - `file_hash` string: A hash of the file for integrity verification
  - `url` string: The URL where the file can be accessed
  - `created_at` string, date-time: Timestamp when the file was created
  - `updated_at` string, date-time: Timestamp when the file was last updated
  - `user` object: The user who uploaded the file
    - `id` integer: Unique identifier of the user
    - `name` string: Name of the user
  - `thumbnail` object: Thumbnail of the file
    - `id` integer: Unique identifier of the thumbnail
    - `original_url` string: Original URL of the thumbnail
    - `image_url` string: Image URL of the thumbnail
    - `resized_image_url` string: Resized image URL of the thumbnail
    - `extension` string: File extension of the thumbnail
    - `mime_type` string: MIME type of the thumbnail
    - `file_size` integer: File size of the thumbnail in bytes
    - `width` integer: Width of the thumbnail in pixels
    - `height` integer: Height of the thumbnail in pixels

## Other responses

- `404`: File upload not found

---

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