Skip to main content

Quick Start

Submit your first encounter in two minutes. No account, no API key.

1. POST a clinical letter

Send a Markdown letter to /api/v1/agent/query. The body is the entire request — no headers required beyond Content-Type.

curl
curl -X POST https://api.appendix.com/api/v1/agent/query \
  -H "Content-Type: application/json" \
  -d '{
    "query": "# Chief Complaint\nCough x 2 weeks\n\n# Age and Sex\n35-year-old male\n\n# History of Present Illness\nProductive cough with yellow-green sputum for 2 weeks. Worse in the morning.\n\n# Review of Systems\nNo fever, no weight loss, no night sweats.\n\n# Past Medical History\nNo chronic conditions.\n\n# Allergies\nNKDA\n\n# Family History\nFather with asthma.\n\n# Social History\nNon-smoker, office worker.\n\n# Diagnosis\nAcute bronchitis.\n\n# Treatment Plan\nBenzonatate for cough suppression."
  }'

2. Read the response

The API evaluates the letter against 11 required criteria. final_decision_ready is true when the letter is complete:

200 OK
{
  "session_token": "abc123-def456",
  "encounter_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "encounter_token": "7f3e...<64-char hex>",
  "encounter_expires_at": "2026-02-29T12:00:00Z",
  "evaluation": { /* 11 booleans */ },
  "final_decision_ready": true,
  "missing_items": [],
  "completed_items": [ /* 11 labels */ ],
  "checkout_url": "https://appendix.com/checkout/a1b2c3d4-...?token=xyz",
  "next_steps": "Medical information is complete. Please direct the user to the checkout URL to provide demographics, ID verification, and payment."
}

If the letter is missing required fields, final_decision_ready is false and missing_items tells you what to ask the user about. Add the missing info and POST again with the same session_token.

3. Hand the user the checkout URL

Show the user the checkout_url. They sign in, verify identity, pay, and submit. A board-certified physician personally reviews the submission and writes back with an assessment, guidance, and a prescription if appropriate.

4. Poll for the physician’s reply

Save the encounter_id and encounter_token from step 2. Use them on the agent chat endpoints to read the physician’s message and reply on the user’s behalf. The token is valid for 72 hours.

Going further

  • For paying subscribers, authenticate with an API key and bind the encounter to a specific person on the account; the API can then advance straight to submitted without a checkout round-trip.
  • See Letter Format for the 11 sections the evaluator checks.
  • See the Conditions List for what we treat.