Skip to main content
POST
/
api
/
v1
/
files
/
upload
Upload file
curl --request POST \
  --url https://api.uplint.dev/api/v1/files/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'context=<string>' \
  --form 'metadata={"department": "radiology", "patient_id": "P-12345"}'
{
  "status": "SUCCESS",
  "message": "File uploaded",
  "data": {
    "file_id": "6612f1a2c3b4d5e6f7890abc",
    "original_filename": "report.pdf",
    "content_type": "application/pdf",
    "size_bytes": 843776,
    "context_key": "patient_reports",
    "metadata": {
      "department": "radiology",
      "patient_id": "P-12345"
    }
  },
  "timestamp": "2026-02-10T12:00:00Z"
}

Authorizations

Authorization
string
header
required

Pass an API key or JWT token. API keys can be sent as Authorization: Bearer <key> or Authorization: <key>.

Body

multipart/form-data
file
file
required

The file to upload.

context
string
required

The context key to upload into (e.g. patient_reports).

metadata
string

Optional JSON object string with custom metadata (max 4 KB).

Example:

"{\"department\": \"radiology\", \"patient_id\": \"P-12345\"}"

Response

File uploaded and validated successfully.

status
enum<string>
Available options:
SUCCESS
message
string
data
object
timestamp
string<date-time>