Skip to main content

Endpoint

POST /api/v1/bots/{object_id}/leave

Authentication

Requires API key authentication via the Authorization header.
Authorization
string
required
Your API key in the format: Token YOUR_API_KEY_HERE
Content-Type
string
required
Must be application/json

Path Parameters

object_id
string
required
The unique identifier for the bot.Example: bot_xxxxxxxxxxx

Description

Causes the bot to leave the meeting. The bot will transition to the leaving state and then to post_processing before finally reaching the ended state.
After the bot leaves the meeting, you can access the recording and transcript. The bot will continue processing the data in the background.

Response

Returns the bot object with updated state.
id
string
Unique identifier for the bot.
meeting_url
string
The URL of the meeting.
state
string
Current state of the bot (typically leaving after this request).
events
array
Array of events that have occurred for this bot. Will include a leave_requested event.
type
string
Event type (e.g., leave_requested)
sub_type
string | null
Event sub-type with additional context.
created_at
string
ISO 8601 timestamp when the event occurred.
transcription_state
string
Current transcription state.
recording_state
string
Current recording state.
join_at
string
ISO 8601 timestamp when the bot joined the meeting.
deduplication_key
string
Deduplication key for the bot.
metadata
object
Custom metadata associated with the bot.

Example Request

curl -X POST 'https://api.attendee.dev/api/v1/bots/bot_weIAju4OXNZkDTpZ/leave' \
  -H 'Authorization: Token YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json'

Example Response

{
  "id": "bot_weIAju4OXNZkDTpZ",
  "meeting_url": "https://zoom.us/j/123?pwd=456",
  "state": "leaving",
  "events": [
    {
      "type": "join_requested",
      "sub_type": null,
      "created_at": "2024-01-18T12:34:56Z"
    },
    {
      "type": "joined_meeting",
      "sub_type": null,
      "created_at": "2024-01-18T12:35:00Z"
    },
    {
      "type": "leave_requested",
      "sub_type": "user_requested",
      "created_at": "2024-01-18T13:34:56Z"
    }
  ],
  "transcription_state": "in_progress",
  "recording_state": "in_progress",
  "join_at": "2024-01-18T12:34:56Z",
  "deduplication_key": null,
  "metadata": {
    "customer_id": "abc123"
  }
}

Error Codes

  • 200 - Successfully requested to leave meeting
  • 400 - Bot is not in a valid state to leave the meeting (e.g., bot is already leaving or has already left)
  • 401 - Invalid or missing API key
  • 404 - Bot not found

Build docs developers (and LLMs) love