Make a public link to a file

POSThttps://api.floconnector.com/v1/media/{id}/links
Scope
media.write
Rate limit
the key's write budget, 60 a minute

Anyone with the address can open the file, in the workspace or not, until the link expires or is revoked. lifetime is 10m, 1h, 24h, 7d or never and defaults to 24h; 7d and never need a paid plan and are refused with plan_limit without one. Deleting the file ends every link to it. Revoke one early with DELETE /v1/media/links/{id}.

Path parameters

integer | string (uuid)required

The file: its media number, or its id.

Body

The fields it takes:

lifetimeenumoptional

How long the link lasts: 10m, 1h, 24h, 7d or never. Default 24h. 7d and never need a paid plan and media.links.

10m1h24h7dnever

Responses

201Created
linkobject

A public link to one file.

ShowHide 9 fields
idstring

The link's id. Revoke the link with it.

urlstring

The public address. Anyone who has it can open the file while the link is live.

lifetimeenum

How long a link lasts: 10 minutes, 1 hour, 24 hours, 7 days, or never expires.

10m1h24h7dnever
expires_atstringnullable

When the link expires, ISO 8601. Null for a link that never expires.

revoked_atstringnullable

When the link was revoked, ISO 8601. Null when it has not been.

liveboolean

Whether the link still works: not revoked and not expired.

viewsinteger

How many times the link has been opened.

created_atstring

When the link was made, ISO 8601.

created_bystringnullable

The user id of the member who made the link. Null for a link made with an API key.

400validation: a field failed validation; field names it.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra 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:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra 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:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra 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:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra 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:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra 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.