Skip to main content
POST
Upload file
Uploads a file to Lemma and returns a file object. You can reference the returned id when creating resources that accept a file_id, such as the Upload EOB endpoint. Send the request as multipart/form-data. The maximum file size is 10 MB. Accepted file types depend on the purpose — see below.

Request body

file
file
required
The file to upload. Maximum size is 10 MB. Accepted MIME types depend on the purpose field.
entity_id
string
required
The ID of the entity this file belongs to.
purpose
string
required
The intended use of the file. Determines which file types are accepted.

Response

Returns the created file object.
id
string
Unique identifier for the file.
entity_id
string
The ID of the entity this file belongs to.
purpose
string
The intended use of the file.
filename
string
The original name of the uploaded file.
content_type
string
The MIME type of the file.
created_at
string
ISO 8601 timestamp of when the file was uploaded.