Skip to main content
GET
/
v1
/
files
/
{file_id}
/
url
JavaScript
import Spitch from 'spitch';

const client = new Spitch();

const response = await client.files.download('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(response.file_id);
{
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

Path Parameters

file_id
string<uuid>
required

Query Parameters

ttl
integer
default:60
Required range: 60 <= x <= 3600

Response

Successful Response

Response model for file download URLs.

Attributes: file_id: Unique identifier for the file url: Pre-signed download URL expires_at: When the download URL expires

file_id
string<uuid>
required
url
string
required
expires_at
string<date-time>
required
I