POST
/file_linksCreate a File Link
Creates a File Link that provides a URL for downloading a File. Provide file_id and, if needed, set expires_at to a time no more than one day after the request.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
File Link details, including the File to link and its optional expiration time.
expires_atstringoptional
The time at which the File Link will expire. The default is 1 hour from the time of the request. The maximum is 1 day from the time of the request.
file_idstringrequired
The File to create a File Link for.
200Returns the created File Link, including its ID, expiration time, associated File ID, and unauthenticated download URL.
created_atstringrequired
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the File Link was created.
expires_atstringrequired
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the File Link will expire.
file_idstringrequired
The identifier of the File the File Link points to.
idstringrequired
The File Link identifier.
idempotency_keystringrequired
The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).
typestringrequired
A constant representing the object's type. For this resource it will always be `file_link`.
unauthenticated_urlstringrequired
A URL where the File can be downloaded. The URL will expire after the `expires_at` time. This URL is unauthenticated and can be used to download the File without an Increase API key.
4XXReturned when the request has a client-side error.
5XXReturned when the server encounters an error processing the request.
Error handling
file_id is required and must identify an existing File. If provided, expires_at must be an ISO 8601 date-time no more than one day after the request; it defaults to one hour after the request when omitted.