Intermediate

How to Let Your Voice Agent Book Appointments

Wire TrustPager's scheduling API into your voice agent so callers can check availability and book a time without any human involvement.

TrustPager's scheduling system can be wired directly into your voice agent. When a caller asks to book a time, the agent checks live availability and locks in the booking, without any human in the loop.

How it works

Your voice agent uses two tools from the TrustPager Scheduling API:

  1. Get available slots: returns the next available times for a given event type
  2. Create booking: books a specific slot for the caller

The agent asks the caller for their preferred time, shows them the options, and books the one they choose. The booking lands in TrustPager, syncs to the host's Google Calendar, and fires a confirmation email to the caller automatically.

Required permissions

You need a TrustPager API key with scheduling permissions. Generate one at https://app.trustpager.com/settings/api and add it to your agent's tool headers as X-API-Key.

Make sure the event type you want the agent to book is published and has at least one user assigned to it. The API only returns slots for published event types with a host.

Get available slots

Your tool should POST to the scheduling endpoint with the event type ID and the caller's timezone (if known). The response looks like this:

Offering: Discovery Call (30 min)
Host: Sarah Chen
Description: A quick call to understand your goals.

Monday 28 April: 9:00 AM [slot:2026-04-28 09:00], 9:30 AM [slot:2026-04-28 09:30], 10:30 AM [slot:2026-04-28 10:30] (+2 more)
Tuesday 29 April: 2:00 PM [slot:2026-04-29 14:00], 3:30 PM [slot:2026-04-29 15:30]

To book, pass the exact slot value (e.g. slot:"2026-04-28 09:00") with the caller's name and email.

The agent reads the slot options to the caller and notes down which one they choose. The [slot:...] values are what gets passed to the booking step. The agent should treat these as opaque identifiers, not display them to the caller.

What the agent can ask for

The availability tool takes the caller's own wording, so the agent never has to work out a date itself:

  • preferred_day: "today", "tomorrow", "ASAP", a date (YYYY-MM-DD), a weekday ("Tuesday", "next Tuesday", "Tuesday next week"), or a week phrase such as "this week", "later this week", "early next week", "mid next week", "late next week", "next week", "the week after next" or "this weekend". A weekday brings back that day for the next few weeks, plus nearby days that have times.
  • preferred_time (optional): "morning", "afternoon", "evening", or a time such as "around 2pm".
  • state (optional): the caller's state, e.g. "VIC", so times are read in their timezone.
  • expand (optional): set to true when the caller wants more options than they first heard. The tool then looks four weeks ahead and reads back up to eight days.

If nothing is open on the days the caller asked for, the tool says so and reads back the next open times after them, so the agent always has something concrete to offer.

Create a booking

Once the caller picks a time, the agent calls the booking tool with the slot value, the caller's name, and their email address. On success, the response looks like this:

Booked! John Smith's Discovery Call (30 min) is confirmed for Monday, 28 April 2026 at 9:00 AM, ending at 9:30 AM. A confirmation has been sent to john@example.com.
Host: Sarah Chen
Description: A quick call to understand your goals.
Video link: https://meet.google.com/xxx-yyyy-zzz
Booking ID: 7f3e9c42-...

The agent reads back the confirmed time to the caller and lets them know the confirmation is on its way. If the event type is a video meeting, the Google Meet link is included in the confirmation email sent to the caller.

Wiring this up in the agent tool configuration

In your agent's tool configuration:

  1. Add a tool for Get available slots. Set the method to POST, point it at your TrustPager scheduling endpoint, and include your API key in the headers. The event type ID is a fixed parameter: hardcode it per agent.
  2. Add a tool for Create booking. This tool takes three inputs the agent collects from the caller: slot (the exact value from the availability response), name, and email.
  3. In your agent's prompt, instruct it to always read out the available dates and times clearly, confirm the caller's name and email before booking, and read back the confirmed time after the booking succeeds.

Tool arguments are passed inside body.args. Make sure your endpoint reads from there, not the request body root.

Timezone handling

TrustPager converts slot times to the caller's local timezone automatically when you pass visitor_timezone in the request. If the caller's timezone isn't known up front, the agent can ask for their state and TrustPager will resolve it. Australian state names are supported (e.g. "Western Australia" maps to Australia/Perth).

If no timezone is passed, slots are returned in the host's timezone.

Troubleshooting

No slots are returned
If the tool answers "No availability found from ... to ...", nothing is open in the four weeks it searched. Check that the event type is published and has availability configured for those weeks, and that the event type ID in your tool matches the one in TrustPager.
Booking fails with a slot conflict
Slots are not held between the availability check and the booking. If another booking lands in between, the slot may be taken. Have the agent offer the next available slot if the first attempt fails.
Confirmation email not received
The email goes to the address the agent collected from the caller. If the caller gave a wrong address, the booking itself still succeeds. Check the booking record in TrustPager at https://app.trustpager.com/calendar.
Agent doesn't know who the host is or what the meeting is about
The event type has no assigned users, or the description is blank. Go to the event type editor and fill both in.
Tip: Test your agent by calling it yourself before going live. Check that slot times are read in natural language ("Monday the 28th at 9 AM" not "2026-04-28 09:00"), the confirmation is clear, and the booking shows up in TrustPager immediately after the call.
← Back to all tutorials
The last piece

Two ways to
meet FinalPiece.

Talk to Evie right now, or book a real human for a deeper walkthrough. Whichever feels right.

01 · Talk to Evie

Pick up the phone.

Hear her in 10 seconds.

Evie
VOICEMeet Evie
  • RealHer voice passes for human.
  • SmartKnows your prices, hours, and trade.
  • PatientPolite, attentive, never has a bad day.
or
02 · Book a demo

Pencil us in.

30 minutes with a real human · video call · Free.

October 2026
S
M
T
W
T
F
S
Loading…