Skip to main content
POST
Create a task
Depending on the EMR system connected to the account, additional fields beyond the base required fields may be required. If a conditionally required field is missing, the API will return a 400 error specifying the missing field.

Request Parameters

Required Fields

These fields are always required regardless of the connected EMR:
  • description (string, required): Task description/body content
  • patient_mrn (string, required): Medical Record Number (MRN) of the patient

Conditionally Required Fields

Depending on the connected EMR, some combination of the following fields will also be required:
  • subject (string, conditionally required): Task title/subject line
  • assignee_user_id (string, conditionally required): EMR user ID to assign the task to
  • phone_call_type_id (string, conditionally required): Identifier for the phone call type
  • notify_list (string[], optional): Recipients to notify about the task, using ehr_id values from Get Settings. Where notify_staff_list is supported, notify_list takes groups (from staff_groups) and notify_staff_list takes people (from staff_list).
  • notify_staff_list (string[], optional): People to notify about the task, using ehr_id values from staff_list on Get Settings.

Example Requests

Example Response

The response includes:
  • task_id: Unique identifier for the created task record
  • job_id: Job execution identifier for tracking the async operation

Error Responses

Missing Required Field

If a required or conditionally required field is missing, the API returns a 400 with the specific field name:

User Not Found

Webhook Notifications

When the task 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

Authorizations

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

Body

application/json
patient_mrn
string
required

Medical Record Number of the patient the task is about.

Example:

"12345"

description
string

Task description / body text. For ModMed EMA this is the task note. For eClinicalWorks this is the action Notes.

Example:

"Call patient about lab results"

subject
string

Task subject / title. For eClinicalWorks this is the action Subject.

Example:

"Lab results"

assignee_user_id
string

EMR user ID to assign the task to.

Example:

"STAFF-123"

phone_call_type_id

Phone call type ID for the task (an ehr_id from phone_call_types on GET /v1/settings). For NextechPM, the to-do category ID.

Example:

"1"

notify_list
string[]

Recipients to notify. For Nextech, group IDs (an ehr_id from staff_groups on GET /v1/settings); for ModMed Gastro, recipient tasking GUIDs.

Example:
notify_staff_list
string[]

People to notify (an ehr_id from GET /v1/staff). Groups go in notify_list.

location_id
string

EMR location ID the task belongs to. Validated against the account’s locations.

Example:

"location-1"

task_type
string

Task type. For ModMed Gastro, a practice-specific label (defaults to "General"). For ModMed EMA, the task Type (e.g. "Prescribe", "Communication"), validated against the account. For eClinicalWorks, the action Type label (optional).

Example:

"Communication"

details
string

ModMed EMA "Details" value (e.g. "Medication", "Results"), validated against the account.

Example:

"Results"

assigned_to

Staff id to assign the task to. For ModMed EMA, a staff id (an ehr_id from GET /v1/staff) or staff-group id (from staff_groups on GET /v1/settings). For eClinicalWorks, the staff EHR id the action is assigned to (an ehr_id from GET /v1/staff). For NextechPM, one person (an ehr_id from GET /v1/staff).

Example:

"STAFF-123"

facility_id

Facility id the task is filed under. Optional; defaults to the account facility when the account has a single facility. Supported for ModMed EMA and eClinicalWorks.

Example:

"FAC-123"

due_date
string

Task due date (ISO 8601, e.g. "2026-11-25"). Optional. Supported for ModMed EMA and eClinicalWorks.

Example:

"2026-03-20"

start_date
string

eClinicalWorks action start date (ISO 8601, e.g. "2026-11-25"). Optional; defaults to the creation date.

Example:

"2026-03-15"

priority

Task priority. Optional. For eClinicalWorks, one of "Low", "Normal", "High" (defaults to "Normal"). For NextechPM, the numeric to-do priority value, passed through as-is (defaults to 1).

Example:

"Normal"

callback_urls
string[]

URLs to receive the completion webhook for this task, in addition to the account webhook.

Example:
expires_at
string<date-time> | null

Optional ISO 8601 timestamp with an explicit timezone offset, in the future when submitted. Cobalt starts no new operation attempt after this deadline and reports reasons[].code EXPIRED. An attempt already in progress, including write reconciliation, may finish after it.

Example:

"2027-06-15T14:30:00Z"

Response

Task queued for processing

success
boolean
required
Example:

true

message
string
required
Example:

"Task queued for processing."

task_id
string
required
Example:

"task-123"

job_id
integer
required
Example:

1