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_line2": "<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_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>"
}
'
{
  "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 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

ParameterTypeRequiredDescription
phonestringNoHome phone, formatted as 222-333-4444.
cell_phonestringNoCell phone, formatted as 222-333-4444.
emailstringNoPatient email address.
address_streetstringNoStreet address line 1.
address_line2stringNoAddress line 2 (apartment, suite, unit, etc.).
address_citystringNoCity.
address_statestringNoTwo-letter state code (e.g. CA). DC is accepted.
address_zipstringNoZIP code. Accepts 5-digit (12345) or ZIP+4 (12345-6789) formats.
save_previous_addressbooleanNoWhen 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)

ParameterTypeRequiredDescription
referring_provider_first_namestringNoReferring provider’s first name. Must be used with referring_provider_last_name.
referring_provider_last_namestringNoReferring provider’s last name. Must be used with referring_provider_first_name.
referring_provider_idstringNoCobalt referring provider UUID (from GET /v1/referring-providers). Looks up the provider’s name and contact info for more accurate matching.
pcp_first_namestringNoPCP’s first name. Must be used with pcp_last_name.
pcp_last_namestringNoPCP’s last name. Must be used with pcp_first_name.
pcp_idstringNoCobalt referring provider UUID (from GET /v1/referring-providers). Looks up the provider’s name and contact info for more accurate matching.
referred_to_provider_idstringNoRendering provider EHR ID — use the ehr_id value from GET /v1/providers (not the id).
Provider updates are all-or-nothing. If a provider name cannot be resolved in the EMR, the entire update request fails — no fields (including contact/address fields in the same request) will be applied. Use referring_provider_id or pcp_id instead of names when possible, as ID-based resolution is more reliable.
At least one data field must be provided.

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"
}'
To update the address without saving the previous address as history, pass 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"
}'
Or using names instead of IDs:
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 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_line2
string

Address line 2 (apartment, suite, unit, etc.)

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