Skip to main content
POST
/
v0
/
files
Upload file
curl --request POST \
  --url https://api.getlemma.com/v0/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider_id": "<string>",
  "purpose": "<string>"
}
'
{
  "id": "file_Xt7nRv3hBw9pKm4s",
  "provider_id": "entity_k7mXp2vR9nTfBw4s",
  "purpose": "explanation_of_benefits",
  "filename": "eob-march-2026.pdf",
  "content_type": "application/pdf",
  "created_at": "2026-03-15T14:30:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.getlemma.com/llms.txt

Use this file to discover all available pages before exploring further.

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.
provider_id
string
required
The ID of the provider this file belongs to.
purpose
string
required
The intended use of the file. Determines which file types are accepted.
PurposeAccepted types
explanation_of_benefitsPDF (application/pdf)

Response

Returns the created file object.
id
string
Unique identifier for the file.
provider_id
string
The ID of the provider 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.
{
  "id": "file_Xt7nRv3hBw9pKm4s",
  "provider_id": "entity_k7mXp2vR9nTfBw4s",
  "purpose": "explanation_of_benefits",
  "filename": "eob-march-2026.pdf",
  "content_type": "application/pdf",
  "created_at": "2026-03-15T14:30:00Z"
}