Skip to main content
POST
Create a telephone encounter
Telephone encounters are created in the provider’s EMR using an asynchronous processing model. Creating telephone encounters this way is not instantaneous. Instead of leaving your POST request hanging until completion, we immediately return a success response if the request is properly formed. We then notify you via a webhook when the telephone encounter processing has completed. This gives you flexibility around your user experience. For example, when you first make the /telephone-encounters call you can display a Processing status to your user and when you get the webhook notification you can update that to Completed.

Request Parameters

Required Fields

  • patient_mrn (string, required): Patient’s Medical Record Number
  • provider_id (string, required): Provider’s EMR ID
  • location_id (string, required): Location’s EMR ID
  • assigned_to_id (string, required): EMR user ID of the staff member the encounter is assigned to. This can be any staff member in your organization (provider, nurse, front desk), not just providers. Valid IDs are the ehr_id values in the staff_list field returned by GET /v1/settings.

Optional Fields

  • reason (string, optional, max 50 characters): Reason for telephone encounter
  • refill_medication_name (string, optional, 2-50 characters): Name of medication to refill. If provided, the system will search for a matching medication in the patient’s available refillable medications and add it to the encounter. The medication name is matched case-insensitively and supports partial matches.
  • pharmacy_ehr_id (string, optional): Pharmacy’s EMR ID. If provided, the pharmacy must exist in your organization’s pharmacy list (validate via GET /v1/pharmacies). When used with a medication refill, the pharmacy will be associated with the encounter. If the pharmacy is not already in the patient’s pharmacy list, it will be added automatically.
  • caller (string, optional, max 100 characters): Name of the person who called
  • message (string, optional): Message content from the caller
  • is_high_priority (string, optional): Whether this encounter should be marked as high priority. Must be “true” or “false”.
  • template_name (string, optional): The template name to use when filling out the document upload form.

Medication Refill Behavior

When refill_medication_name is provided:
  1. Medication Search: The system searches the patient’s available medications for a match
  2. Filtering: Only refillable medications that are available for the patient are considered
  3. Matching: Medication names are matched case-insensitively with partial name support
  4. Success: If found, the encounter is created and the medication refill is added to it
  5. Failure: If the medication is not found, the encounter is NOT created and an error is returned with a list of available medications

Example Request

Basic Request

Request with Medication Refill

Example Response

The response includes:
  • telephone_encounter_id: Unique identifier for the created telephone encounter record
  • job_id: Job execution identifier for tracking the async operation

Error Responses

Missing Required Field

Possible missing fields: patient_mrn, provider_id, location_id, assigned_to_id

Reason Too Long

Medication Name Invalid Length

Provider Not Found

This error occurs when provider_id doesn’t exist in the providers table. Sync providers using GET /v1/providers.

Staff Member Not Found

This error occurs when assigned_to_id doesn’t exist in the staff list. Valid staff IDs are the ehr_id values in the staff_list field returned by GET /v1/settings.

Location Not Found

Sync locations using GET /v1/locations to resolve this error.

Pharmacy Not Found

This error occurs when pharmacy_ehr_id is present but no corresponding pharmacy can be found. Call GET /v1/pharmacies to see what available pharmacies there are.

User Not Found

This indicates an issue with your access token.

Unsupported EMR

Your EMR system may not currently support telephone encounter creation.

Webhook Notifications

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

Success

Note: refill_medication_name will be included in the webhook data if a medication refill was requested and successfully added.

Partial Success

When the encounter is created successfully but the medication refill fails to be added, a partial success webhook is sent:
Note: The telephone_encounter.created_partial event indicates that the encounter was successfully created in the EMR, but the requested medication refill could not be added. The encounter exists and is usable, but the refill will need to be added manually.

Failure

General Failure
Medication Not Found Failure
When a medication refill is requested but the medication cannot be found in the patient’s available medications, the encounter is NOT created and a failure webhook is sent with the list of available medications:

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 encounter is for.

Example:

"12345"

provider_id
string
required

EMR provider ID. Validated against the account’s providers.

Example:

"provider-123"

location_id
string
required

EMR location ID. Validated against the account’s locations.

Example:

"location-1"

assigned_to_id
string
required

EMR staff ID to assign the encounter to. Validated against the account’s staff.

Example:

"staff-123"

reason
string

Reason for the encounter (max 50 characters).

Example:

"Medication refill"

refill_medication_name
string

Medication name for a refill request (2–50 characters).

Example:

"Lisinopril 10mg"

pharmacy_ehr_id
string

EMR pharmacy ID for a refill request.

Example:

"PHARM-123"

caller
string

Who placed the call (max 100 characters).

Example:

"Jane Doe (patient)"

message
string

Free-text message for the encounter.

Example:

"Patient requests a refill of their blood pressure medication."

is_high_priority
string

Whether the encounter is high priority. One of: "true", "false". Defaults to "false".

Example:

"false"

callback_urls
string[]

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

Example:

Response

Telephone encounter queued for creation

success
boolean
required
message
string
required
telephone_encounter_id
string
required
job_id
required