Skip to main content
PATCH
Python

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

file_id
string
required

The id of the file to update.

Body

application/json
expires_after
integer

Seconds from now until the file expires. Only applies to temporary files. Max 6 days (518400s). Omitted leaves expiration unchanged.

Required range: 1 <= x <= 518400

Response

Updated file

The File object represents a document that has been uploaded to Datagrid.

object
enum<string>
required

The object type, which is always file.

Available options:
file
id
string
required

The file identifier, which can be referenced in the API endpoints.

filename
string
required

The name of the file

created_at
string<date-time>
required

The ISO string for when the file was created.

media_type
string
required

The media type of the file.

expires_at
string<date-time> | null

The ISO timestamp when the file will expire and be automatically deleted, or null if the file does not expire.

credits
object | null

Credit consumption for this file upload. null when the billing lookup fails.