Leave meeting

Instruct a bot to leave the meeting immediately.

The bot will stop recording and processing, then exit the meeting. Works for bots in any active state: queued, joining_call, in_waiting_room, in_call_not_recording, in_call_recording, recording_paused, or recording_resumed. Also works for scheduled bots that haven't spawned yet — the scheduled bot will be cancelled atomically. The bot will send a final webhook event when it leaves.

Status Requirements: The bot must be in an active (non-terminal) state. Bots that have already completed or failed cannot be left via this endpoint. If the bot is in an invalid state, the request will fail with a 409 Conflict status.

Pre-Recording Stops: If the bot hasn't started recording yet (e.g., still queued or in the waiting room), it will exit with an EXITING_MEETING_BEFORE_RECORD error code. No tokens are consumed for pre-recording stops.

Token Consumption: When a bot that was recording is manually left, tokens are consumed based on the duration from when recording started to when the bot left. The bot will transition to completed status and send a completion webhook. Returns 404 if the bot is not found, or 409 if the bot's status does not allow this operation.

POST
/v2/bots/{bot_id}/leave

Authorization

ApiKeyAuth
x-meeting-baas-api-key<token>

Your Meeting BaaS API key. Get one from your account settings.

In: header

Path Parameters

bot_id*string

The UUID of the bot to leave the meeting.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.meetingbaas.com/v2/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/leave"
{
  "success": true,
  "data": {
    "message": "string"
  }
}
{
  "success": false,
  "error": "string",
  "code": "string",
  "statusCode": 9007199254740991,
  "message": "string"
}
{
  "success": false,
  "error": "string",
  "code": "string",
  "statusCode": 9007199254740991,
  "message": "string",
  "details": "string"
}
{
  "success": false,
  "error": "string",
  "code": "string",
  "statusCode": 9007199254740991,
  "message": "string",
  "details": "string"
}
{
  "success": false,
  "error": "string",
  "code": "string",
  "statusCode": 9007199254740991,
  "message": "string",
  "details": "string",
  "retryAfter": 9007199254740991
}
{
  "success": false,
  "error": "string",
  "code": "string",
  "statusCode": 9007199254740991,
  "message": "string",
  "details": "string"
}