Skip to main content
POST
Generate inbound agent script
After HMS create (and hospital/doctor sync), call this before activate. Recommended flow:
  1. POST /inbound-agents (optional copyVoiceFromAgentId)
  2. POST .../sync-doctors (hospital/doctor)
  3. POST .../generate-script
  4. Poll GET .../inbound-agents/{id} until inboundScriptStatus is ready
  5. POST .../activate
HMS agents must already have enableAppointments, hcBookingPath: custom_api, and Custom API connected (set automatically when you create with scope + URL).

Authorizations

Authorization
string
header
required

Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer — the playground adds it.

Path Parameters

id
string
required

Response

Script generation queued or skipped

ok
boolean
queued
boolean
skipped
boolean
inboundScriptStatus
string
message
string