# Get file information

Source: https://api-docs.magicdoor.com/api-reference/files/get-file-info

Fetches one file's metadata — name, size, type, and the paths for its content — without downloading anything.

`GET https://files.magicdoor.com/files/{fileId}/info`

**Authentication:** bearer token in the `Authorization` header, as `Bearer <token>`.

## Path parameters

- `fileId` (string, required) — The file to describe, as a Snowflake id in decimal-string form. Must be a positive whole number. Example: `1831208734196891648`.

## Example request

```bash
curl --request GET \
  --url 'https://files.magicdoor.com/files/1831208734196891648/info' \
  --header 'Authorization: Bearer <token>'
```

## Responses

### 200 — The file's metadata

- `id` (string) — The file's id, a Snowflake sent as a decimal string.
- `created` (string, date-time) — When the file was stored, in the company's timezone and with no offset.
- `name` (string) — The original file name, with no path. Display only — content is looked up by id, not by name.
- `size` (integer) — How large the file is, in bytes.
- `contentType` (string) — The MIME type of the stored content, for example `application/pdf`.
- `secureUrl` (object) — Where to fetch the file. Both paths need an access token, and both answer with a redirect to storage.
  - `base` (string) — The origin the two paths hang off. Join it to `raw`, or to a filled-in `variantTemplate`, for a complete URL.
  - `raw` (string) — Path to the file as it was uploaded. Add `?download=true` to make the browser save it instead of displaying it.
  - `variantTemplate` (string) — Path to a resized or re-encoded copy, with `{variant}` still in it. Replace that placeholder with a preset name such as `thumb`.

```json
{
  "id": "1831208734196891648",
  "created": "2026-08-17T21:04:11",
  "name": "lease-agreement.pdf",
  "size": 284197,
  "contentType": "application/pdf",
  "secureUrl": {
    "base": "https://files.example",
    "raw": "/files/1831208734196891648/lease-agreement.pdf",
    "variantTemplate": "/files/1831208734196891648/v/{variant}/lease-agreement.pdf"
  }
}
```

### 401 — The access token is missing, expired, or invalid

### 404 — No such file, the file has been deleted, or it belongs to another company

```json
{
  "type": "https://httpstatuses.com/404",
  "title": "Not Found",
  "status": 404,
  "detail": "File not found.",
  "instance": "/files/1831208734196891648/info",
  "traceId": "0HN7GK9C2M4PQ",
  "entityType": "File",
  "entityId": "1831208734196891648"
}
```

A file that belongs to another company is reported as missing rather than forbidden, so this endpoint never confirms that an id exists somewhere else.
