Skip to main content
POST
/
tasks
/
notes
Create Task Note
curl --request POST \
  --url https://api.usecobalt.com/v1/tasks/notes \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '
{
  "emr_task_id": "<string>",
  "note": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "task_note_id": "<string>",
  "job_id": 123
}
This endpoint appends a note to a task that already exists in the EMR. To find a task’s emr_task_id, perform a live fetch with POST /v1/patients/fetch and include: ["tasks"] — each task in the response carries its emr_task_id.

Request Parameters

  • emr_task_id (string, required): The EMR ID of the task to append the note to. Obtain this from the tasks[] array returned by POST /v1/patients/fetch with include: ["tasks"].
  • note (string, required): The note body content.

Example Request

curl -X POST https://api.usecobalt.com/v1/tasks/notes \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "emr_task_id": "9bef4113-e9ce-4895-9a17-2c18cd625116",
    "note": "Patient called back, scheduled for next week."
}'

Example Response

{
    "success": true,
    "message": "Task note processing. A webhook event will be sent upon completion.",
    "task_note_id": "abc123def456789012345678",
    "job_id": 12345
}
The response includes:
  • task_note_id: Unique identifier for the created task note record
  • job_id: Job execution identifier for tracking the async operation

Error Responses

Missing Required Field

{
    "success": false,
    "message": "Missing required field: emr_task_id"
}

Unexpected Field

Only emr_task_id and note are accepted. Any other field returns a 400:
{
    "success": false,
    "message": "Unexpected fields in request body: subject"
}

Webhook Notifications

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

Success

{
    "id": "evt_1J9X2q2eZvKYlo2CluR9g9gV",
    "access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
    "object": "event",
    "created": "2026-06-15T12:02:40Z",
    "type": "task_note.created",
    "job_id": "12345",
    "data": {
        "task_note_id": "abc123def456789012345678",
        "emr_note_id": "f862b0a0-d820-418c-9e30-412bb62bde34",
        "emr_task_id": "9bef4113-e9ce-4895-9a17-2c18cd625116",
        "note": "Patient called back, scheduled for next week."
    }
}

Failure

{
    "id": "evt_1J9X2q2eZvKYlo2CluR9g9gW",
    "access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
    "object": "event",
    "created": "2026-06-15T12:05:00Z",
    "type": "task_note.failed",
    "job_id": "12345",
    "data": {
        "task_note_id": "abc123def456789012345678",
        "failure_reason": "Failed to create task note"
    }
}

Authorizations

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

Body

application/json
emr_task_id
string
required

The EMR ID of the task to append the note to. Obtain this from the tasks[] array returned by POST /v1/patients/fetch with include: ["tasks"].

note
string
required

The note body content.

Response

Task note queued successfully

success
boolean
message
string
task_note_id
string

Unique identifier for the created task note record

job_id
integer

Job execution identifier for tracking the async operation