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

# Get a file’s status

`GET /file/{id}`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/file/{id}`
- Auth: HTTP bearer

Returns the status of one file id. The status is `pending` (their upload link is waiting for its bytes), `ready` (a file they can open, with the same `can_*` fields a list row carries) or `expired`. The poll for an upload, and the cheap “can I use this id?” check before passing it to a connector tool. `404` is the one answer for an id that is not the caller’s to know about: unknown, someone else’s, another organization’s, or vetoed by a restriction.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Response `200`

OK

- object
  - `file_id` string
  - `status` 'pending' | 'ready' | 'expired': `pending`: an upload link you made is waiting for its bytes (not a file yet: no type, size or URL). `ready`: a file you can open. `expired`: your link ran out unused, or the file it filled is gone.
  - `filename` string
  - `mime` string, nullable
  - `size_bytes` integer, nullable
  - `expires_at` string, date-time
  - `url` string, nullable: The Elaichi app’s download page, for a `ready` file.
  - `origin` 'tool' | 'upload' | 'request' | 'inline' | 'api' | 'url_import' | 'web_fetch' | 'export': How the bytes got here: `tool` (a connector tool returned them), `upload` (a person chose it on the Files screen), `request` (a person handed it to an app that asked, through an upload request; `origin_host` is the app), `inline` (content an assistant wrote with `file.create`), `api` (a backend sent it to `POST /file` with a token), `url_import`, `web_fetch` (fetched from the web), `export` (produced by an export). Provenance for wording (“Uploaded by Dana”), never an access gate.
  - `origin_host` string, nullable: The web host an import or web fetch read from, or the asking app’s name for origin `request`; null otherwise.
  - `max_bytes` integer, nullable: The link’s size limit while `pending`.
  - `access` 'owner' | 'view' | 'null', nullable
  - `can_open` boolean
  - `can_delete` boolean
  - `can_share` boolean
  - `can_see_shares` boolean
  - `can_revoke_share` boolean

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited

---

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