Docs/Voice API/Appointment reminders

Appointment reminder calls

Call each patient or client a day ahead, confirm the appointment or take a preferred new time, and get the result back in your system without anyone at the front desk dialing.

The scenario

A dental practice wants every patient called 24 to 48 hours before their visit. Maria has a cleaning on Thursday at 10:30 AM. The agent should confirm it, or take down when she would rather come in so the front desk can rebook her. Your scheduling system places one call per appointment.

The request

Read the Voice API overview first for keys and headers. This request uses a voice:call key and calls from the practice's agent number.

curl -X POST https://api.talktomyagent.io/v1/voice/calls \
  -H "Authorization: Bearer $TTMA_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: appt-48213-reminder-1" \
  -d '{
    "from": "+16475550100",
    "to": "+12025550134",
    "targetName": "Maria",
    "triggeredBy": "scheduling-system",
    "maxDurationSecs": 180,
    "task": {
      "goal": "Confirm the cleaning for Maria on Thursday at 10:30 AM, or note the day and time she would prefer instead.",
      "script": "appointment_confirmation",
      "facts": {
        "patient_name": "Maria",
        "appointment_type": "dental cleaning",
        "appointment_date": "Thursday, November 12",
        "appointment_time": "10:30 AM",
        "provider_name": "Dr. Patel",
        "practice_name": "Riverside Dental",
        "office_phone": "+16475559876"
      },
      "escalation": "If she asks a clinical question, say the office will call her back, and end the call."
    }
  }'
  • Idempotency-Key. Derive it from the appointment ID and the attempt number, as above. A retry after a network error can then never ring Maria twice.
  • maxDurationSecs. Three minutes is plenty for a confirmation. The minimum is 60.
  • facts. Send dates and times already formatted the way they should be spoken. The agent only states facts you sent.

What the script covers

The appointment_confirmation script is written once, with our team during the build, and reused for every reminder. A good one covers:

PartExample content
OpeningGreet the patient by name, say which practice is calling, state the appointment type, provider, date and time, and ask if they can make it.
ConfirmsThank them, repeat the date and time once, close.
Wants another timeAsk for a preferred day and time, read it back, say the office will confirm the new slot, close.
CancelsConfirm the cancellation, ask whether they want to rebook later, close.
VoicemailLeave a short message with the date, time and office phone number. By default there is no voicemail detection on these calls: the agent hears the greeting like a person would, so the script should say what to do.
Wrong personApologise, do not share any appointment details, close.
Hard rulesNever give medical advice. Never share another patient's information. Never promise a slot; the office confirms it.
Required factspatient_name, appointment_date, appointment_time. With published scripts, a call missing one is refused with 400 before anyone is rung.

Reading the result

Register a call.ended webhook, or fetch GET /v1/voice/calls/{callControlId}. The useful fields for a reminder:

FieldUse it to
data.outcome.statusThe call judged against your task.goal: completed, not_completed (a real conversation, goal not met), dropped (no usable conversation) or unknown. outcome is null until the post-call evaluation has run, which is often after the webhook was sent; fetch the call again later if you need it.
data.outcome.summaryA short written summary, for example the preferred new time. Put it on the appointment record.
data.transcriptThe full conversation, when Ship Transcripts is on.
data.durationSeconds, data.endedReasonSpot calls nobody answered or that ended early, and retry those later.

Gotchas

  • Calling hours and opt-outs are yours to enforce. The API does not know the patient's time zone or whether they asked not to be called. Schedule calls in local daytime hours and skip opted-out patients.
  • Two calls at a time per agent by default. A morning batch of 80 reminders has to be paced: start the next call when one ends. Calls placed while both lines are busy are dropped.
  • 5 calls per hour to the same number. Families often share a number. Space out reminders to the same household.
  • Retry once, not repeatedly. If nobody answered, try once more later in the day and then leave it to your normal process.

Which call should your agent take first?

Tell us which requests your team handles most often. We'll suggest a practical place to start.

Tell us about your calls