Files

Get file information

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

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

fileIdstringrequired

The file to describe, as a Snowflake id in decimal-string form. Must be a positive whole number.

example: 1831208734196891648

Response

200 · The file's metadata

idstring

The file's id, a Snowflake sent as a decimal string.

createdstring · date-time

When the file was stored, in the company's timezone and with no offset.

namestring

The original file name, with no path. Display only — content is looked up by id, not by name.

sizeinteger

How large the file is, in bytes.

contentTypestring

The MIME type of the stored content, for example application/pdf.

secureUrlobject

Where to fetch the file. Both paths need an access token, and both answer with a redirect to storage.

401 · The access token is missing, expired, or invalid

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

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.