Skip to content
Skip to top of content

The HeyGuest API lets your own systems work with HeyGuest: add and update contacts, send WhatsApp templates, read your channels and locations, manage custom voice assistants, read past calls and their transcripts, and pull your AI performance and ROI figures.

Base URL

Send every request to:

https://app.heyguest.ai/api/v1

Requests and responses are JSON.

Creating an API token

Each brand has its own API tokens, and a token only works for the brand it was created in.

API: api tokens screenshot
  1. Click Settings at the bottom of the left sidebar, then open the API Tokens tab.

  2. Under Create Brand API Token, give the token a Name you'll recognise later, such as the system that will use it.

  3. Tick the Permissions it needs: create, read, update, and delete. Give each token only what it needs; a reporting tool only needs read.

  4. Click Create and copy the token straight away. Keep it somewhere safe, as you would a password.

Using your token

Every request needs your token in the Authorization header, as a bearer token:

Authorization: Bearer YOUR_API_TOKEN

For example, to list your locations:

curl https://app.heyguest.ai/api/v1/locations \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Anyone with your token can use the API as your brand. Never share it in emails or put it in your website's code. If a token might have been exposed, create a new one and stop using the old one.

Errors

Requests that fail return a standard HTTP status code. A 422 means a field was missing or invalid; the response lists each field with its error messages. A 404 means the item doesn't exist in your brand.

Connecting your assistant to your own systems

The API lets your systems talk to HeyGuest. To let an AI assistant talk to your systems during a call or chat, for example to look up an order or a loyalty balance, use the Advanced section of the assistant's Settings tab:

  • Tools: click Add Tool to give the assistant a custom tool it can call during conversations.
  • MCP Servers: connect external tool providers using the Model Context Protocol (MCP), a standard way of offering a set of tools to an AI.

A tool can call your own API endpoint, send an email, post to Slack, read or add rows in Google Sheets, or connect an MCP server. Changes take effect immediately and don't need saving. For every field, step by step, see Custom Tools and MCP Servers.

Building a custom voice assistant entirely through the API? The Assistants and Channels endpoints below let you create a custom assistant and connect a phone number to it.

API reference

Every endpoint in version 1.3.0 of the HeyGuest API. Send requests to https://app.heyguest.ai/api/v1 with your token in the Authorization header.

Contacts

Manage contacts in your team.

List contacts

GET/contacts

Lists the contacts in your team, newest first, paginated. Use it to sync guests into a CRM or to look up a contact's UUID before sending a message.

Parameters

NameInRequiredTypeDescription
searchqueryNostringSubstring match against first_name, last_name, email, or phone_number.
location_idqueryNointegerFilter by the contact's last_location_id.
pagequeryNointeger

Responses

  • 200 Paginated list of contacts.
curl -X GET "https://app.heyguest.ai/api/v1/contacts" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Create or upsert a contact

POST/contacts

Creates a new contact, or updates the existing one if a contact with the same email or phone_number already exists in your team.

Either email or phone_number is required.

Request body

FieldTypeRequiredDescription
first_namestringNo
last_namestringNo
emailstring, emailNo
phone_numberstringNoE.164 or local format; validated via phone rule.
email_consentbooleanNo
sms_consentbooleanNo
whatsapp_consentbooleanNo
date_of_birthstring, dateNo
custom_fieldsobjectNoMap of custom field slug → value.

Responses

  • 200 Contact created or updated.
  • 422 Validation error.
curl -X POST "https://app.heyguest.ai/api/v1/contacts" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Read a contact

GET/contacts/{uuid}

Reads one contact by UUID, including consent flags and any custom fields defined for your team.

Responses

  • 200 Contact.
  • 404 Contact not found in your team.
curl -X GET "https://app.heyguest.ai/api/v1/contacts/{uuid}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Update a contact

PATCH/contacts/{uuid}

Partial update. Omitted fields are left untouched.

Request body

