Some events listed here (
appointment.created, appointment.updated, patient.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: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:
appointment.updated
appointment.updated
Triggered when Cobalt successfully updates an appointment in your EHR via an RPA action.Payload Example:Data Fields:
appointment.failed
appointment.failed
Triggered when Cobalt fails to create an appointment in your EHR system.Payload Example:Data Fields:
Common Error Codes:
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 timeDOUBLE_BOOKING_CONFLICT— Provider’s schedule has a conflicting visit or block at the requested time (only returned whenprevent_double_booking: "true"was set on the appointment)INVALID_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:
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:
patient.failed
patient.failed
Triggered when Cobalt fails to create a patient in your EHR system.Payload Example:Data Fields:
Common Error Codes:
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.updated
patient.updated
Triggered when Cobalt applies an update to an existing patient in your EHR. Contact/address fields and provider fields are applied independently, so an update can succeed in part. Data Fields:
failed_fields and message are present only when some requested fields could not be applied; a fully successful update omits them.Payload Example (partial update):patient.update_failed
patient.update_failed
Triggered when Cobalt could not apply any of the requested fields to an existing patient (for example, the EHR rejected every change). When at least one field is applied, a Data Fields:
patient.updated event carrying failed_fields is sent instead.Payload Example:patient.insurance.added
patient.insurance.added
Triggered when Cobalt successfully adds insurance information for a patient.Payload Example:Data Fields:
audit_trail may also be present for integrations such as Experity and EZDERM. It is not currently included in the eClinicalWorks insurance success payload shown above.patient.insurance.updated
patient.insurance.updated
Triggered when Cobalt successfully updates an existing insurance record for a patient.Payload Example:Data Fields:
patient.insurance.failed
patient.insurance.failed
Triggered when Cobalt fails to add or update insurance information for a patient.Payload Example:Data Fields:
Task Events
task.created
task.created
Triggered when Cobalt successfully creates a task in your EHR system.Payload Example:Data Fields:
task.failed
task.failed
Triggered when Cobalt fails to create a task in your EHR system.Payload Example:Data Fields:
Common Error Codes:
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.The Data Fields:
status field distinguishes a clean upload from a partial success, where the note body was written but one or more diagnosis (ICD) or procedure (CPT) codes could not be matched in the EHR. When codes are present, they are reported under icd_codes and cpt_codes, each split into matched and unmatched (and, for ICD, skipped).Payload Example:Because the note body is written even when a code fails to match, unmatched codes are reported on
note.uploaded (with status: "partial_success") rather than note.failed. Check status and the unmatched arrays if you need to reconcile coding.note.failed
note.failed
Triggered when Cobalt fails to upload a clinical note to your EHR system. This fires only after retries are exhausted.Payload Example:Data Fields:
Error Codes (eClinicalWorks):
UNSUPPORTED_CHARACTERS— The note text contains characters the EHR cannot acceptMAX_ATTEMPTS_EXCEEDED— Note creation failed after all retry attemptsUNKNOWN_ERROR— An unexpected error occurred
Document Events
document.uploaded
document.uploaded
Triggered when Cobalt successfully uploads a document to your EHR system.Payload Example:Data Fields:
document.failed
document.failed
Triggered when Cobalt fails to upload a document to your EHR system.Payload Example:Data Fields:
Common Error Codes:
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:
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:
message.failed
message.failed
Triggered when Cobalt fails to create a message in your EHR system.Payload Example:Data Fields:
Common Error Codes:
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:
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:
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:
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:
telephone_encounter_action.failed
telephone_encounter_action.failed
Triggered when Cobalt fails to add an action to a telephone encounter.Payload Example:Data Fields:
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: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:Triggering a Test Event:
You must have at least one webhook URL configured (
POST /v1/webhook) before sending a test event.