Skip to main content
POST
/
public
/
v1
/
files
Upload file
curl --request POST \
  --url https://app.silnahealth.com/api/public/v1/files/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --header 'original-filename: <original-filename>' \
  --header 'provider-id: <provider-id>' \
  --data '"<string>"'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

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

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

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)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

provider-id
string<uuid>
required
original-filename
string
required

The name of the file you are uploading

Body

application/octet-stream

Binary file content to upload

The body is of type file.

Response

id
string<uuid>
required