Skip to main content
POST
Create Patient

Provider IDs for Referrals

When creating patients with referral information, use the ehr_id value from providers:
  • referred_to_provider_id (optional): Use the ehr_id from GET /v1/providers (not the id)
This value represents the rendering provider identifier your EMR system uses. Cobalt passes it directly to your EMR when creating the patient record.
Don’t use the Cobalt id here. The id field from GET responses is Cobalt’s internal UUID, used only for updating provider settings via PATCH endpoints.

Referring Provider and PCP Options

When creating a patient, you can specify the referring provider and PCP (Primary Care Provider) using either names or provider IDs:

Option 1: Provider Names (All EMRs)

Provide the provider’s first and last name:

Option 2: Provider IDs (eClinicalWorks Only)

Provide a Cobalt id (UUID, with or without dashes). This option:
  • Automatically looks up the provider’s name, phone, and fax
  • Provides more accurate matching by validating contact information in the EMR
  • Falls back to using provided names if the ID is not found
The accepted source depends on the field:
  • referring_provider_id: the id from GET /v1/referring-providers.
  • pcp_id: the id from either GET /v1/referring-providers or GET /v1/providers. Pass a /v1/providers id when the patient’s PCP is one of the practice’s own physicians rather than an external referring provider. Cobalt resolves the UUID against both sets of providers, so you can use whichever endpoint the provider appears in.
For pcp_id, use the id field (the Cobalt UUID), not the ehr_id. This differs from referred_to_provider_id, which expects the ehr_id from GET /v1/providers.
EMR Compatibility: The referring_provider_id and pcp_id parameters are currently only supported for eClinicalWorks. For other EMRs, you must use the name fields (referring_provider_first_name, referring_provider_last_name, pcp_first_name, pcp_last_name).

Responsible Party (eClinicalWorks Only)

By default, the patient is their own responsible party (responsible_party: "self"). For minors or patients whose billing is managed by another person, set responsible_party to one of the values below and include the guarantor’s demographic fields. When a non-self responsible party is provided alongside insurance, Cobalt will:
  1. Create a guarantor record in eCW with the provided demographics
  2. Link that guarantor to the insurance record
  3. Set the responsible party on the patient
Supported values: Optional guarantor fields:
responsible_party_first_name and responsible_party_last_name are required when using a non-self responsible party. The guarantor is created as a separate record in eCW — if a guarantor with those demographics already exists in your instance, a duplicate will be created.

Registration Fields (eClinicalWorks Only)

Additional demographic and consent fields can be set at patient creation:
Notification language. When voice_enabled or text_enabled is set, the notification language in eCW follows the patient’s language: Spanish when language contains “spanish” (case-insensitive), otherwise English. These are the only two options eCW exposes for communication notifications.

Insurance Options

When creating a patient, you can specify insurance using either the insurance name or an insurance provider ID: Option 1: Insurance Name (All EMRs)
Option 2: Insurance Provider ID (eClinicalWorks Only) Use insurance_provider_id from GET /v1/insurance-providers (UUID without dashes). This option:
  • Automatically looks up the insurance name, address, city, and state
  • Provides more accurate matching when there are duplicate insurance names
  • Falls back to using provided insurance_name if the ID is not found

Example Request

Basic Request

With Provider Names

With Provider IDs (eClinicalWorks Only)

Example Response

Webhook Notifications

When patient processing is complete, we will send a webhook to your registered endpoint. Here are examples of what those webhook payloads will look like:

Success

Failure Examples

The patient.failed webhook event includes a failure_reason and may contain additional fields in the data object depending on the cause of the failure. Duplicate Patient:
Referring Provider Not Found:
PCP Not Found:
Insurance Not Found:
Patient creation is asynchronous. Store the returned patient_id and listen for webhooks to determine the final status.

Authorizations

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

Body

application/json
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
check_eligibility
enum<string>
default:false

Whether to check insurance eligibility for the patient

Available options:
true,
false
dob
string
email
string

Patient email address

no_email_reason
string

Reason why email was not provided. Can be used instead of email when email is required. Only available for certain EMRs.

ssn
string

Patient Social Security Number as 9 digits, no dashes (e.g. 123456789).

