Files
Create a file
Creates a temporary file.
POST
/
v1
/
files
Creates a new file that can be used in other parts of this API.
This operation returns a 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.
After uploading a file, you can reference it in other parts of the API by using its full URL in the URL field. For instance, if the file ID is fil_xxxx1
, you can use like this in the creation of a document object:
This URL is provided in the Location
header of the response.
This file is intended for temporary use and expires within 1 hour.
Returns
Returns a 201 Created
status code along with the following attributes:
id
string
The unique identifier of the file.
put_url
string
The URL to which you should PUT a file to upload it.
expires_at
string
Time at which the file will expire.
Was this page helpful?