Activate or deactivate inbound agent
curl --request POST \
--url https://dashboard.ondial.ai/api/v1/inbound-agents/{id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activate": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({activate: true})
};
fetch('https://dashboard.ondial.ai/api/v1/inbound-agents/{id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dashboard.ondial.ai/api/v1/inbound-agents/{id}/activate"
payload = { "activate": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent": {
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"category": "<string>",
"status": "active",
"inboundScriptStatus": "none",
"greetingMessage": "<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>"
},
"status": "active"
}{
"error": "Invalid or inactive API key",
"reasonCode": "unauthorized"
}{
"error": "Not found",
"reasonCode": "not_found"
}{
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}Activate inbound agent
Activate or deactivate on an owned number.
POST
/
api
/
v1
/
inbound-agents
/
{id}
/
activate
Activate or deactivate inbound agent
curl --request POST \
--url https://dashboard.ondial.ai/api/v1/inbound-agents/{id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activate": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({activate: true})
};
fetch('https://dashboard.ondial.ai/api/v1/inbound-agents/{id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dashboard.ondial.ai/api/v1/inbound-agents/{id}/activate"
payload = { "activate": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent": {
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"category": "<string>",
"status": "active",
"inboundScriptStatus": "none",
"greetingMessage": "<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>"
},
"status": "active"
}{
"error": "Invalid or inactive API key",
"reasonCode": "unauthorized"
}{
"error": "Not found",
"reasonCode": "not_found"
}{
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}| reasonCode | Meaning |
|---|---|
phone_not_owned | Number not owned by tenant |
script_not_ready | Script still generating or error |
Authorizations
Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer — the playground adds it.
Path Parameters
Body
application/json
Response
Status updated
Hide child attributes
Hide child attributes
Available options:
active, inactive Available options:
none, generating, ready, error 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 Available options:
active, inactive 
