Skip to main content
POST
/
notes
Create Note
curl --request POST \
  --url https://api.usecobalt.com/v1/notes \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '{
  "appointment_id": "<string>",
  "note": "<string>",
  "icd_10_codes": [
    "<string>"
  ],
  "cpt_codes": [
    "<string>"
  ]
}'
{
  "success": true,
  "message": "<string>"
}
Notes are created in the provider’s EMR using RPA via a headless browser. Creating notes this way is not instantaneous like an API call. In our experience, it can take ~30-90 seconds to create a note depending on the complexity of the EMR. Instead of leaving your POST request hanging until note transfer completion, we immediately return a success response if the request is properly formed. We then notify you via a webhook when the note processing has completed. This gives you flexibility around your user experience. For example, when you first make the /notes call you can display a Processing status to your user and when you get the webhook notification you can update that to Completed.

Formatting Note Content

When providing the note content, it’s important to use \n for line breaks if you want those line breaks to be reflected in the EMR. For example, if you want the note to appear in the EMR as:
SUBJECTIVE:
this is the subjective section

OBJECTIVE:
this is the objective section

ASSESSMENT:
this is the assessment section

PLAN:
this is the plan section
You should send the following in the note field:
"SUBJECTIVE:\nthis is the subjective section\n\nOBJECTIVE:\nthis is the objective section\n\nASSESSMENT\nthis is the assessment section\n\nPLAN: this is the plan section"

Note Content Formats

The note parameter accepts two different formats depending on your EMR integration:
  1. String format (default): A single text string with \n line breaks
  2. Structured object format (eClinicalWorks): An object with separate fields for clinical documentation, along with optional ICD-10 and CPT codes

Example Request (String Format)

curl -X POST https://api.usecobalt.com/v1/notes \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "appointment_id": "728948",
    "note": "SUBJECTIVE:\nthis is the subjective section\n\nOBJECTIVE:\nthis is the objective section\n\nASSESSMENT\nthis is the assessment section\n\nPLAN: this is the plan section"
}'

Example Request (Structured Format for eClinicalWorks)

curl -X POST https://api.usecobalt.com/v1/notes \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "appointment_id": "728948",
    "note": {
        "hpi": "Patient presents with persistent lower back pain for 2 weeks. Pain is described as dull and achy, rated 6/10. Worse with prolonged sitting and bending forward. Denies radiation to legs, numbness, or tingling. No bowel or bladder changes. Patient tried over-the-counter ibuprofen with minimal relief.",
        "exam": "Vital signs: BP 128/82, HR 74, Temp 98.6°F. General: Alert and oriented x3, in no acute distress. MSK: Limited range of motion in lumbar spine with forward flexion. Tenderness to palpation over L4-L5 region. Negative straight leg raise bilaterally. Motor strength 5/5 in bilateral lower extremities. Sensation intact.",
        "assessment": "Acute mechanical low back pain, likely lumbar strain. No red flags for serious pathology.",
        "treatment": "Prescribed naproxen 500mg BID for 10 days. Recommended ice/heat therapy alternating every 20 minutes. Physical therapy referral placed for core strengthening and flexibility exercises. Patient educated on proper lifting mechanics and posture. Return precautions discussed including progressive neurological symptoms."
    },
    "icd_10_codes": ["M54.5", "M54.50"],
    "cpt_codes": ["99213", "97110"]
}'

Example Response

{
    "success": true,
    "message": "Note upload in progress. A webhook event will be sent upon completion."
}

Webhook Notifications

When the note processing is complete, we will send a webhook to your registered endpoint. Here are examples of what those webhook payloads will look like:

Success

{
    "id": "evt_1J9X2q2eZvKYlo2CluR9g9gV",
    "access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
    "object": "event",
    "created": "2023-10-27T10:30:00Z",
    "type": "note.uploaded",
    "data": {
        "appointment_id": "728948",
        "timezone": "America/New_York",
        "mrn": "12345"
    }
}

Failure

{
    "id": "evt_1J9X2q2eZvKYlo2CluR9g9gW",
    "access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
    "object": "event",
    "created": "2023-10-27T10:35:00Z",
    "type": "note.failed",
    "data": {
        "appointment_id": "728948",
        "mrn": "12345"
    }
}

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
appointment_id
string
required

The id of the appointment. This is the id included in the response to GET /appointments.

note
required

The data for the note. Can be either a string or structured object depending on EMR integration. A single text string with line breaks

icd_10_codes
string[]

Optional ICD-10 diagnosis codes (only used with structured note format)

cpt_codes
string[]

Optional CPT procedure codes (only used with structured note format)

Response

200 - application/json

Successful response

success
boolean
message
string
I