Files

List files

Returns the files matching your filter, each with the paths for fetching its content. At least one filter has to be given. Files your company cannot read are quietly dropped from the result rather than causing an error.

GET
https://files.magicdoor.com/files

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.

Query parameters

idsstring[]

Fetch these specific files. Snowflake ids in decimal-string form, repeated once per id: ?ids=1831208734196891648&ids=1831208734196891649. Send at least one id when you use this filter.

example: 1831208734196891648
namestring

Match the stored file name exactly — not a prefix and not a substring. 1 to 250 characters.

example: lease-agreement.pdf
sizeRangeobject

Match files whose size in bytes falls in this range. Sent as separate query parameters, sizeRange.start=1024&sizeRange.end=1048576. Give either end on its own for an open-ended range.

Response

200 · The matching files. Not paged — every match comes back at once

idstring

The file's id, a Snowflake sent as a decimal string. This is what other endpoints take when they ask for a file.

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.

400 · No filter was given, or one was outside its allowed range. The empty-filter message is *At least one filter criteria must be provided.*

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

One filter, minimum

Calling this with no query parameters at all returns 400 rather than every file in the company. Deleted files are excluded whatever you ask for.

base in the example is a placeholder. Read the real origin out of the response rather than assembling one yourself, because it is not always the host you sent this request to.