Files

List files with public URLs

Same filter and same result as listing files, with one addition: each file also gets a signed link that works without an access token, for putting in an email or handing to a third party. At least one filter has to be given.

GET
https://files.magicdoor.com/files/public-urls

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.

expirystring

How long the public links stay valid, written as hh:mm:ss, or d.hh:mm:ss for more than a day. Must be longer than one minute. Applies to every link in the response.

default: 01:00:00example: 06:00:00

Response

200 · The matching files, each with a public link. Not paged — every match comes back at once

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.

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 with an access token. Both paths answer with a redirect to storage.

publicUrlobject

The same file behind a signed token, reachable without an access token. This is the one to put in an email or give to someone outside MagicDoor.

400 · No filter was given, one was outside its allowed range, or `expiry` was one minute or shorter

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

A public URL is a bearer credential

Anyone holding the link can read the file until it expires — there is no second check. Keep expiry as short as the recipient needs, and do not log these URLs or put them somewhere they can be crawled.

The same filtering rules apply as on List files: at least one filter is required, deleted files are excluded, and files your company cannot read are dropped from the result rather than causing an error.