/filesUpload file
Base URL https://api.vseepreview.com/api_v3
Authentication: User Token — Requires a user access token from login or SSO.
Upload a file with optional metadata
meta.category)intake_attachment — Per-visit files, only visible on the visit page.user_consent — User consent documents.user_avatar — User profile picture.user_document — Per-user profile documents, visible under the patient's Documents page and provider's Documents tab.When using a clinic/admin token to upload for a patient, include:
meta.target.id — The patient's user IDmeta.target.type — Set to userExample (upload for patient):
curl -X POST https://api.vseepreview.com/api_v3/files \
-H 'X-ApiToken: {admin_token}' \
-H 'X-AccountCode: {account_code}' \
-F file=@/path/to/file.png \
-F meta.target.id=20002340748 \
-F meta.target.type=user \
-F meta.category=user_document
| Name | In | Type | Required | Enum | Default | Description |
|---|---|---|---|---|---|---|
X-ApiToken | header | string | yes | API token (e.g. your_api_token) | ||
X-AccountCode | header | string | yes | Account code (e.g. vclinic) |
Content type: multipart/form-data
| Field | Type | Required | Enum | Description |
|---|---|---|---|---|
file | string | yes | Binary file content | |
meta.title | string | no | File title | |
meta.description | string | no | File description | |
meta.target.id | string | no | Target ID (user ID or visit ID). Required if uploading for someone else | |
meta.target.type | string | no | Target type (user or visit). Required if uploading for someone else | |
meta.category | string | no | File category (intake_attachment, user_consent, user_avatar, user_document) |
Example:
{
"file": "binary",
"meta.title": "string",
"meta.description": "string",
"meta.target.id": "string",
"meta.target.type": "string",
"meta.category": "string"
}
200 — Successful uploadFile Uploaded
{
"data": {
"id": "5e15d150-19b4-4cbd-b217-332fc71b6977",
"name": "p878984.jpg",
"size": 40679,
"ext": "jpg",
"fullpath": "https://vclinic.vseepreview.com/files/view/5e15d150-19b4-4cbd-b217-332fc71b6977?auth_code=e86ceb8b57c91e4db41611f08311a125e2df0b09&time=1578488144",
"meta": {
"category": "user_document",
"target": {
"id": "350936",
"type": "user"
},
"account": {
"code": "vclinic"
}
},
"creator": {
"id": "350936",
"username": "test+member01@test.com",
"email": "test+member01@test.com",
"full_name": "Test User"
}
}
}
Machine-readable: OpenAPI JSON