latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

FileLinks

Creates a file link

Creates a new file link object.

post/file-links

Request body

fileIdstring required

The identifier of the file to create a link to.

expiresTimestring date-time required

A future timestamp, after which the link will no longer be usable.

Example request

{
  "fileId": "file_b9bb0bce-c20e-4519-945e-45983a1b239b",
  "expiresTime": "2020-04-25T20:36:00Z"
}

Response

201 Created

idstring

Unique identifier for the file link.

createdTimestring date-time

Time when the file link was created.

expiredboolean

Whether this link has already expired.

expiresTimestring date-time

Time at which the link expires.

fileIdstring

The file object this link points to.

liveModeboolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadataMetadata

Key-value pairs used to store additional data. Value can be string, boolean or integer types.

urlstring

The publicly accessible URL to download the file.

Example response

{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": "2018-04-25T20:36:00Z",
  "expiresTime": "2020-04-25T20:36:00Z",
  "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
  "metadata": {
    "coupon": "iOS"
  },
  "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
}