Operation events fire when Cobalt performs an RPA action inside your EHR system. They confirm the success or failure of operations Cobalt initiated on your behalf — creating appointments, adding patient insurance, uploading notes, creating tasks, and so on.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.
Some events listed here (
appointment.created, appointment.updated) also fire from EHR sync when staff make changes directly in the EHR. See Sync Events for those.Payload Envelope
Every operation event uses this envelope:| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for this event |
access_token_reference_id | string | Your reference ID associated with this webhook |
object | string | Always "event" |
created | string | ISO 8601 timestamp when the event was created |
type | string | The event type |
job_id | string | API log ID for tracking the operation |
data | object | Event-specific data payload |
Structured Error Codes
Operation failure events (appointment.failed, patient.failed, etc.) include structured error codes so you can handle different failure scenarios programmatically:
- Machine-readable error codes — parse errors programmatically instead of string matching
- Context-aware descriptions — error messages include specific details (MRN, provider names)
- Backward compatibility — the legacy
failure_reasonfield is still included
Error Response Structure
Failure events include both the legacyfailure_reason field and a reasons array:
failure_reason(string) — concatenated description for backward compatibilityreasons(array) — structured error objects, each with a machine-readablecodeand a human-readabledescription
Handling Errors Programmatically
Appointment Events
appointment.created
appointment.created
Triggered when Cobalt successfully creates an appointment in your EHR via an RPA action.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
appointment_id | string | Cobalt’s unique identifier for the appointment |
mrn | string | Patient’s Medical Record Number |
date_time | string | Appointment date and time (ISO 8601) |
timezone | string | Timezone for the appointment |
provider_id | string | Primary provider’s ID |
provider_name | string | Primary provider’s name |
secondary_provider_id | string | null | Secondary provider’s ID (if applicable) |
appointment.updated
appointment.updated
Triggered when Cobalt successfully updates an appointment in your EHR via an RPA action.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
id | string | Cobalt’s unique identifier for the appointment |
ehr_appointment_id | string | The EHR’s native appointment ID |
patient_mrn | string | Patient’s Medical Record Number |
patient_name | string | Patient’s full name |
datetime | string | Appointment date and time (ISO 8601) |
duration | number | Appointment duration in minutes |
location | string | Appointment location/room |
status | string | Appointment status code |
provider_name | string | Provider’s name |
appointment_type | string | Type of appointment |
appointment_mode | string | Mode (e.g., “office”, “telehealth”) |
updated_fields | object | Fields that changed in this update |
appointment.failed
appointment.failed
Triggered when Cobalt fails to create an appointment in your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
appointment_id | string | Cobalt’s identifier for the failed appointment |
mrn | string | Patient’s Medical Record Number |
failure_reason | string | Legacy human-readable error message |
reasons | array | Structured error objects with code and description |
PATIENT_NOT_FOUND— Patient not found in EHRPROVIDER_NOT_FOUND— Provider not found or invalidINVALID_VISIT_TYPE— Visit type not configured in EHRLOCATION_NOT_FOUND— Location/facility not foundTIME_SLOT_UNAVAILABLE— Requested time slot is not availablePROVIDER_UNAVAILABLE— Provider unavailable at requested timeINVALID_COMPLAINT_TYPE— Chief complaint type not foundTERMINAL_FAILURE— Unspecified terminal failure
appointment.update_failed
appointment.update_failed
Triggered when Cobalt fails to update an existing appointment in your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
appointment_id | string | Cobalt’s identifier for the appointment |
mrn | string | Patient’s Medical Record Number |
failure_reason | string | Legacy human-readable error message |
reasons | array | Structured error objects with code and description |
APPOINTMENT_NOT_FOUND— Appointment not found in EHRSECTION_LOCKED— Appointment section is lockedINVALID_STATUS— Invalid status transitionUPDATE_BLOCKED— Update blocked by EHR rulesCLAIMS_ASSOCIATED— Claims exist, update not allowedUPDATE_VERIFICATION_FAILED— Update verification failedTERMINAL_FAILURE— Unspecified terminal failure
Patient Events
patient.created
patient.created
Triggered when Cobalt successfully creates a patient in your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
patient_id | string | Cobalt’s unique identifier for the patient |
mrn | string | Patient’s Medical Record Number |
first_name | string | Patient’s first name |
last_name | string | Patient’s last name |
date_of_birth | string | Patient’s date of birth (YYYY-MM-DD) |
sex | string | Patient’s sex |
email | string | Patient’s email address |
phone | string | Patient’s phone number |
patient.failed
patient.failed
Triggered when Cobalt fails to create a patient in your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
patient_id | string | Cobalt’s identifier for the failed patient creation |
failure_reason | string | Legacy human-readable error message |
reasons | array | Structured error objects with code and description |
existing_mrn | string | MRN of existing patient (for duplicate errors) |
DUPLICATE_PATIENT— Patient already exists with same name/DOBINVALID_DATE_OF_BIRTH— Date of birth format is invalidREQUIRED_FIELD_MISSING— Required demographic field missingINSURANCE_NOT_FOUND— Insurance company not found in EHRINVALID_INSURANCE_POLICY_TYPE— Insurance policy type invalidPCP_PROVIDER_NOT_FOUND— Primary care provider not foundREFERRING_PROVIDER_NOT_FOUND— Referring provider not foundPHARMACY_NOT_FOUND— Pharmacy not found in EHRPERMISSION_DENIED— User lacks permission to create patientsTERMINAL_FAILURE— Unspecified terminal failure
patient.insurance.added
patient.insurance.added
Triggered when Cobalt successfully adds insurance information for a patient.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
patient_insurance_id | string | Cobalt’s unique identifier for the insurance record |
patient_mrn | string | Patient’s Medical Record Number |
member_id | string | Insurance member ID |
group_id | string | Insurance group ID |
plan_begin_date | string | Insurance plan start date (YYYY-MM-DD) |
copayment | number | Copayment amount |
audit_trail | array | List of fields modified in the EHR with before/after values |
patient.insurance.failed
patient.insurance.failed
Triggered when Cobalt fails to add insurance information for a patient.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
patient_insurance_id | string | Cobalt’s identifier for the insurance record |
patient_mrn | string | Patient’s Medical Record Number |
error | string | Human-readable explanation of why the insurance addition failed |
Task Events
task.created
task.created
Triggered when Cobalt successfully creates a task in your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
task_id | string | Cobalt’s unique identifier for the task |
emr_task_id | string | The EHR’s native task ID |
subject | string | Task subject/title |
description | string | Detailed task description |
assignee_user_id | string | ID of the user assigned to the task |
patient_mrn | string | Patient’s Medical Record Number (if applicable) |
task.failed
task.failed
Triggered when Cobalt fails to create a task in your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
task_id | string | Cobalt’s identifier for the failed task |
failure_reason | string | Legacy human-readable error message |
reasons | array | Structured error objects with code and description |
PATIENT_NOT_FOUND— Patient MRN not found in EHRASSIGNEE_NOT_FOUND— Assigned user not found in EHRINVALID_TASK_DATA— Task data validation failedPERMISSION_DENIED— User lacks permission to create tasksTERMINAL_FAILURE— Unspecified terminal failure
Note Events
note.uploaded
note.uploaded
Triggered when Cobalt successfully uploads a clinical note to your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
appointment_id | string | Cobalt’s appointment identifier |
patient_mrn | string | Patient’s Medical Record Number |
note_type | string | Type of clinical note uploaded |
provider_name | string | Name of the provider who authored the note |
note.failed
note.failed
Triggered when Cobalt fails to upload a clinical note to your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
appointment_id | string | Cobalt’s appointment identifier |
timezone | string | Timezone for the appointment |
mrn | string | Patient’s Medical Record Number |
reasons | array | List of error objects with code and description |
SECTION_NOT_FOUND— Required note section not found in templatePATIENT_NOT_FOUND— Patient not found in EHRAPPOINTMENT_NOT_FOUND— Appointment not found in EHRUNKNOWN_ERROR— Unexpected error occurred
Document Events
document.uploaded
document.uploaded
Triggered when Cobalt successfully uploads a document to your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
document_id | string | Cobalt’s unique identifier for the document |
patient_mrn | string | Patient’s Medical Record Number |
folder_name | string | EHR folder/category where document was uploaded |
document.failed
document.failed
Triggered when Cobalt fails to upload a document to your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
document_id | string | Cobalt’s identifier for the document |
patient_mrn | string | Patient’s Medical Record Number |
folder_name | string | Target EHR folder/category |
reasons | array | List of error objects with code and description |
PATIENT_NOT_FOUND— Patient not found in EHRDOCUMENT_CLASS_NOT_FOUND— Document folder/category not foundINVALID_DOCUMENT_CONTENT— Document content is invalidDOCUMENT_UPLOAD_FAILED— Upload failed for unspecified reasonUNKNOWN_ERROR— Unexpected error occurred
document.upload_failed
document.upload_failed
Triggered when Cobalt fails to upload a document to eClinicalWorks specifically.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
document_id | string | Cobalt’s identifier for the document |
patient_mrn | string | Patient’s Medical Record Number |
folder_name | string | Target EHR folder/category |
failure_reason | string | Legacy human-readable error message |
reasons | array | Structured error objects with code and description |
PATIENT_NOT_FOUND— Patient not found in EHRDOCUMENT_CLASS_NOT_FOUND— Document folder/category not foundUNKNOWN_ERROR— Unexpected error occurred during upload
Message Events
message.created
message.created
Triggered when Cobalt successfully creates a message in your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
message_id | string | Cobalt’s unique identifier for the message |
provider_id | string | ID of the provider who received the message |
subject | string | Message subject line |
message.failed
message.failed
Triggered when Cobalt fails to create a message in your EHR system.Payload Example:Data Fields:
Common Error Codes:
| Field | Type | Description |
|---|---|---|
message_id | string | Cobalt’s identifier for the message |
provider_id | string | ID of the target provider |
failure_reason | string | Legacy human-readable error message |
reasons | array | Structured error objects with code and description |
MESSAGE_SEND_FAILED— Message failed to sendPROVIDER_NOT_FOUND— Provider not found in EHRINVALID_MESSAGE_CONTENT— Message content validation failedMESSAGE_TOO_LONG— Message exceeds maximum lengthTERMINAL_FAILURE— Unspecified terminal failure
Telephone Encounter Events
telephone_encounter.created
telephone_encounter.created
Triggered when Cobalt successfully creates a telephone encounter in your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
telephone_encounter_id | string | Cobalt’s unique identifier for the telephone encounter |
emr_encounter_id | string | The EHR’s native encounter ID |
patient_mrn | string | Patient’s Medical Record Number |
provider_id | string | EHR provider ID |
location_id | string | EHR location ID |
assigned_to_id | string | EHR user ID the encounter is assigned to |
reason | string | null | Reason for the telephone encounter |
refill_medication_name | string | Medication name (only present when a refill was requested and added successfully) |
telephone_encounter.created_partial
telephone_encounter.created_partial
Triggered when Cobalt creates a telephone encounter successfully but a requested medication refill could not be added.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
telephone_encounter_id | string | Cobalt’s unique identifier for the telephone encounter |
emr_encounter_id | string | The EHR’s native encounter ID |
patient_mrn | string | Patient’s Medical Record Number |
provider_id | string | EHR provider ID |
location_id | string | EHR location ID |
assigned_to_id | string | EHR user ID the encounter is assigned to |
reason | string | null | Reason for the telephone encounter |
refill_medication_name | string | Requested medication name |
refill_failure_reason | string | Why the medication refill could not be added |
The encounter itself was created successfully — only the medication refill portion failed. Follow up manually to add the refill or notify the requester.
telephone_encounter.failed
telephone_encounter.failed
Triggered when Cobalt fails to create a telephone encounter in your EHR system.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
telephone_encounter_id | string | Cobalt’s identifier for the failed telephone encounter |
patient_mrn | string | null | Patient’s Medical Record Number |
refill_medication_name | string | null | Requested medication name (if a refill was requested) |
failure_reason | string | Detailed explanation of why the telephone encounter creation failed |
telephone_encounter_action.created
telephone_encounter_action.created
Triggered when Cobalt successfully adds an action (note/update) to an existing telephone encounter.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
action_id | string | Cobalt’s unique identifier for the action |
emr_appointment_id | string | The EHR’s encounter/appointment ID the action was added to |
text | string | The action text/note that was added |
telephone_encounter_action.failed
telephone_encounter_action.failed
Triggered when Cobalt fails to add an action to a telephone encounter.Payload Example:Data Fields:
| Field | Type | Description |
|---|---|---|
action_id | string | Cobalt’s identifier for the action |
emr_appointment_id | string | null | The EHR’s encounter/appointment ID the action targeted |
failure_reason | string | Detailed explanation of why the action failed |
Test Event
test.event
test.event
A test event used to verify webhook delivery and integration setup. Trigger it manually using the Send Test Webhook endpoint (Data Fields:
Triggering a Test Event:The test event is sent to all configured webhook URLs for your client. Use it to verify your endpoint is receiving events, your signature verification logic works, and your event processing pipeline is healthy.
POST /v1/webhook/test).Payload Example:| Field | Type | Description |
|---|---|---|
message | string | Test message content |
timestamp | string | When the test event was generated |
You must have at least one webhook URL configured (
POST /v1/webhook) before sending a test event.