Skip to main content
POST
Create a file link

Authorizations

Authorization
string
header
required

Your API key, e.g. Authorization: Bearer clmt_test_. Live keys use the clmt_live_ prefix.

Body

application/json
file
string
required

The file to share.

Pattern: ^file_[0-9A-Za-z]{22}$
expires_at
string<date-time>

When the link stops serving. Omit for a link that never expires.

metadata
object

Response

The link.

A file link shares one file's contents with someone who holds no API key: the url serves the bytes without authentication until the link expires. Create one to hand a deliverable to your client or a downstream system. Only shareable files can be linked - an identity document can never be turned into a URL.

object
enum<string>
required

Entity name.

Available options:
file_link
id
string
required
Pattern: ^link_[0-9A-Za-z]{22}$
Example:

"link_0346sFPEvSkJvY8vt14NNw"

file
string
required

The file this link serves.

Pattern: ^file_[0-9A-Za-z]{22}$
url
string
required

The public contents URL. The URL is the credential - anyone holding it can read the file until the link expires - so treat it like a secret.

expired
boolean
required

Whether the link has expired. Expired links answer 404.

livemode
boolean
required
created_at
string<date-time>
required
expires_at
string<date-time>

When the link stops serving. Absent means it never expires.

metadata
object

Your own key-value notes on the link, stored and returned verbatim.