Upload a file
Body
MALWARE_DETECTED and no file is stored.
List files
Retrieve metadata
Download content
Delete a file
404.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Upload files once, reference them across inference requests, and retrieve or delete them — with the same BAA gate, malware scan, and audit trail as any other PHI-bearing surface.
POST https://api.usehasp.com/v1/files
Authorization: Bearer hasp_api_live_...
Content-Type: multipart/form-data
| Field | Type | Description |
|---|---|---|
file | file | Required. The file to upload. |
purpose | string | Optional free-form label (max 64 characters) describing what the file is for. |
curl -X POST https://api.usehasp.com/v1/files \
-H "Authorization: Bearer hasp_api_live_<key>" \
-F "[email protected]" \
-F "purpose=intake"
MALWARE_DETECTED and no file is stored.
GET https://api.usehasp.com/v1/files
Authorization: Bearer hasp_api_live_...
GET https://api.usehasp.com/v1/files/{id}
Authorization: Bearer hasp_api_live_...
GET https://api.usehasp.com/v1/files/{id}/content
Authorization: Bearer hasp_api_live_...
DELETE https://api.usehasp.com/v1/files/{id}
Authorization: Bearer hasp_api_live_...
404.
| Code | HTTP | Meaning |
|---|---|---|
MALWARE_DETECTED | 422 | The upload failed the virus scan and was not stored. |
VALIDATION_FAILED | 422 | Missing file, or purpose longer than 64 characters. |
NOT_FOUND | 404 | No such file in the caller’s org. |
BAA_REQUIRED | 402 | No active BAA — see BAA gating. |