> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecobalt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Patient Note

> Creates a free-standing chart note on a patient. Unlike a note tied to an appointment, this writes directly to the patient's chart.

### Request Parameters

* **note** (string, required): Chart note body content
* **subject** (string, required): Chart note title
* **patient\_mrn** (string, required): Medical Record Number (MRN) of the patient
* **location\_id** (string, required): EMR location ID. Must match a location returned by `GET /v1/locations` for the account.

### Example Request

```bash theme={null}
curl -X POST https://api.usecobalt.com/v1/patient-notes \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "note": "Patient reports feeling well since last visit. No new concerns to report.",
    "subject": "Wellness check-in",
    "patient_mrn": "MRN-12345",
    "location_id": "9b409d24-aa13-4ce5-a6b2-ea813eeb9530"
}'
```

### Example Response

```json theme={null}
{
    "success": true,
    "message": "Patient note processing. A webhook event will be sent upon completion.",
    "patient_note_id": "abc123def456789012345678",
    "job_id": 12345
}
```

The response includes:

* **patient\_note\_id**: Unique identifier for the created patient note record
* **job\_id**: Job execution identifier for tracking the async operation

### Error Responses

#### Missing Required Field

```json theme={null}
{
    "success": false,
    "message": "Missing required field: subject"
}
```

#### Invalid Location

```json theme={null}
{
    "success": false,
    "message": "Invalid location_id. Must be one of: ..."
}
```

### Webhook Notifications

When the patient note processing is complete, we will send a webhook to your registered endpoint.

#### Success

```json theme={null}
{
    "id": "evt_1J9X2q2eZvKYlo2CluR9g9gV",
    "access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
    "object": "event",
    "created": "2025-10-09T10:30:00Z",
    "type": "patient_note.created",
    "job_id": "12345",
    "data": {
        "patient_note_id": "abc123def456789012345678",
        "emr_note_id": "10d1c8d3-aa69-472a-a9eb-f5fbd12bf99f",
        "patient_mrn": "MRN-12345",
        "location_id": "9b409d24-aa13-4ce5-a6b2-ea813eeb9530",
        "subject": "Wellness check-in",
        "note": "Patient reports feeling well since last visit. No new concerns to report."
    }
}
```

#### Failure

```json theme={null}
{
    "id": "evt_1J9X2q2eZvKYlo2CluR9g9gW",
    "access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
    "object": "event",
    "created": "2025-10-09T10:35:00Z",
    "type": "patient_note.failed",
    "job_id": "12345",
    "data": {
        "patient_note_id": "abc123def456789012345678",
        "failure_reason": "Failed to create patient note"
    }
}
```


## OpenAPI

````yaml POST /patient-notes
openapi: 3.0.0
info:
  title: Cobalt API
  version: 1.0.1
  description: API for interacting with Cobalt's EHR integration services
servers:
  - url: https://api.usecobalt.com/v1
security:
  - ClientCredentials: []
    ClientSecret: []
    AccessToken: []
paths:
  /patient-notes:
    post:
      summary: Create Patient Note
      description: >-
        Creates a free-standing chart note on a patient. Unlike a note tied to
        an appointment, this writes directly to the patient's chart. This is an
        asynchronous operation that returns immediately with a job_id, and sends
        webhook notification upon completion.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - note
                - subject
                - patient_mrn
                - location_id
              properties:
                note:
                  type: string
                  description: Chart note body content
                subject:
                  type: string
                  description: Chart note title
                patient_mrn:
                  type: string
                  description: Medical Record Number (MRN) of the patient
                location_id:
                  type: string
                  description: >-
                    EMR location ID. Must match a location returned by GET
                    /v1/locations for the account.
      responses:
        '200':
          description: Patient note queued successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  patient_note_id:
                    type: string
                    description: Unique identifier for the created patient note record
                  job_id:
                    type: integer
                    description: Job execution identifier for tracking the async operation
        '400':
          description: Bad request - Missing or invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
        '404':
          description: User not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: User not found.
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
components:
  securitySchemes:
    ClientCredentials:
      type: apiKey
      in: header
      name: client_id
    ClientSecret:
      type: apiKey
      in: header
      name: client_secret
    AccessToken:
      type: apiKey
      in: header
      name: access_token

````