Skip to main content

Quickstart

Submit your first sandbox request in a few minutes — no human contact required.

1. Get a test key

Open your developer dashboard (you'll be asked to create an account or sign in) and click Create test key. Test keys are issued instantly and look like ak_test_….

2. Submit a request

Pass the clinical narrative as query plus the patient's contact info. The clinical text should be a complete clinical letter (chief complaint, HPI, ROS, PMH, allergies, assessment, plan). The AI completeness gate will tell you what's missing if it's not ready.

curl -X POST https://api.appendix.com/api/v1/prescribing/query \
  -H "Authorization: Bearer ak_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "34F, no significant PMH, presents with 3 days of dysuria and urinary frequency, no fever or flank pain. Requests treatment for an uncomplicated UTI. No drug allergies. Not pregnant. ...",
    "patient_email": "patient@example.com",
    "patient_phone": "+14155550123",
    "patient_state": "PA",
    "patient_zip": "19103"
  }'

A complete request responds with:

{
  "encounter_id": "b1a2...",
  "environment": "test",
  "sandbox": true,
  "final_decision_ready": true,
  "consent_url": "https://appendix.com/consent/b1a2...?token=...&sandbox=1",
  "pricing": { "complete_review_cents": 0, "incomplete_review_cents": 0, "note": "sandbox — no charge" },
  "simulated_decision": {
    "status": "completed",
    "clinical_decision": "rx_as_requested",
    "message_to_patient": "[SANDBOX] ...",
    "prescriptions": [ { "medication": "[SANDBOX] Example Medication 500mg", "...": "..." } ]
  }
}

3. Send the patient to the consent URL

Open consent_urlin the patient's browser (redirect, link, or embedded webview). They review, attest, consent, and verify identity. In sandbox the flow is fully simulated — no real sign-in, no charge, no physician.

4. Receive the outcome

Track the request from your side via the outcome webhook (encounter.completed / encounter.canceled / encounter.message) or by polling GET /api/v1/prescribing/encounters?external_id=… with your API key. Both carry the privacy-safe projection only — status, prescription count, and a message doorbell — never clinical content.

Appendix communicates with the patient directly: if the physician has a question or a final message, the patient gets an email with a secure chat link (your app gets an encounter.message doorbell + a credential-free chat_url to surface in your UI). Once the physician approves a prescription, the patient receives a text message with a link to choose their pharmacy, and the prescription is transmitted to the pharmacy they choose.

Your API key cannot read the patient's chat or clinical record — the care relationship is between the patient and Appendix. See Webhooks & Polling.

Required fields

  • query — the clinical letter
  • patient_email
  • patient_phone (E.164, e.g. +14155550123)
  • patient_state (2-letter)
  • patient_zip (5-digit)

Optional: patient_first_name, patient_last_name, patient_dob, patient_sex (verified name + DOB are confirmed via Stripe Identity at consent).