cURL
curl -sS -X POST "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors" \
-H "Authorization: Bearer $ONDIAL_API_KEY"const res = await fetch("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"POST",
"https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONDIAL_API_KEY"),
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . " " . $response;import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System;
using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode + " " + await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("ONDIAL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}{
"ok": true,
"count": 123,
"doctors": [
{
"doctorId": "<string>",
"name": "<string>",
"specialization": "<string>"
}
],
"doctorsLastSyncedAt": "2023-11-07T05:31:56Z",
"agent": {
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"category": "<string>",
"status": "active",
"inboundScriptStatus": "none",
"greetingMessage": "<string>",
"primaryLanguage": "<string>",
"selectedVoice": {
"name": "Priya",
"displayName": "Ishita",
"gender": "Female",
"language": {
"code": "hi-IN",
"name": "Hindi"
},
"tier": "standard",
"accent": "Standard",
"playbackSpeed": 1,
"audioFile": "<string>"
},
"companyId": "<string>",
"selectedKnowledgebases": [
{
"fileId": "<string>",
"fileName": "<string>",
"title": "<string>",
"knowledgebaseId": "<string>",
"wordCount": 123
}
],
"appointmentScope": "global",
"branchId": "<string>",
"doctorId": "<string>",
"slotsEnabled": true,
"bookingEnabled": true,
"doctorsSyncEnabled": true,
"validateHookEnabled": true,
"doctorsLastSyncedAt": "2023-11-07T05:31:56Z",
"customApiBaseUrl": "<string>"
}
}{
"error": "Invalid or inactive API key",
"reasonCode": "unauthorized"
}{
"error": "Not found",
"reasonCode": "not_found"
}{
"leadId": 177,
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}Sync inbound doctors
Pull doctor_list from the HMS webhook onto a hospital or doctor-scoped agent.
POST
https://dashboard.ondial.ai
/
api
/
v1
/
inbound-agents
/
{id}
/
sync-doctors
cURL
curl -sS -X POST "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors" \
-H "Authorization: Bearer $ONDIAL_API_KEY"const res = await fetch("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"POST",
"https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONDIAL_API_KEY"),
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . " " . $response;import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System;
using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode + " " + await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/sync-doctors", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("ONDIAL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}{
"ok": true,
"count": 123,
"doctors": [
{
"doctorId": "<string>",
"name": "<string>",
"specialization": "<string>"
}
],
"doctorsLastSyncedAt": "2023-11-07T05:31:56Z",
"agent": {
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"category": "<string>",
"status": "active",
"inboundScriptStatus": "none",
"greetingMessage": "<string>",
"primaryLanguage": "<string>",
"selectedVoice": {
"name": "Priya",
"displayName": "Ishita",
"gender": "Female",
"language": {
"code": "hi-IN",
"name": "Hindi"
},
"tier": "standard",
"accent": "Standard",
"playbackSpeed": 1,
"audioFile": "<string>"
},
"companyId": "<string>",
"selectedKnowledgebases": [
{
"fileId": "<string>",
"fileName": "<string>",
"title": "<string>",
"knowledgebaseId": "<string>",
"wordCount": 123
}
],
"appointmentScope": "global",
"branchId": "<string>",
"doctorId": "<string>",
"slotsEnabled": true,
"bookingEnabled": true,
"doctorsSyncEnabled": true,
"validateHookEnabled": true,
"doctorsLastSyncedAt": "2023-11-07T05:31:56Z",
"customApiBaseUrl": "<string>"
}
}{
"error": "Invalid or inactive API key",
"reasonCode": "unauthorized"
}{
"error": "Not found",
"reasonCode": "not_found"
}{
"leadId": 177,
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}Hospital and doctor scopes only. Global agents load catalogs live during the call - this endpoint returns
422 sync_not_allowed.
See Healthcare HMS integration.Authorizations
Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer - the playground adds it.
Path Parameters
Response
Doctors cached
Hide child attributes
Hide child attributes
Available options:
active, inactive Available options:
none, generating, ready, error BCP-47 code aligned with selectedVoice.language.code
Hide child attributes
Hide child attributes
Catalog voice id (case-insensitive match).
Example:
"Priya"
Example:
"Ishita"
Example:
"Female"
Normalized tier (catalog basic maps to standard).
Available options:
standard, premium, elite Example:
"Standard"
Required range:
0.5 <= x <= 2Example:
1
Linked company profile id from GET /api/v1/companies
Linked KB docs (metadata only). Assign with fileId list from GET /api/v1/knowledge-bases/documents.
Available options:
global, hospital, doctor 
