Webhook tool

NexHealth AI receptionist that fills open slots by phone

The agent finds open slots and books the patient through NexHealth, which writes to the practice's record system, and hands clinical calls to staff.

Practice front desk agent

Books appointments for existing patients.

Instructions

Ask what the visit is for and which day suits them. Offer two open slots and book the one they pick after confirming their name and date of birth. Do not give clinical advice. Transfer pain, medication, insurance and billing questions to the front desk.

Handoff
Front desk

Connected tools

  • Find open slotsWebhook
  • Book appointmentWebhook
  • Transfer to front deskTransfer

What a NexHealth AI voice agent can do

Open one to watch a call. The grey lines are the tools the agent calls mid-sentence.

Your service calls NexHealth's /available_slots for the appointment type, and the agent offers the patient two times that fit.

Tool definitions

Webhook tools go to POST /v1/agents/tools. Transfers are a system tool on the agent. Replace the placeholder values in capitals with your own.

Webhook

Find open slots

Asks your service for open slots for a visit type.

Show the JSON definition
find_open_slots
{
  "type": "webhook",
  "name": "find_open_slots",
  "description": "Lists open appointment slots for a visit type, starting on a date. Use it before offering times.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-practice.com/nexhealth/slots",
    "method": "GET",
    "query_params_schema": {
      "properties": {
        "start_date": {
          "type": "string",
          "description": "First date to search, YYYY-MM-DD."
        },
        "visit_type": {
          "type": "string",
          "description": "What the visit is for, such as cleaning or new patient exam."
        }
      },
      "required": [
        "start_date",
        "visit_type"
      ]
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  }
}

Webhook

Book appointment

Asks your service to find the patient and book the slot.

Show the JSON definition
book_appointment
{
  "type": "webhook",
  "name": "book_appointment",
  "description": "Books a slot from find_open_slots for the patient, found by name and date of birth.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-practice.com/nexhealth/appointments",
    "method": "POST",
    "request_body_schema": {
      "type": "object",
      "properties": {
        "slot_id": {
          "type": "string",
          "description": "The ID of the chosen slot, from find_open_slots."
        },
        "name": {
          "type": "string",
          "description": "Patient's full name."
        },
        "date_of_birth": {
          "type": "string",
          "description": "Patient's date of birth, YYYY-MM-DD."
        },
        "phone": {
          "type": "string",
          "dynamic_variable": "system__caller_id"
        }
      },
      "required": [
        "slot_id",
        "name",
        "date_of_birth"
      ]
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  }
}

Transfer

Transfer to front desk

Cold transfer to the front desk.

Show the JSON definition
transfer_to_front_desk
{
  "config": {
    "system_tools": {
      "transfer_to_number": {
        "description": null,
        "pre_tool_speech": "auto",
        "transfers": [
          {
            "destination": {
              "type": "phone",
              "phone_number": "+14155550135"
            },
            "condition": "The caller has a clinical, insurance or billing question, can't be matched to a patient, or asks for a person."
          }
        ]
      }
    }
  }
}

Set it up

No native connector. Webhook tools call a service of yours, which holds the NexHealth API key and requests a fresh bearer token every hour. Vendor details read in November 2026.

  1. Build in the sandbox

    Create a NexHealth developer account and a sandbox API key. It comes with a demo practice, and calls go to https://nexhealth.info with Nex-Api-Version v3.0.0.

  2. Run the service

    It exchanges the API key for a bearer token at POST /authenticates, then calls GET /available_slots, GET /patients and POST /appointments with the subdomain and location_id.

  3. Onboard the practice

    Switch to production, create the practice's institution, and have the office connect its record system. Confirm the sync is active before going live.

  4. Book a real test appointment

    Book a test patient, wait for the appointment_insertion.complete webhook, and have the office confirm it on their schedule and remove it.

Before you build

Patient data

Names, dates of birth and visit reasons are PHI. Settle a BAA with NexHealth, the practice and anyone else in the path before real patients call.

Accepted is not the same as written

A 201 from POST /appointments means NexHealth accepted the booking. The appointment_insertion.complete webhook tells you it reached the practice's system.

Tokens last an hour

A production bearer token from /authenticates lasts one hour, and a webhook tool cannot request a new one. Your service refreshes it before it expires.

Watch the sync

A server-based sync pauses when the office server is off. Subscribe to the sync status webhooks and transfer callers when writes are down.

Enterprise-grade security

  • HIPAA compliant badge

    HIPAA compliant

  • SOC 2 Type 2 badge

    SOC 2 Type 2

  • GDPR badge

    GDPR

NexHealth AI voice agent FAQs

Can an AI voice agent book appointments through NexHealth?

Yes. A Cartesia agent calls a service of yours, which holds the NexHealth API key, reads /available_slots, finds the patient by name and date of birth, and posts the appointment. NexHealth writes it to the practice's record system. There is no native connector, and clinical calls go to staff by transfer.

Is a NexHealth voice agent HIPAA compliant?

It can be, once the agreements are in place. Names, dates of birth and visit reasons are PHI, so settle a BAA with NexHealth, the practice and anyone else in the path, including any service that stores call data. Cartesia offers BAAs on its Enterprise plan. The healthcare guide lists what to check.

Which record systems can the agent book into?

The ones NexHealth's Synchronizer supports for that practice. NexHealth lists the supported systems in its docs. A server-based sync pauses when the office server is off, so transfer callers when writes are down.

How do I know the booking reached the practice's system?

Wait for the appointment_insertion.complete webhook. A 201 from POST /appointments only means NexHealth accepted the booking. The webhook tells your service it reached the practice's record system. If it doesn't arrive, have your service flag the booking for the office to check.

Can the agent book new patients in NexHealth?

Yes. NexHealth has a POST /patients endpoint, so your service can create the patient before it books. Many practices prefer to send new patients to the front desk instead.

What does a NexHealth voice agent cost to run?

Agents run at $0.03/min, plus LLM usage and telephony. NexHealth access is under your own agreement with NexHealth. Transfers only work on Twilio and SIP trunk calls, so put the number on Twilio or a SIP trunk if the agent hands callers to staff.

Get started today

Talk to an expert.

Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.

Contact Sales

Start building.

Access our models via API and bring a voice agent into production in minutes.

Try Cartesia