no_ssn_reason
string

Free-text reason SSN was not provided, used when ssn is omitted (e.g. 'patient refused', 'patient does not have SSN'). Recorded on the patient in the EMR. Only available for certain EMRs (eClinicalWorks).

marital_status
string

Patient marital status. For eClinicalWorks, must be one of: Divorced, Married, Partner, Single, Unknown, Widowed, Legally Separated.

emergency_contact_first_name
string
emergency_contact_last_name
string
emergency_contact_phone
string
emergency_contact_relation
string
first_name
string
group_number
string

Insurance group number. Currently only used for Greenway, where it is required alongside plan_code and insurance_policy_type when attaching insurance.

insurance_name
string
insurance_provider_id
string

The id of an insurance provider from GET /v1/insurance-providers (UUID without dashes). Can be used instead of insurance_name for enhanced matching. Currently only supported for eClinicalWorks.

insurance_sequence
enum<string>
Available options:
primary,
secondary,
tertiary
insurance_subscriber_number
string
last_name
string
pcp_first_name
string
pcp_last_name
string
pcp_id
string

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

plan_code
string

Greenway-internal plan code identifying the payer (e.g. AETN08). Currently only used for Greenway, where it replaces the insurance_name lookup and is required alongside group_number and insurance_policy_type when attaching insurance.

pharmacy_id
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.

responsible_party
enum<string>

The responsible party for the patient. Non-self values (spouse, parent, child, other, unknown) are currently supported for eClinicalWorks only and require responsible_party_* demographic fields.

Available options:
self,
spouse,
child,
adopted_child,
step_child,
foster_child,
ward_of_court,
employee,
unknown,
handicapped_dependent,
organ_donor,
cadaver_donor,
grandchild,
niece_nephew,
injured_plaintiff,
sponsored_dependent,
minor_dependent,
parent,
grandparent,
life_partner,
other
secondary_insurance_name
string
secondary_insurance_subscriber_number
string
sex
enum<string>
Available options:
male,
female,
unknown
responsible_party_first_name
string

First name of the responsible party. Required when responsible_party is not self (eClinicalWorks only).

responsible_party_last_name
string

Last name of the responsible party. Required when responsible_party is not self (eClinicalWorks only).

responsible_party_sex
enum<string>

Sex of the responsible party (eClinicalWorks only).

Available options:
male,
female
responsible_party_dob
string

Date of birth of the responsible party in YYYY-MM-DD format (eClinicalWorks only).

responsible_party_phone
string

Phone number of the responsible party (eClinicalWorks only).

responsible_party_email
string

Email address of the responsible party (eClinicalWorks only).

responsible_party_address_line1
string

Street address line 1 of the responsible party (eClinicalWorks only).

responsible_party_address_line2
string

Street address line 2 of the responsible party (eClinicalWorks only).

responsible_party_address_city
string

City of the responsible party (eClinicalWorks only).

responsible_party_address_state
string

Two-letter U.S. state abbreviation for the responsible party address (eClinicalWorks only).

responsible_party_address_zip
string

5-digit ZIP code for the responsible party address (eClinicalWorks only).

language
string

Patient preferred language (eClinicalWorks only). Must match a valid language name in your eCW instance.

race
string

Patient race (eClinicalWorks only). Must match a valid race name in your eCW instance.

ethnicity
string

Patient ethnicity (eClinicalWorks only). Must match a valid ethnicity code or display name in your eCW instance.

release_of_info
boolean

Consent for release of information (eClinicalWorks only). Defaults to true.

Consent for pharmacy history sharing (eClinicalWorks only). Defaults to true.

self_pay
boolean

Explicitly marks the patient as self-pay, overriding insurance-derived self-pay logic (eClinicalWorks only).

default_facility_id
string

The eCW facility ID to set as the patient primary service location (eClinicalWorks only).

voice_enabled
boolean

Enables voice (phone) notifications for the patient in the eCW Patient Communications settings (eClinicalWorks only).

text_enabled
boolean

Enables text (SMS) notifications for the patient in the eCW Patient Communications settings (eClinicalWorks only).

Response

200 - application/json

Successful response

success
boolean
message
string
patient_id
string