Get a file
https://api.floconnector.com/v1/media/{id}- Scope
media.read- Rate limit
- the key's read budget, 120 a minute
{id} takes the media number or the file's id. The reply lists every link made on the file, live, expired and revoked, and with link=1 adds a 10-minute link to the file itself for a destination that fetches by URL. A file the caller cannot use answers not_found, never forbidden.
Path parameters
The file: its media number, or its id.
Query parameters
1 also returns a 10-minute download link to the file.
Responses
200Success
fileobjectA file in Media.
ShowHide 19 fields
idstringThe file's id. A path takes this or the media number.
mediaintegerThe file's media number in this workspace: what chats and tools call it.
namestringThe file name, extension included.
typestringThe content type (MIME), e.g. image/jpeg. Read from the file's bytes where they can settle it.
kindenumThe file's broad type, read from its content type. document covers Office files and text.
imagevideopdfdocumentothersizeintegerSize in bytes.
pinnedbooleanWhether the file is pinned. A pinned file is never removed to make room.
pinned_atstringnullableWhen the file was pinned, ISO 8601. Null when it is not pinned.
sharedbooleanWhether every member of the workspace can see and use the file. Not a public link.
shared_atstringnullableWhen the file was opened to the workspace, ISO 8601. Null when it is not shared.
sourcestringWhere the file came from, written for people, e.g. "Uploaded with link: site photos".
source_kindenumHow the file arrived: upload (the uploader), tool (a tool call, such as a vendor download) or dashboard (the Media page).
uploadtooldashboardownerobjectnullableThe member who owns the file. Null when it has no owner, as with a file uploaded under an API key.
ShowHide 3 fields
idstringThe member's user id.
namestringnullableTheir display name. Null when they have not set one.
emailstringTheir email address.
folderobjectnullableThe folder the file is in. Null at the root of Media.
ShowHide 2 fields
idstringThe folder's id.
namestringThe folder's name.
minebooleanWhether the caller owns the file. Always false for an API key: a key owns nothing and acts for the workspace.
can_managebooleanWhether the caller may rename, move or delete the file. Pinning and sharing also need their own permission.
arrived_atstringWhen the file arrived in Media, ISO 8601.
linksintegerHow many live links the file has: made, not revoked and not expired.
thumb_urlstringnullableA short-lived URL of a preview image: the file's preview frame when it has one, or the file itself when it is an image. Null when there is neither. It lasts minutes, so do not store it.
linksarray of objectEvery link made on the file, newest first: live, expired and revoked.
ShowHide 9 fields of each item
idstringThe link's id. Revoke the link with it.
urlstringThe public address. Anyone who has it can open the file while the link is live.
lifetimeenumHow long a link lasts: 10 minutes, 1 hour, 24 hours, 7 days, or never expires.
10m1h24h7dneverexpires_atstringnullableWhen the link expires, ISO 8601. Null for a link that never expires.
revoked_atstringnullableWhen the link was revoked, ISO 8601. Null when it has not been.
livebooleanWhether the link still works: not revoked and not expired.
viewsintegerHow many times the link has been opened.
created_atstringWhen the link was made, ISO 8601.
created_bystringnullableThe user id of the member who made the link. Null for a link made with an API key.
linkobjectoptionalA 10-minute link to the file itself. Present only when link=1 was sent.
ShowHide 2 fields
urlstringA URL that serves the file until it expires. Not a public link: it is not listed in links and cannot be revoked.
expires_atstringWhen it stops working, ISO 8601.
400validation: a field failed validation; field names it.
Every error has the same envelope:
errorobjectShowHide 5 fields
codeenumWhat went wrong, as a stable word. Branch on this, never on message.
unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternalmessagestringThe same thing in a sentence, written for a person.
fieldstringoptionalvalidation only: the field that failed, as a path into the request.
requiredstringoptionalinsufficient_scope only: the scope the route needs.
detailsobjectoptionalExtra structure some errors carry, such as a refused record batch's per-record errors.
401unauthorized: no key, or an unknown, revoked or expired key.
Every error has the same envelope:
errorobjectShowHide 5 fields
codeenumWhat went wrong, as a stable word. Branch on this, never on message.
unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternalmessagestringThe same thing in a sentence, written for a person.
fieldstringoptionalvalidation only: the field that failed, as a path into the request.
requiredstringoptionalinsufficient_scope only: the scope the route needs.
detailsobjectoptionalExtra structure some errors carry, such as a refused record batch's per-record errors.
403insufficient_scope: the key lacks the route's scope, named in required. Or forbidden, or plan_limit when the plan does not include the API.
Every error has the same envelope:
errorobjectShowHide 5 fields
codeenumWhat went wrong, as a stable word. Branch on this, never on message.
unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternalmessagestringThe same thing in a sentence, written for a person.
fieldstringoptionalvalidation only: the field that failed, as a path into the request.
requiredstringoptionalinsufficient_scope only: the scope the route needs.
detailsobjectoptionalExtra structure some errors carry, such as a refused record batch's per-record errors.
404not_found: the thing is not in this workspace.
Every error has the same envelope:
errorobjectShowHide 5 fields
codeenumWhat went wrong, as a stable word. Branch on this, never on message.
unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternalmessagestringThe same thing in a sentence, written for a person.
fieldstringoptionalvalidation only: the field that failed, as a path into the request.
requiredstringoptionalinsufficient_scope only: the scope the route needs.
detailsobjectoptionalExtra structure some errors carry, such as a refused record batch's per-record errors.
429rate_limited: the key's per-minute budget is spent. Retry after Retry-After seconds.
Every error has the same envelope:
errorobjectShowHide 5 fields
codeenumWhat went wrong, as a stable word. Branch on this, never on message.
unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternalmessagestringThe same thing in a sentence, written for a person.
fieldstringoptionalvalidation only: the field that failed, as a path into the request.
requiredstringoptionalinsufficient_scope only: the scope the route needs.
detailsobjectoptionalExtra structure some errors carry, such as a refused record batch's per-record errors.
Errors lists every error code and what to do about it.