FieldTypeRequiredDescription
first_namestringNo
last_namestringNo
emailstring, emailNo
phone_numberstringNoE.164 or local format; validated via phone rule.
email_consentbooleanNo
sms_consentbooleanNo
whatsapp_consentbooleanNo
date_of_birthstring, dateNo
custom_fieldsobjectNoMap of custom field slug → value.

Responses

  • 200 Contact updated.
  • 404 Contact not found in your team.
  • 422 Validation error.
curl -X PATCH "https://app.heyguest.ai/api/v1/contacts/{uuid}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Messages

Send WhatsApp template messages.

Send a WhatsApp template to a contact

POST/messages/send-template

Sends an approved WhatsApp template to one contact through one of your WhatsApp channels. Use GET /templates to find the template and its variables, and GET /channels to find the channel to send from.

Request body

FieldTypeRequiredDescription
contact_idstringYesUUID of the contact to send to (must exist in your team).
channel_idstringYesUUID of a WhatsApp channel in your team.
template_idstringYesUUID of an approved WhatsApp template under this channel's WABA.
variablesobjectNoMap of template body variables ({{1}}, {{2}}, …).
hidden_variablesobjectNoVariables stored against the outbound message but not sent to WhatsApp.

Responses

  • 200 Template sent.
  • 404 Contact, channel, or template not found in your team.
  • 422 Validation error.
  • 500 Upstream WhatsApp send failed.
curl -X POST "https://app.heyguest.ai/api/v1/messages/send-template" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Templates

List approved WhatsApp templates.

List WhatsApp templates

GET/templates

Returns all approved (and pending) templates under your team's WhatsApp Business Account.

Responses

  • 200 Templates.
curl -X GET "https://app.heyguest.ai/api/v1/templates" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Channels

