Upload a File

Upload a file with a given purpose to Chariot as multipart/form-data.

Authentication

AuthorizationBearer

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

Headers

Idempotency-KeystringOptional

Request

The file to upload, its purpose, and an optional description.
filefileRequired
The file's bytes. At most 100 MiB.
purposeenumRequired
The file's purpose. Note that entries may be added to this list without notice.
descriptionstringOptional
A description of the file.

Response headers

X-Request-IdstringOptional
The unique identifier for the request

Response

The Idempotency-Key had already stored this file, so the existing File is returned and nothing was uploaded again.

idstringOptionalRead-only
The unique identifier for the file.
file_namestringOptional
The name of the file.
descriptionstring or nullOptional
The description of the file.
purposeenumOptional
The file's purpose. Note that entries may be added to this list without notice.
content_typestringOptional
The MIME type of the file.
size_byteslongOptionalRead-only
The size of the file in bytes.
created_atdatetimeOptionalRead-only
The date and time when the file was created.
updated_atdatetimeOptionalRead-only
The date and time when the file was last updated.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error