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

# Get a file

`GET /files/{id}`

## Request

- Base URL: `https://app.pencil.ink/api/v1`
- URL: `https://app.pencil.ink/api/v1/files/{id}`
- Auth: HTTP bearer

## Response `200`

The resource.

- object
  - `data` FileObject: Safe file metadata. Raw storage URLs and credentials are never returned.
    - `id` string
    - `name` string
    - `size` integer
    - `mimeType` string
    - `hasInlineContent` boolean
    - `content` string, nullable: Only present for files stored with `url: inline`.
    - `createdAt` integer

## Other responses

- `401`: Missing or invalid API key (`unauthorized`).
- `404`: Resource not found in this org (`not_found`).

---

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