The File resource and
/v1/files
endpoint are soft-deprecated. Use Uploads instead:put_url
property to which you should upload the file via a PUT request.
Ensure you upload your file as a binary stream. Multipart uploads add content that can render the uploaded file invalid.
url
field. For new integrations, prefer using the Upload URL from /v1/uploads
(see above). For instance, if the file ID is fil_xxxx1
, you can use like this in the creation of a document object:
Location
header of the response.
These files are intended for temporary use and expire within 24 hours. To store files you intend to use for longer timeframes, use the Library section in your Dashboard.
Returns
Returns a201 Created
status code along with the following attributes:
The unique identifier of the file.
The URL to which you should PUT a file to upload it.
Time at which the file will expire in format.