Skip to main content
PATCH
/
patients
/
{id}
Update 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 '
{
  "address_city": "<string>",
  "address_state": "<string>",
  "address_street": "<string>",
  "address_zip": "<string>",
  "cell_phone": "<string>",
  "dob": "2023-12-25",
  "email": "<string>",
  "first_name": "<string>",
  "insurance_name": "<string>",
  "insurance_sequence": "primary",
  "insurance_subscriber_number": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "referred_to_provider_id": "<string>",
  "referring_provider_first_name": "<string>",
  "referring_provider_last_name": "<string>",
  "referring_provider_id": "<string>",
  "sex": "male"
}
'
{
  "success": true,
  "message": "<string>"
}

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.

Use the Cobalt 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.
The update process differs based on the current status of the patient:

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.
ParameterTypeRequiredDescription
Any patient attributevariesNoAny 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 phone number, cell phone, and email address. 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.
ParameterTypeRequiredDescription
phonestringNoHome phone, formatted as 222-333-4444.
cell_phonestringNoCell phone, formatted as 222-333-4444.
emailstringNoPatient email address.
At least one of phone, cell_phone, or email must be provided. Other fields are not currently updatable on active patients.

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

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 Response

{
    "success": true,
    "message": "Patient update queued."
}
Only include the fields you want to update in the request body. Omitted fields will remain unchanged.

Authorizations

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

Path Parameters

id
string
required

The patient's ID

Body

application/json

Updates for pending/failed patients. Any allowed attribute can be updated; values are used the next time patient creation runs against the EHR.

address_city
string
address_state
string
address_street
string
address_zip
string
cell_phone
string
dob
string<date>
email
string

Patient email address

first_name
string
insurance_name
string
insurance_sequence
enum<string>
Available options:
primary,
secondary,
tertiary
insurance_subscriber_number
string
last_name
string
phone
string
referred_to_provider_id
string

The ehr_id of the provider this patient is being referred to (rendering provider). Use the ehr_id from GET /v1/providers

referring_provider_first_name
string

First name of the referring provider

referring_provider_last_name
string

Last name of the referring provider

referring_provider_id
string

The id of a referring provider from GET /v1/referring-providers (UUID without dashes). Can be used instead of referring_provider_first_name and referring_provider_last_name. Currently only supported for eClinicalWorks.

sex
enum<string>
Available options:
male,
female,
unknown

Response

200 - application/json

Successful response

success
boolean
message
string