Removing a Bot
Learn how to remove a bot from an ongoing meeting using the API
Removing a Bot
Overview
When you need to end a bot's participation in a meeting, you can use the API to remove it immediately. This is useful for:
- Ending recordings early
- Freeing up bot resources
- Responding to meeting conclusion
API Request
Send a DELETE request to https://api.meetingbaas.com/bots/{YOUR_BOT_ID}:
curl -X DELETE "https://api.meetingbaas.com/bots/YOUR_BOT_ID" \
-H "Content-Type: application/json" \
-H "x-meeting-baas-api-key: YOUR-API-KEY"import requests
bot_id = "YOUR_BOT_ID"
url = f"https://api.meetingbaas.com/bots/{bot_id}"
headers = {
"Content-Type": "application/json",
"x-meeting-baas-api-key": "YOUR-API-KEY",
}
response = requests.delete(url, headers=headers)
if response.status_code == 200:
print("Bot successfully removed from the meeting.")
else:
print("Failed to remove the bot:", response.json())const botId = "YOUR_BOT_ID";
fetch(`https://api.meetingbaas.com/bots/${botId}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"x-meeting-baas-api-key": "YOUR-API-KEY",
},
})
.then((response) => {
if (response.ok) {
console.log("Bot successfully removed from the meeting.");
} else {
console.error("Failed to remove the bot:", response.statusText);
}
})
.catch((error) => console.error("Error:", error));Required Parameters
- Path Parameter:
bot_id- The unique identifier received when sending the bot - Header:
x-meeting-baas-api-key- Your API key for authentication
Both parameters are mandatory for the request to succeed.
Response
The API will respond with a simple confirmation:
HTTP/2 200
Content-Type: application/json
{ "ok": true }What Happens Next
When a bot is removed:
- The bot leaves the meeting immediately
- A
call_endedstatus event is sent to your webhook - The final meeting data up to that point is delivered
For more details about these webhook events, see Getting the Data.