List channels and bind vox numbers to custom assistants. The carrier-side routing (pointing the number at HeyGuest's LiveKit ingress) must be done before calling POST /channels — the API only performs the LiveKit-side setup.

List channels

GET/channels

Lists the channels your team can send and receive on: voice numbers, WhatsApp, Facebook, Instagram, and the web chat widget. A channel is the route a guest reaches you by, and each one belongs to a location.

Parameters

NameInRequiredTypeDescription
typequeryNostring: voice | whatsapp | facebook | instagram | webchatFilter to a single channel type.
pagequeryNointeger

Responses

  • 200 Paginated list of channels.
curl -X GET "https://app.heyguest.ai/api/v1/channels" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Bind a vox number to a custom assistant

POST/channels

Provisions a new voice channel, or rebinds an existing one to a different custom assistant.

  • Idempotent. If the vox number is already bound in your team, the call rebinds it (the underlying LiveKit trunk is left in place).
  • Atomic. If LiveKit setup fails, no Channel row is written — your retry produces a clean attempt.
  • The carrier-side routing (pointing the number at HeyGuest's LiveKit ingress) must be done before calling this endpoint.

Request body

FieldTypeRequiredDescription
namestringYesDisplay name for this channel.
vox_numberstringYesE.164-style international number. Leading + and whitespace are accepted and stripped server-side. After normalization must match ^[1-9][0-9]{6,14}$.
assistant_uuidstring, uuidYesUUID of a custom assistant in your team. Validation fails with 422 if the UUID does not resolve to a custom assistant you own.

Responses

  • 200 Existing channel rebound to a different assistant.
  • 201 New channel provisioned.
  • 404 The vox number is already bound in another HeyGuest team.
  • 422 Validation failed — malformed vox_number, missing fields, or assistant_uuid does not resolve to a custom assistant in your team.
  • 502 LiveKit upstream failure. Safe to retry.
curl -X POST "https://app.heyguest.ai/api/v1/channels" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Read a voice channel by vox number

GET/channels/{vox_number}

Reads one voice channel by its vox number, including the assistant bound to it and its current status.

Responses

  • 200 Channel.
  • 404 No voice channel matches this vox number in your team.
curl -X GET "https://app.heyguest.ai/api/v1/channels/{vox_number}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Locations

List locations.

List locations

GET/locations

Lists your team's locations. Location IDs from here are what the reports endpoints accept in locations[], and what channels are assigned to.

Parameters

NameInRequiredTypeDescription
pagequeryNointeger

Responses

  • 200 Paginated list of locations.
curl -X GET "https://app.heyguest.ai/api/v1/locations" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Assistants

Manage custom voice assistants. This API never exposes preset hospitality assistants — reads and writes against non-custom UUIDs return 404.

Read a custom assistant

GET/assistants/{uuid}

Reads one custom assistant's configuration — prompt, voice, language, and which tools it may call.

Responses

  • 200 Assistant.
  • 404 UUID not found, not a custom assistant, not in your team, or soft-deleted.
curl -X GET "https://app.heyguest.ai/api/v1/assistants/{uuid}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Create or update a custom assistant

POST/assistants/{uuid}

Upserts a custom assistant under a client-supplied UUID. Use any UUID you control (e.g. your tenant ID).

  • Idempotent. Repeating the same request is safe — the second call updates instead of creating a duplicate.
  • Partial updates. Send only the fields you want to change. Omitted fields are left untouched.
  • Restores soft-deleted assistants. If a UUID was previously deleted, the next upsert restores it.
  • The prompt field is mirrored to both chat and voice surfaces.
  • UUIDs are globally unique across HeyGuest. If the UUID already exists but is not a custom assistant in your team (preset, or owned by another team), the response is 404.

Request body

FieldTypeRequiredDescription
namestringNoDefaults to Assistant {first-8-chars-of-uuid} when omitted on create.
promptstringNoRequired on first create. Optional on update. Applied to both chat and voice surfaces.
voice_providerstring: cartesia | elevenlabsNoDefaults to elevenlabs when omitted on create.
voice_idstringNo
voice_greetingstringNoOpening line spoken when a call connects. Set null to let the assistant generate one.
stt_languagestringNoe.g. en-GB, en-US, fr-FR. Defaults to en-GB when omitted on create.
stt_providerstring: elevenlabs | deepgramNoDefaults to elevenlabs when omitted on create.
hangup_toolbooleanNo
update_slots_toolbooleanNo
background_noise_enabledbooleanNo
background_noise_soundstring: crowded_room | office_ambience | city_ambience | forest_ambienceNo
background_noise_volumenumber, floatNo
thinking_sounds_enabledbooleanNo
pickup_sound_enabledbooleanNo
tts_stabilitynumber, floatNoElevenLabs only. Must be sent together with tts_speed: both numbers to opt into custom voice tuning, or both null to revert to the voice's own defaults. Mixing a number and null, or sending only one of the two, returns 422.
tts_speednumber, floatNoElevenLabs only. 1.0 is normal pace. Must be sent together with tts_stability (see above).

Responses

  • 200 Existing assistant updated (or trashed assistant restored).
  • 201 Assistant created.
  • 404 The UUID exists but is not a custom assistant in your team (preset, or owned by another team). The existing row is not modified.
  • 422 Validation failed — missing prompt on first create, invalid voice_provider, an unknown field, etc.
curl -X POST "https://app.heyguest.ai/api/v1/assistants/{uuid}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Calls

Read past calls, including transcripts and captured variables.

List calls

GET/calls

Lists past calls, newest first, paginated, with summary fields only. Read a single call for its transcript, AI summary, and captured variables.

Parameters

NameInRequiredTypeDescription
phonequeryNostringFilter calls to a specific caller. Leading + is accepted; both normalized forms are searched.
pagequeryNointeger

Responses

  • 200 Paginated list of calls (summary fields).
curl -X GET "https://app.heyguest.ai/api/v1/calls" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Latest call from a caller

GET/calls/{phone}/latest

Returns the most recent call from the given caller phone number, with full transcript, AI summary, and captured variables.

Parameters

NameInRequiredTypeDescription
phonepathYesstringCaller's phone number. Leading + is accepted.

Responses

  • 200 Call detail.
  • 404 No call exists for this caller in your team.
curl -X GET "https://app.heyguest.ai/api/v1/calls/{phone}/latest" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Read a call by room name

GET/calls/{room_name}

Reads one call by its LiveKit room name, with full transcript, AI summary, and captured variables.

Parameters

NameInRequiredTypeDescription
room_namepathYesstring

Responses

  • 200 Call detail.
  • 404 Call not found in your team.
curl -X GET "https://app.heyguest.ai/api/v1/calls/{room_name}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Reports

Read the brand's AI performance and ROI figures. Every report is addressable by name at GET /reports/{report} and shares one set of filter parameters, so a client that can read one report can read them all.

Figures are live: completed days are served from stored daily rollups, and the current day is aggregated from source on read, so today's activity appears without waiting for the nightly aggregation. The one exception is heatmap, which reads stored hourly rollups only — today's intraday pattern lands after the next aggregation run.

Read a report

GET/reports/{report}

Returns one report for the authenticated brand over the requested window, optionally against the immediately preceding window of equal length.

The data object's shape depends on the report's type, and every report echoes its own type and unit so a client can format the payload without hardcoding a lookup table:

ReportTypeUnitWhat it measures
voice-callsscalarcountHow many phone calls the AI handled, whether or not the call ended in a booking.
chats-handledscalarcountHow many chat conversations the AI handled across the web widget, WhatsApp, Facebook, and Instagram. Add channels[] to isolate one of them.
emails-handledscalarcountHow many email conversations the AI handled, across connected Microsoft and Google mailboxes.
bookings-totalscalarcountHow many bookings the AI made, across every channel. Use bookings-by-channel for the split.
out-of-hours-bookingsscalarcountHow many bookings the AI took while the venue was closed — business that would otherwise have met an unanswered phone. Voice calls carry a stamped flag; a chat counts only once it resolves to a venue with readable opening hours, and stays uncounted rather than guessed if it does not.
orders-madescalarcountHow many food orders guests placed that the venue accepted. Only accepted orders count: a cart the restaurant never confirmed, or one that failed outright, is left out rather than counted optimistically. Counted across every channel, though ordering is voice only today.
orders-valuescalarcurrency codeThe total value of the food orders the venue accepted. Each one is valued at the total stamped when the venue accepted it, so changing a delivery fee or a tax setting later never re-prices closed history.
covers-totalscalarcountHow many guests the AI booked in, as party sizes added up rather than a count of bookings. A phone booking contributes once the call records a successful booking, falling back to the covers noted on the call itself when no booking record is linked to it. A chat booking contributes once that booking is linked back to its conversation.
out-of-hours-coversscalarcountThe guests booked in while the venue was closed. The covers equivalent of out-of-hours-bookings, for sizing the trade the AI captures outside opening hours rather than just counting it.
repeat-callersscalarcountHow many interactions came from someone who had contacted the brand before. Callers are identified by phone number and chat guests by contact record, so the same person phoning and messaging is not linked across the two.
complaint-callsscalarcountHow many calls showed a frustrated guest. Derived from callers hanging up in frustration rather than from a complaint tag, and voice only — chat and email never contribute.
resolved-ratescalarpercentThe share of contacts the AI resolved with no human stepping in. The denominator counts only interactions whose outcome could be determined, so unclassified early history is excluded rather than counted as unresolved.
avg-call-lengthscalarminutesThe average length of a handled call: total talk time divided by the number of calls.
avg-call-minutes-weeklyscalarminutesTotal call minutes normalised to a weekly rate, so windows of different lengths compare directly.
hours-savedscalarhoursStaff hours the AI saved: every contact it resolved unaided, weighted by the minutes that contact would have taken your team. Tune the weighting with the ROI parameters.
labour-costscalarcurrency codeThe wage cost of the hours the AI saved — those hours multiplied by the hourly rate, in the brand's currency.
ftescalarfteThe hours the AI saved expressed as full-time-equivalent headcount, annualised from the window and divided by productive hours per year.
containmentseriespercentResolved rate plotted over time, for whether the AI is holding more conversations unaided as prompts and menus change.
volumeseriescountTotal contacts plotted over time across every channel — the shape of demand rather than its outcome.
bookings-by-channelbreakdowncountBookings split across voice, chat, and email with a total, plus an out-of-hours callout. Answers which channel actually produces bookings.
heatmapheatmapcountWhen contacts arrive, as a day-of-week by hour grid — the view that shows which hours need cover. Switch metric to handovers to see when the AI most often needs a human.

A scalar returns one number with its prior-window counterpart and the percentage change. A series returns a dense bucketed series plus an aligned comparison series. A breakdown returns the voice / chat / email split with a total. The heatmap returns 168 day-of-week × hour cells plus the peak cell.

Parameters that do not apply to the requested report are ignored: granularity affects series reports only, metric affects heatmap only, and the five ROI inputs affect hours-saved, labour-cost and fte only.

Parameters

NameInRequiredTypeDescription
reportpathYesstring: voice-calls | chats-handled | emails-handled | bookings-total | out-of-hours-bookings | orders-made | orders-value | covers-total | out-of-hours-covers | repeat-callers | complaint-calls | resolved-rate | avg-call-length | avg-call-minutes-weekly | hours-saved | labour-cost | fte | containment | volume | bookings-by-channel | heatmapThe report to read. An unrecognised name returns 404.
periodqueryNostring: 7d | 30d | 90d | 12mA relative window ending today, inclusive. Mutually exclusive with date_from/date_to — sending both returns 422. 12m is 365 days.
date_fromqueryNostring, dateStart of an explicit window, inclusive. Requires date_to.
date_toqueryNostring, dateEnd of an explicit window, inclusive. Requires date_from, must not precede it, and the span must not exceed 366 days.
channels[]queryNoarray of string: phone | widget | whatsapp | facebook | instagram | emailNarrow to specific channels, repeating the parameter per channel (channels[]=phone&channels[]=widget). Omit for all channels. Reports that are channel-specific by definition (chats-handled, emails-handled) apply their own channel set first, so this parameter can only narrow further within it.
locations[]queryNoarray of integerNarrow to specific location IDs, as returned by GET /locations. IDs outside your brand return 422. Omit for all locations.
comparequeryNobooleanWhether to compute the prior-window comparison. When disabled, previous and delta_pct are null and comparison_series is empty.
granularityqueryNostring: day | weekBucket size for series reports. Defaults to day for windows of 31 days or fewer, otherwise week (ISO weeks, Monday-anchored).
metricqueryNostring: contacts | handoversWhich measure the heatmap report grids. Defaults to contacts.
hourly_ratequeryNonumberROI input: fully-loaded staff cost per hour, in the brand's currency. Defaults to the platform assumption.
minutes_per_callqueryNonumberROI input: staff minutes an AI-resolved phone call would otherwise have taken.
minutes_per_chatqueryNonumberROI input: staff minutes an AI-resolved chat would otherwise have taken.
minutes_per_emailqueryNonumberROI input: staff minutes an AI-resolved email would otherwise have taken.
productive_hours_per_yearqueryNonumberROI input: productive staff hours per year, used to express annualised hours saved as full-time-equivalent headcount.

Responses

  • 200 The report payload and the window it was computed over.
  • 401 Missing or invalid token, or a token that is not brand-scoped.
  • 404 Unknown report name.
  • 422 Invalid filter parameters.
curl -X GET "https://app.heyguest.ai/api/v1/reports/{report}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Still need a hand? Our support team is always happy to help: email help@heyguest.ai or get in touch.

Book a Demo Try the Demo