API Documentation
Generate HIPAA-compliant SOAP notes from transcripts or audio. All endpoints are under https://api.soapnoteapi.com.
Sandbox mode: Sign up for a free account to get a test key (snapi_sk_test_...). Every account gets a $10 signup credit. Test keys work on all endpoints and generate real SOAP notes, limited to 10 requests/day. No credit card required. Try the interactive Playground at app.soapnoteapi.com. Get your key →
Authentication
All requests must include your API key as a Bearer token.
API keys are scoped to your account and can be created or revoked from the dashboard. Use snapi_sk_test_... keys for development and snapi_sk_live_... keys for production.
Authorization: Bearer snapi_sk_live_••••••••••••••••| Header | Required | Description |
|---|---|---|
Authorization | Required | Bearer <snapi_sk_...> |
Content-Type | Required | application/json (for JSON endpoints) |
Generate note
Convert a transcript into a structured SOAP note. Optionally supply clinical context, billing codes, and a patient-facing summary.
/v1/noteAccepts a clinical transcript (dictation, conversation summary, or raw notes) and returns a structured SOAP note. Response is synchronous for text inputs — you get the note in one call. Providing a context object improves note accuracy by grounding the AI in existing patient data, prior visit notes, and pre-visit chat messages.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
transcript | string | Required | Raw clinical text to convert. Min 50 chars. |
specialty | string | Required | Medical specialty. See specialties list. |
template | string | Optional | "standard" (default) or a custom template ID. |
context | object | Optional | Clinical context object. See context fields below. |
include_billing_codes | boolean | Optional | When true, returns suggested ICD-10 and CPT codes. Default: false. |
include_patient_summary | boolean | Optional | When true, returns a plain-language patient-facing summary. Default: false. |
shorthand_notes (alias for transcript), provider_type (alias for specialty), and template_id (alias for template) are still accepted for backward compatibility but are deprecated. Use the primary field names above.context object fields
All fields within context are optional. Include only what you have — the more context you provide, the more accurate and complete the generated note will be.
| Field | Type | Description |
|---|---|---|
patient_info | object | Structured patient demographics and clinical data. See patient_info fields below. |
patient_history | string | Free-text summary of prior visit notes or relevant history. |
chat_messages | array | Pre-visit or in-visit messages between patient and provider. Each item: { role, content, timestamp }. |
context.patient_info fields
| Field | Type | Description |
|---|---|---|
name | string | Patient's full name. |
age | number | Patient's age in years. |
gender | string | Patient gender (e.g., "male", "female", "non-binary"). |
medications | string[] | Current medications as free-text strings (e.g., "Lisinopril 10mg"). |
allergies | string[] | Known drug or environmental allergies. |
medical_history | string | Relevant past medical history as free text. |
curl -X POST https://api.soapnoteapi.com/v1/note \
-H "Authorization: Bearer snapi_sk_live_••••••••" \
-H "Content-Type: application/json" \
-d '{
"transcript": "Patient presents with headaches since medication change...",
"specialty": "nurse_practitioner",
"include_billing_codes": true,
"include_patient_summary": true,
"context": {
"patient_info": {
"name": "John Smith",
"age": 45,
"gender": "male",
"medications": ["Lisinopril 10mg", "Metformin 500mg"],
"allergies": ["Penicillin"],
"medical_history": "Type 2 diabetes, hypertension"
},
"patient_history": "Last visit 2 weeks ago: discussed medication
adjustment for blood pressure control...",
"chat_messages": [
{
"role": "patient",
"content": "I have been having headaches since the medication change",
"timestamp": "2026-03-14T10:00:00Z"
},
{
"role": "provider",
"content": "How often and how severe?",
"timestamp": "2026-03-14T10:01:00Z"
}
]
}
}'Response
{
"noteId": "note_01jfg8h4kx9a3bc7d2ef",
"subjective": "45-year-old male with history of Type 2 diabetes and
hypertension presents with new-onset headaches following
a recent medication adjustment...",
"objective": "Blood pressure 148/92. Heart rate 76. Alert and oriented.
No focal neurological deficits noted...",
"assessment": "Medication-related headache in the setting of recent
antihypertensive adjustment. Possible inadequate BP control.",
"plan": "1. Hold Lisinopril dose increase — revert to prior dose.
2. Recheck BP in 72 hours.
3. Patient instructed to log daily headache severity.
4. Follow-up in 2 weeks.",
"transcript": "Patient presents with headaches since medication change...",
"billing_codes": {
"icd10": [
{ "code": "G44.309", "description": "Post-traumatic headache, unspecified" },
{ "code": "I10", "description": "Essential (primary) hypertension" }
],
"cpt": [
{ "code": "99214", "description": "Office visit, established patient, moderate complexity" }
]
},
"billing_codes_disclaimer": "Recommended codes for review. Not a substitute
for professional coding. Verify all codes before submission.",
"patient_summary": "During your visit today, we discussed the headaches
you have been experiencing since your blood pressure medication was
adjusted. Based on the examination, we believe the headaches may be
related to the medication change. We are reverting your Lisinopril
to the previous dose and would like you to track your headaches daily.
Please follow up with us in 2 weeks.",
"expires_at": "2026-06-15T00:00:00Z"
}Response fields
| Field | Type | Description |
|---|---|---|
noteId | string | Unique note identifier. |
subjective | string | SOAP Subjective section. |
objective | string | SOAP Objective section. |
assessment | string | SOAP Assessment section. |
plan | string | SOAP Plan section. |
transcript | string | The transcript used to generate this note. |
billing_codes | object | ICD-10 and CPT code suggestions. Present when include_billing_codes is true. |
billing_codes_disclaimer | string | Mandatory disclaimer for billing code suggestions. |
patient_summary | string | Plain-language summary for the patient. Present when include_patient_summary is true. |
expires_at | ISO 8601 | When the note will be deleted from our servers. |
Stream note (SSE)
Generate a SOAP note with real-time streaming using Server-Sent Events.
/v1/stream/noteSame request body as POST /v1/note, but the response is an SSE stream. Each event delivers a chunk of the SOAP note as it is generated, allowing you to display sections to providers in real time. The stream ends with a [DONE] event.
Request
Identical to POST /v1/note. All fields — including context, include_billing_codes, and include_patient_summary — are supported.
curl -X POST https://api.soapnoteapi.com/v1/stream/note \
-H "Authorization: Bearer snapi_sk_live_••••••••" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"transcript": "Patient presents with headaches since medication change...",
"specialty": "nurse_practitioner"
}'Response format
The response is a stream of SSE events. Each data: line contains a JSON chunk with partial note content. The final event contains [DONE].
data: {"section":"subjective","content":"42-year-old male with 3-week history of..."}
data: {"section":"objective","content":"Lumbar ROM restricted at 40° flexion..."}
data: {"section":"assessment","content":"Mechanical lower back pain, likely muscular..."}
data: {"section":"plan","content":"1. NSAIDs PRN. 2. Physical therapy referral..."}
data: [DONE]Billing codes
Automatically suggest ICD-10 diagnosis codes and CPT procedure codes from the generated note.
Pass include_billing_codes: true on POST /v1/note to receive suggested billing codes alongside the SOAP note. The API returns both ICD-10 and CPT codes ranked by relevance to the documented encounter.
billing_codes_disclaimer field in the response must be presented to end users.billing_codes object
| Field | Type | Description |
|---|---|---|
icd10 | array | Array of suggested ICD-10 diagnosis codes. Each item: { code, description }. |
cpt | array | Array of suggested CPT procedure codes. Each item: { code, description }. |
"billing_codes": {
"icd10": [
{ "code": "M54.50", "description": "Low back pain, unspecified" },
{ "code": "M47.816", "description": "Spondylosis with radiculopathy, lumbar region" }
],
"cpt": [
{ "code": "99214", "description": "Office visit, established patient, moderate complexity" },
{ "code": "97110", "description": "Therapeutic exercises, 15 minutes" }
]
},
"billing_codes_disclaimer": "Recommended codes for review. Not a substitute
for professional coding. Verify all codes before submission."Patient-facing summary
Generate a plain-language visit summary the patient can read and understand.
Pass include_patient_summary: true on POST /v1/note to receive a plain-language summary written for the patient, alongside the clinical SOAP note. The summary avoids medical jargon and describes what was discussed, what was found, and what the plan is in terms a non-clinician can understand.
This field is opt-in and billed as an additional output. It is not included unlessinclude_patient_summary is explicitly set to true.
"patient_summary": "During your visit today, we discussed your ongoing
lower back pain. The examination showed some tenderness in your lower
back area. Based on the findings, this appears to be a muscle strain.
The plan is to continue your current pain medication, try gentle
stretching exercises, and schedule a follow-up in 4 weeks."Audio to SOAP
Transcribe an audio recording and generate a SOAP note in one request.
/v1/note/audioUpload an audio file (MP3, M4A, WAV, OGG, WebM, or FLAC) using multipart/form-data. Audio is transcribed using Whisper and the SOAP note is generated immediately. For files over 30 minutes, the response includes a noteId and status processing — poll GET /v1/audio/status/:noteId until status is completed.
curl -X POST https://api.soapnoteapi.com/v1/note/audio \
-H "Authorization: Bearer snapi_sk_live_••••••••" \
-F "audio=@/path/to/recording.mp3" \
-F "specialty=nurse_practitioner" \
-F "template=standard"Response (short recordings, <30 min)
200 OKSame schema as POST /v1/note — full SOAP note in the response body.
Response (long recordings, ≥30 min)
202 Accepted{
"noteId": "note_01jfg8h4kx9a3bc7d2ef",
"status": "processing",
"message": "Audio accepted. Poll GET /v1/audio/status/:noteId for status."
}Get note
Retrieve a previously generated note by ID.
/v1/note/:noteIdRetrieve a note by its ID. Use this endpoint to poll for completion after an async audio upload, or to retrieve a note within its retention window.
curl https://api.soapnoteapi.com/v1/note/note_01jfg8h4kx9a3bc7d2ef \
-H "Authorization: Bearer snapi_sk_live_••••••••"Response fields
| Field | Type | Description |
|---|---|---|
noteId | string | Unique note identifier. |
status | string | "processing" | "completed" | "failed" |
subjective | string | SOAP Subjective section. Present when status is "completed". |
objective | string | SOAP Objective section. |
assessment | string | SOAP Assessment section. |
plan | string | SOAP Plan section. |
billing_codes | object | ICD-10 and CPT code suggestions. Present if include_billing_codes was true. |
patient_summary | string | Plain-language patient summary. Present if include_patient_summary was true. |
expires_at | ISO 8601 | When the note will be deleted from our servers. |
Visit history summary
Synthesize multiple past visit notes into a concise clinical summary.
/v1/visit-summaryAccepts a list of past visit records — each containing a date, provider, and either a structured SOAP note or a free-text summary — and returns a concise longitudinal summary focused on a clinical area of interest. Useful for preparing for follow-up visits, generating referral summaries, or giving a provider rapid context before an encounter.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
patient_info | object | Optional | Patient demographics. Accepts name and age at minimum. |
visits | array | Required | Array of past visit objects. Min 1. See visit object fields below. |
focus | string | Optional | Clinical focus area for the summary (e.g., "diabetes management", "pain control"). When omitted, all conditions are summarized. |
Visit object fields
| Field | Type | Required | Description |
|---|---|---|---|
visit_date | string | Required | ISO 8601 date of the visit (e.g., "2026-02-15"). |
provider | string | Optional | Provider name or identifier. |
soap_note | object | Optional | Structured SOAP note. Accepts any combination of subjective, objective, assessment, plan keys. |
summary | string | Optional | Free-text visit summary. Used when a structured SOAP note is not available. |
Each visit object must include at least one of soap_note or summary.
curl -X POST https://api.soapnoteapi.com/v1/visit-summary \
-H "Authorization: Bearer snapi_sk_live_••••••••" \
-H "Content-Type: application/json" \
-d '{
"patient_info": {
"name": "Jane Doe",
"age": 62
},
"focus": "diabetes management",
"visits": [
{
"visit_date": "2026-02-15",
"provider": "Dr. Smith",
"soap_note": {
"assessment": "E11.65 Type 2 DM with hyperglycemia",
"plan": "Increased Metformin to 1000mg BID. Recheck A1C in 3 months."
}
},
{
"visit_date": "2026-01-10",
"provider": "Dr. Smith",
"summary": "Routine follow-up. A1C 7.8%, up from 7.2%. Blood pressure well controlled."
}
]
}'Response
{
"summary": "62-year-old patient with Type 2 diabetes showing upward A1C
trend (7.2% -> 7.8%) over the past 2 months. Metformin was increased
to 1000mg BID at the last visit. Blood pressure well controlled on
current regimen. Key follow-up: recheck A1C and fasting glucose.",
"key_findings": [
"A1C trending upward: 7.2% -> 7.8%",
"Metformin recently increased to 1000mg BID",
"Blood pressure stable on current medications"
],
"active_diagnoses": [
{ "code": "E11.65", "description": "Type 2 DM with hyperglycemia" }
]
}Response fields
| Field | Type | Description |
|---|---|---|
summary | string | Concise narrative summary of the patient visit history, focused on the requested clinical area. |
key_findings | string[] | Bulleted list of the most clinically significant observations across all visits. |
active_diagnoses | array | Active diagnoses identified across the visit history. Each item: { code, description }. |
Specialties
Pass one of these values as the specialty field in your request.
/v1/specialtiesnurse_practitionerNurse PractitionerphysicianPhysicianpsychiatristPsychiatristpsychotherapistPsychotherapistphysical_therapyPhysical Therapyoccupational_therapyOccupational TherapychiropractorChiropractordentistDentistacupunctureAcupuncturesocial_workerSocial Workerregistered_nurseRegistered NurseslpSpeech Language PathologyveterinaryVeterinarymassage_therapyMassage TherapypharmacyPharmacypodiatristPodiatristdietitian_nutritionistDietitian / Nutritionistathletic_trainerAthletic Traineraroma_therapyAromatherapyexercise_therapyExercise TherapyemsEmergency Medical ServicesparamedicParamedicgenetic_counsellingGenetic CounselinggenericGenericError reference
All errors return a consistent JSON body. Check the code field to handle errors programmatically.
{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"details": {}
}
}| Code | HTTP | How to fix |
|---|---|---|
VALIDATION_ERROR | 400 | Check the required fields: transcript and specialty. |
AUTHENTICATION_ERROR | 401 | Check your Authorization header. Key format: Bearer snapi_sk_... |
AUTHORIZATION_ERROR | 403 | Create a new key in the dashboard if yours was revoked. |
NOT_FOUND | 404 | Notes expire after the retention period. Check the expires_at field. |
METHOD_NOT_ALLOWED | 405 | Use POST for /v1/note, GET for /v1/note/:id. |
CONFLICT | 409 | Revoke an existing key before creating a new one (max 5). |
INSUFFICIENT_BALANCE | 429 | Add funds at your dashboard before retrying. |
INTERNAL_ERROR | 500 | Retry with exponential backoff. Contact support if the issue persists. |
SERVICE_UNAVAILABLE | 503 | Wait and retry. Contact support if the issue persists. |