We support uploads up to 50 MB. If you have files larger than this, please reach out to request a limit increase.
The generated code examples are slightly incorrect in how they handle file uploads. Please use the below cURL and python examples.
cURL Example
curl -X POST "https://api.silnahealth.com/public/v1/files/" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/octet-stream" \
-H "provider-id: 0194a907-5bdc-7f94-b890-b9afc5b5d5e3" \
-H "original-filename: test_two.pdf" \
--data-binary @test_two.pdf
Python Example
import requests
url = "https://api.silnahealth.com/public/v1/files/"
headers = {
"Authorization": "Bearer {TOKEN}",
"Content-Type": "application/octet-stream",
"provider-id": "0194a907-5bdc-7f94-b890-b9afc5b5d5e3",
"original-filename": "test_two.pdf"
}
with open("test_two.pdf", "rb") as file:
response = requests.post(url, headers=headers, data=file)
print(response.status_code)
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The name of the file you are uploading
Body
application/octet-stream · file
Binary file content to upload
The body is of type file
.
The response is of type object
.