Create a download link

POST/files/{file_id}/download-links

Issues a short-lived, pre-signed URL for downloading the file.

The link lifetime is set with ttl_seconds. When omitted, it defaults to the maximum of 900 seconds. Set inline to true to have the browser open the file instead of downloading it as an attachment (the default), and use download_name to set the file name the browser uses when saving it.

This operation requires the Idempotency-Key header. Replaying a request with the same key returns the original response, including the original URL, which may already have expired. To obtain a valid link, send a new request with a different key.

AuthorizationBearer <token>

Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Path Parameters

file_id*string

Header Parameters

Idempotency-Key*string

Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Required by this operation: a missing key returns idempotency_key_required, and a malformed key returns idempotency_key_invalid. Repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.

X-Client-Request-Id?string

Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.

Lengthlength <= 64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/files/string/download-links" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "expires_at": "2019-08-24T14:15:22Z",    "method": "GET",    "object": "download_link",    "url": "string"  }}