Create inbound agent
Create an agent on a number you already own (starts inactive). Optionally link companyId and KB fileIds.
phoneNumber or phoneNumberId required. Healthcare HMS fields (appointmentScope, customApiBaseUrl, …) are optional. Then activate.
Company + knowledge base
Recommended HMS order:- List companies → pick
id - List knowledge documents → pick
fileIds - Create agent with
companyIdandselectedKnowledgebases: ["fileId", …]
companyId is omitted, Ondial auto-picks the tenant’s latest company. Unknown or other-tenant ids → 422 (company_not_found / knowledge_document_not_found).
Full HMS walkthrough: Healthcare HMS integration.Authorizations
Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer — the playground adds it.
Body
"healthcare_reception"
Optional. Must be owned by the API-key tenant (from GET /companies). If omitted, Ondial auto-picks the latest company.
Optional. Array of fileId strings (or { fileId }) from GET /knowledge-bases/documents. Ondial resolves titles/knowledgebaseId.
Healthcare HMS: one number = one scope.
global, hospital, doctor Required for hospital and doctor scopes. Use your HMS hospital/org ID.
Required for doctor scope. Use your HMS doctor ID.
"https://YOUR_HMS_HOST/ondial"
Optional shared secret; Ondial sends Authorization: Bearer …
Response
Created (typically inactive until activate)

