Skip to main content
POST
/
api
/
generate-letter
cURL
curl --request POST \
  --url https://forecaster.cairhealth.com/api/generate-letter \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file_content": "<Base64 encoded file content here>",
  "invoice_cost": 0,
  "patient_identifier": "PAT-12345"
}'
{
  "letter": "<Letter Content Here>",
  "timestamp": "2025-10-16T14:30:45Z",
  "invoice_cost": 0,
  "patient_identifier": "PAT-12345"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body containing base64 encoded file content and additional metadata

Request body for generating a Letter of Medical Necessity

file_content
string
required

Base64 encoded content of the procedure notes file

invoice_cost
number
required

The invoice cost for the letter generation

patient_identifier
string
required

Unique identifier for the patient

Response

Letter of Medical Necessity generated successfully

Response containing the generated Letter of Medical Necessity

letter
string
required

The generated Letter of Medical Necessity content

timestamp
string<date-time>

Timestamp when the letter was generated

invoice_cost
number

The invoice cost associated with the letter generation

patient_identifier
string

The patient identifier associated with the letter

I