curl --request PATCH \
--url https://api.usecobalt.com/v1/patients/{id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"phone": "555-123-4567",
"cell_phone": "555-987-6543",
"email": "jane.doe@example.com",
"address_street": "123 Main Street",
"address_line2": "Apt 4B",
"address_city": "Los Angeles",
"address_state": "CA",
"address_zip": "90001",
"referring_provider_first_name": "Jane",
"referring_provider_last_name": "Doe",
"referring_provider_id": "<string>",
"pcp_first_name": "Jane",
"pcp_last_name": "Doe",
"pcp_id": "<string>",
"referred_to_provider_id": "provider-123",
"language": "English",
"race": "White",
"ethnicity": "Not Hispanic or Latino",
"billing_notes": "Balance due at next visit.",
"pharmacy_id": "PHARM-123",
"team": "TestClinic",
"callback_urls": [
"https://example.com/webhooks/cobalt"
]
}
'import requests
url = "https://api.usecobalt.com/v1/patients/{id}"
payload = {
"phone": "555-123-4567",
"cell_phone": "555-987-6543",
"email": "jane.doe@example.com",
"address_street": "123 Main Street",
"address_line2": "Apt 4B",
"address_city": "Los Angeles",
"address_state": "CA",
"address_zip": "90001",
"referring_provider_first_name": "Jane",
"referring_provider_last_name": "Doe",
"referring_provider_id": "<string>",
"pcp_first_name": "Jane",
"pcp_last_name": "Doe",
"pcp_id": "<string>",
"referred_to_provider_id": "provider-123",
"language": "English",
"race": "White",
"ethnicity": "Not Hispanic or Latino",
"billing_notes": "Balance due at next visit.",
"pharmacy_id": "PHARM-123",
"team": "TestClinic",
"callback_urls": ["https://example.com/webhooks/cobalt"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '555-123-4567',
cell_phone: '555-987-6543',
email: 'jane.doe@example.com',
address_street: '123 Main Street',
address_line2: 'Apt 4B',
address_city: 'Los Angeles',
address_state: 'CA',
address_zip: '90001',
referring_provider_first_name: 'Jane',
referring_provider_last_name: 'Doe',
referring_provider_id: '<string>',
pcp_first_name: 'Jane',
pcp_last_name: 'Doe',
pcp_id: '<string>',
referred_to_provider_id: 'provider-123',
language: 'English',
race: 'White',
ethnicity: 'Not Hispanic or Latino',
billing_notes: 'Balance due at next visit.',
pharmacy_id: 'PHARM-123',
team: 'TestClinic',
callback_urls: ['https://example.com/webhooks/cobalt']
})
};
fetch('https://api.usecobalt.com/v1/patients/{id}', 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/patients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '555-123-4567',
'cell_phone' => '555-987-6543',
'email' => 'jane.doe@example.com',
'address_street' => '123 Main Street',
'address_line2' => 'Apt 4B',
'address_city' => 'Los Angeles',
'address_state' => 'CA',
'address_zip' => '90001',
'referring_provider_first_name' => 'Jane',
'referring_provider_last_name' => 'Doe',
'referring_provider_id' => '<string>',
'pcp_first_name' => 'Jane',
'pcp_last_name' => 'Doe',
'pcp_id' => '<string>',
'referred_to_provider_id' => 'provider-123',
'language' => 'English',
'race' => 'White',
'ethnicity' => 'Not Hispanic or Latino',
'billing_notes' => 'Balance due at next visit.',
'pharmacy_id' => 'PHARM-123',
'team' => 'TestClinic',
'callback_urls' => [
'https://example.com/webhooks/cobalt'
]
]),
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/patients/{id}"
payload := strings.NewReader("{\n \"phone\": \"555-123-4567\",\n \"cell_phone\": \"555-987-6543\",\n \"email\": \"jane.doe@example.com\",\n \"address_street\": \"123 Main Street\",\n \"address_line2\": \"Apt 4B\",\n \"address_city\": \"Los Angeles\",\n \"address_state\": \"CA\",\n \"address_zip\": \"90001\",\n \"referring_provider_first_name\": \"Jane\",\n \"referring_provider_last_name\": \"Doe\",\n \"referring_provider_id\": \"<string>\",\n \"pcp_first_name\": \"Jane\",\n \"pcp_last_name\": \"Doe\",\n \"pcp_id\": \"<string>\",\n \"referred_to_provider_id\": \"provider-123\",\n \"language\": \"English\",\n \"race\": \"White\",\n \"ethnicity\": \"Not Hispanic or Latino\",\n \"billing_notes\": \"Balance due at next visit.\",\n \"pharmacy_id\": \"PHARM-123\",\n \"team\": \"TestClinic\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.usecobalt.com/v1/patients/{id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"555-123-4567\",\n \"cell_phone\": \"555-987-6543\",\n \"email\": \"jane.doe@example.com\",\n \"address_street\": \"123 Main Street\",\n \"address_line2\": \"Apt 4B\",\n \"address_city\": \"Los Angeles\",\n \"address_state\": \"CA\",\n \"address_zip\": \"90001\",\n \"referring_provider_first_name\": \"Jane\",\n \"referring_provider_last_name\": \"Doe\",\n \"referring_provider_id\": \"<string>\",\n \"pcp_first_name\": \"Jane\",\n \"pcp_last_name\": \"Doe\",\n \"pcp_id\": \"<string>\",\n \"referred_to_provider_id\": \"provider-123\",\n \"language\": \"English\",\n \"race\": \"White\",\n \"ethnicity\": \"Not Hispanic or Latino\",\n \"billing_notes\": \"Balance due at next visit.\",\n \"pharmacy_id\": \"PHARM-123\",\n \"team\": \"TestClinic\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/patients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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 \"phone\": \"555-123-4567\",\n \"cell_phone\": \"555-987-6543\",\n \"email\": \"jane.doe@example.com\",\n \"address_street\": \"123 Main Street\",\n \"address_line2\": \"Apt 4B\",\n \"address_city\": \"Los Angeles\",\n \"address_state\": \"CA\",\n \"address_zip\": \"90001\",\n \"referring_provider_first_name\": \"Jane\",\n \"referring_provider_last_name\": \"Doe\",\n \"referring_provider_id\": \"<string>\",\n \"pcp_first_name\": \"Jane\",\n \"pcp_last_name\": \"Doe\",\n \"pcp_id\": \"<string>\",\n \"referred_to_provider_id\": \"provider-123\",\n \"language\": \"English\",\n \"race\": \"White\",\n \"ethnicity\": \"Not Hispanic or Latino\",\n \"billing_notes\": \"Balance due at next visit.\",\n \"pharmacy_id\": \"PHARM-123\",\n \"team\": \"TestClinic\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"patient_id": "<string>",
"job_id": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>",
"patient_id": null
}{
"success": false,
"message": "<string>"
}Update Patient
Updates an existing patient. The update process differs based on the current status of the patient.
curl --request PATCH \
--url https://api.usecobalt.com/v1/patients/{id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"phone": "555-123-4567",
"cell_phone": "555-987-6543",
"email": "jane.doe@example.com",
"address_street": "123 Main Street",
"address_line2": "Apt 4B",
"address_city": "Los Angeles",
"address_state": "CA",
"address_zip": "90001",
"referring_provider_first_name": "Jane",
"referring_provider_last_name": "Doe",
"referring_provider_id": "<string>",
"pcp_first_name": "Jane",
"pcp_last_name": "Doe",
"pcp_id": "<string>",
"referred_to_provider_id": "provider-123",
"language": "English",
"race": "White",
"ethnicity": "Not Hispanic or Latino",
"billing_notes": "Balance due at next visit.",
"pharmacy_id": "PHARM-123",
"team": "TestClinic",
"callback_urls": [
"https://example.com/webhooks/cobalt"
]
}
'import requests
url = "https://api.usecobalt.com/v1/patients/{id}"
payload = {
"phone": "555-123-4567",
"cell_phone": "555-987-6543",
"email": "jane.doe@example.com",
"address_street": "123 Main Street",
"address_line2": "Apt 4B",
"address_city": "Los Angeles",
"address_state": "CA",
"address_zip": "90001",
"referring_provider_first_name": "Jane",
"referring_provider_last_name": "Doe",
"referring_provider_id": "<string>",
"pcp_first_name": "Jane",
"pcp_last_name": "Doe",
"pcp_id": "<string>",
"referred_to_provider_id": "provider-123",
"language": "English",
"race": "White",
"ethnicity": "Not Hispanic or Latino",
"billing_notes": "Balance due at next visit.",
"pharmacy_id": "PHARM-123",
"team": "TestClinic",
"callback_urls": ["https://example.com/webhooks/cobalt"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '555-123-4567',
cell_phone: '555-987-6543',
email: 'jane.doe@example.com',
address_street: '123 Main Street',
address_line2: 'Apt 4B',
address_city: 'Los Angeles',
address_state: 'CA',
address_zip: '90001',
referring_provider_first_name: 'Jane',
referring_provider_last_name: 'Doe',
referring_provider_id: '<string>',
pcp_first_name: 'Jane',
pcp_last_name: 'Doe',
pcp_id: '<string>',
referred_to_provider_id: 'provider-123',
language: 'English',
race: 'White',
ethnicity: 'Not Hispanic or Latino',
billing_notes: 'Balance due at next visit.',
pharmacy_id: 'PHARM-123',
team: 'TestClinic',
callback_urls: ['https://example.com/webhooks/cobalt']
})
};
fetch('https://api.usecobalt.com/v1/patients/{id}', 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/patients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '555-123-4567',
'cell_phone' => '555-987-6543',
'email' => 'jane.doe@example.com',
'address_street' => '123 Main Street',
'address_line2' => 'Apt 4B',
'address_city' => 'Los Angeles',
'address_state' => 'CA',
'address_zip' => '90001',
'referring_provider_first_name' => 'Jane',
'referring_provider_last_name' => 'Doe',
'referring_provider_id' => '<string>',
'pcp_first_name' => 'Jane',
'pcp_last_name' => 'Doe',
'pcp_id' => '<string>',
'referred_to_provider_id' => 'provider-123',
'language' => 'English',
'race' => 'White',
'ethnicity' => 'Not Hispanic or Latino',
'billing_notes' => 'Balance due at next visit.',
'pharmacy_id' => 'PHARM-123',
'team' => 'TestClinic',
'callback_urls' => [
'https://example.com/webhooks/cobalt'
]
]),
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/patients/{id}"
payload := strings.NewReader("{\n \"phone\": \"555-123-4567\",\n \"cell_phone\": \"555-987-6543\",\n \"email\": \"jane.doe@example.com\",\n \"address_street\": \"123 Main Street\",\n \"address_line2\": \"Apt 4B\",\n \"address_city\": \"Los Angeles\",\n \"address_state\": \"CA\",\n \"address_zip\": \"90001\",\n \"referring_provider_first_name\": \"Jane\",\n \"referring_provider_last_name\": \"Doe\",\n \"referring_provider_id\": \"<string>\",\n \"pcp_first_name\": \"Jane\",\n \"pcp_last_name\": \"Doe\",\n \"pcp_id\": \"<string>\",\n \"referred_to_provider_id\": \"provider-123\",\n \"language\": \"English\",\n \"race\": \"White\",\n \"ethnicity\": \"Not Hispanic or Latino\",\n \"billing_notes\": \"Balance due at next visit.\",\n \"pharmacy_id\": \"PHARM-123\",\n \"team\": \"TestClinic\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.usecobalt.com/v1/patients/{id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"555-123-4567\",\n \"cell_phone\": \"555-987-6543\",\n \"email\": \"jane.doe@example.com\",\n \"address_street\": \"123 Main Street\",\n \"address_line2\": \"Apt 4B\",\n \"address_city\": \"Los Angeles\",\n \"address_state\": \"CA\",\n \"address_zip\": \"90001\",\n \"referring_provider_first_name\": \"Jane\",\n \"referring_provider_last_name\": \"Doe\",\n \"referring_provider_id\": \"<string>\",\n \"pcp_first_name\": \"Jane\",\n \"pcp_last_name\": \"Doe\",\n \"pcp_id\": \"<string>\",\n \"referred_to_provider_id\": \"provider-123\",\n \"language\": \"English\",\n \"race\": \"White\",\n \"ethnicity\": \"Not Hispanic or Latino\",\n \"billing_notes\": \"Balance due at next visit.\",\n \"pharmacy_id\": \"PHARM-123\",\n \"team\": \"TestClinic\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/patients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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 \"phone\": \"555-123-4567\",\n \"cell_phone\": \"555-987-6543\",\n \"email\": \"jane.doe@example.com\",\n \"address_street\": \"123 Main Street\",\n \"address_line2\": \"Apt 4B\",\n \"address_city\": \"Los Angeles\",\n \"address_state\": \"CA\",\n \"address_zip\": \"90001\",\n \"referring_provider_first_name\": \"Jane\",\n \"referring_provider_last_name\": \"Doe\",\n \"referring_provider_id\": \"<string>\",\n \"pcp_first_name\": \"Jane\",\n \"pcp_last_name\": \"Doe\",\n \"pcp_id\": \"<string>\",\n \"referred_to_provider_id\": \"provider-123\",\n \"language\": \"English\",\n \"race\": \"White\",\n \"ethnicity\": \"Not Hispanic or Latino\",\n \"billing_notes\": \"Balance due at next visit.\",\n \"pharmacy_id\": \"PHARM-123\",\n \"team\": \"TestClinic\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"patient_id": "<string>",
"job_id": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>",
"patient_id": null
}{
"success": false,
"message": "<string>"
}id in the URL path. The {id} parameter should be the Cobalt patient ID returned from API responses or GET endpoints, not the MRN or EHR ID.1. Updating Pending or Failed Patients
For patients with a status of ‘pending’ or ‘failed’, the patient does not yet exist in the EHR. You can update any attribute, and the new values will be used the next time the patient creation runs.| Parameter | Type | Required | Description |
|---|---|---|---|
| Any patient attribute | varies | No | Any attribute of the patient can be updated. All fields are optional. |
2. Updating Active Patients
For patients with a status of ‘active’ (already created in the EHR), you can update the patient’s contact information, address, and provider assignments. The change is queued and applied to the EHR asynchronously; the patient’s status will move to ‘pending_update’ while the update is in flight and back to ‘active’ once the EHR write completes.Contact & Address Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | No | Home phone, formatted as 222-333-4444. |
cell_phone | string | No | Cell phone, formatted as 222-333-4444. |
email | string | No | Patient email address. |
address_street | string | No | Street address line 1. |
address_line2 | string | No | Address line 2 (apartment, suite, unit, etc.). |
address_city | string | No | City. |
address_state | string | No | Two-letter state code (e.g. CA). DC is accepted. |
address_zip | string | No | ZIP code. Accepts 5-digit (12345) or ZIP+4 (12345-6789) formats. |
save_previous_address | boolean | No | When true (default), the patient’s current address is saved as address history in the EHR before the new address is applied. Set to false to overwrite without preserving history. eClinicalWorks only. |
Provider Fields (eClinicalWorks Only)
| Parameter | Type | Required | Description |
|---|---|---|---|
referring_provider_first_name | string | No | Referring provider’s first name. Must be used with referring_provider_last_name. |
referring_provider_last_name | string | No | Referring provider’s last name. Must be used with referring_provider_first_name. |
referring_provider_id | string | No | Cobalt referring provider UUID (from GET /v1/referring-providers). Looks up the provider’s name and contact info for more accurate matching. |
pcp_first_name | string | No | PCP’s first name. Must be used with pcp_last_name. |
pcp_last_name | string | No | PCP’s last name. Must be used with pcp_first_name. |
pcp_id | string | No | Cobalt referring provider UUID (from GET /v1/referring-providers). Looks up the provider’s name and contact info for more accurate matching. |
referred_to_provider_id | string | No | Rendering provider EHR ID — use the ehr_id value from GET /v1/providers (not the id). |
Demographics & Contact Preference Fields (eClinicalWorks Only)
| Parameter | Type | Required | Description |
|---|---|---|---|
language | string | No | Patient preferred language. Must match a valid language name in your eCW instance. |
race | string | No | Patient race. Must match a valid race name in your eCW instance. |
ethnicity | string | No | Patient ethnicity. Must match a valid ethnicity code or display name in your eCW instance. |
voice_enabled | boolean | No | Enables or disables voice (phone) notifications in the eCW Patient Communications settings. |
text_enabled | boolean | No | Enables or disables text (SMS) notifications in the eCW Patient Communications settings. |
billing_notes | string | No | The patient’s billing alert notes (free text). eClinicalWorks only. The value you send replaces the current notes verbatim; the same field is returned as billing_notes by POST /v1/patients/fetch. |
pharmacy_id | string | No | The patient’s primary pharmacy, as the EMR pharmacy ID (the ehr_id from GET /v1/pharmacies). eClinicalWorks only. Adds the pharmacy as the primary, keeping any existing pharmacies and demoting the prior primary. |
self_pay | boolean | No | Marks the patient as self-pay. Accepts true or false. eClinicalWorks only. A provider-only update never changes this flag. |
billing_notes for any other EMR returns a 400. A common workflow: read the current billing_notes via patient fetch, transform it (for example, rewrite referral: ...; to scheduledreferral: ...;), then PATCH it back.voice_enabled or text_enabled is set, the notification language in eCW follows the patient’s language (using the new value if language is included in the same request, otherwise the patient’s current language): Spanish when language contains “spanish” (case-insensitive), otherwise English. These are the only two options eCW exposes for communication notifications.failed_fields array on the patient.updated webhook, along with a human-readable message. If no fields could be applied, the request fails and a patient.update_failed webhook is sent instead. Use referring_provider_id or pcp_id instead of names when possible, as ID-based resolution is more reliable.Example Request for Updating a Pending/Failed Patient
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"phone": "555-987-6543",
"insurance_name": "Aetna",
"insurance_subscriber_number": "ABC987654321"
}'
Example Request for Updating an Active Patient’s Contact Info
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"phone": "555-987-6543",
"cell_phone": "555-987-6544",
"email": "patient@example.com"
}'
Example Request for Updating an Active Patient’s Address
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"address_street": "456 New St",
"address_line2": "Apt 7",
"address_city": "Austin",
"address_state": "TX",
"address_zip": "78701"
}'
save_previous_address: false:
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"address_street": "456 New St",
"address_city": "Austin",
"address_state": "TX",
"address_zip": "78701",
"save_previous_address": false
}'
Example Request for Updating an Active Patient’s Providers
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"referring_provider_id": "e35e82b85df58f08a9b38e06a91e9f1a",
"pcp_id": "223ecd1b29e546ca9db6b391eb49b213",
"referred_to_provider_id": "82749"
}'
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"referring_provider_first_name": "Jane",
"referring_provider_last_name": "Doe",
"pcp_first_name": "Robert",
"pcp_last_name": "Johnson"
}'
Example Request for Updating an Active Patient’s Demographics & Contact Preferences
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"language": "Spanish",
"race": "White",
"ethnicity": "Hispanic or Latino",
"voice_enabled": true,
"text_enabled": true
}'
Example Request for Marking a Patient as Self-Pay
curl -X PATCH https://api.usecobalt.com/v1/patients/65ed04f9d25fca3876f367d9ad94e3c3 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"self_pay": true
}'
Example Response
{
"success": true,
"message": "Patient update queued.",
"patient_id": "65ed04f9d25fca3876f367d9ad94e3c3",
"job_id": 12345
}
job_id is the API log ID for the request and is also present on the resulting patient.updated webhook, so you can match either identifier back to this call.
Authorizations
Path Parameters
Cobalt patient ID (UUID, with or without dashes).
Body
Primary phone (222-333-4444).
"555-123-4567"
Cell phone (222-333-4444).
"555-987-6543"
Patient email.
"jane.doe@example.com"
Street address line 1.
"123 Main Street"
Street address line 2.
"Apt 4B"
City.
"Los Angeles"
Two-letter U.S. state abbreviation.
"CA"
5-digit U.S. ZIP code.
"90001"
Referring provider first name.
"Jane"
Referring provider last name.
"Doe"
Cobalt referring-provider UUID (from GET /v1/referring-providers).
Primary care provider first name.
"Jane"
Primary care provider last name.
"Doe"
Cobalt UUID of the PCP (from GET /v1/referring-providers or GET /v1/providers).
Referred-to provider EMR ID.
"provider-123"
Preferred language.
"English"
Patient race.
"White"
Patient ethnicity.
"Not Hispanic or Latino"
Whether voice notifications are enabled.
true, false Whether text notifications are enabled.
true, false Patient billing alert notes (free text).
"Balance due at next visit."
EMR pharmacy ID (the ehr_id from GET /v1/pharmacies). Sets the patient's primary pharmacy, keeping any existing pharmacies and demoting the prior primary.
"PHARM-123"
Whether the patient is self-pay.
true, false Team name (or numeric team id) to assign the client to. Assigning a team creates an episode for the client when one does not already exist.
"TestClinic"
Whether to keep the prior address on file when the address changes.
true, false URL(s) to receive the completion webhook for this update.
["https://example.com/webhooks/cobalt"]