Append a note to a task
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>",
"callback_urls": [
"<string>"
]
}
'import requests
url = "https://api.usecobalt.com/v1/tasks/notes"
payload = {
"emr_task_id": "<string>",
"note": "<string>",
"callback_urls": ["<string>"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({emr_task_id: '<string>', note: '<string>', callback_urls: ['<string>']})
};
fetch('https://api.usecobalt.com/v1/tasks/notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usecobalt.com/v1/tasks/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emr_task_id' => '<string>',
'note' => '<string>',
'callback_urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/tasks/notes"
payload := strings.NewReader("{\n \"emr_task_id\": \"<string>\",\n \"note\": \"<string>\",\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usecobalt.com/v1/tasks/notes")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emr_task_id\": \"<string>\",\n \"note\": \"<string>\",\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/tasks/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emr_task_id\": \"<string>\",\n \"note\": \"<string>\",\n \"callback_urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"task_note_id": "<string>",
"job_id": 123
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Tasks
Create Task Note
Appends a note to an existing task in the provider’s EMR system.
POST
/
tasks
/
notes
Append a note to a task
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>",
"callback_urls": [
"<string>"
]
}
'import requests
url = "https://api.usecobalt.com/v1/tasks/notes"
payload = {
"emr_task_id": "<string>",
"note": "<string>",
"callback_urls": ["<string>"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({emr_task_id: '<string>', note: '<string>', callback_urls: ['<string>']})
};
fetch('https://api.usecobalt.com/v1/tasks/notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usecobalt.com/v1/tasks/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emr_task_id' => '<string>',
'note' => '<string>',
'callback_urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/tasks/notes"
payload := strings.NewReader("{\n \"emr_task_id\": \"<string>\",\n \"note\": \"<string>\",\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usecobalt.com/v1/tasks/notes")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emr_task_id\": \"<string>\",\n \"note\": \"<string>\",\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/tasks/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emr_task_id\": \"<string>\",\n \"note\": \"<string>\",\n \"callback_urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"task_note_id": "<string>",
"job_id": 123
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}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 byPOST /v1/patients/fetchwithinclude: ["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
}
- 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
Onlyemr_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
Body
application/json