Skip to main content
POST
/
bots
/
create_bot
Create bot
curl --request POST \
  --url https://api.meestream.ai/v1/bots/create_bot \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "meeting_link": "<string>",
  "audio_required": true,
  "video_required": true,
  "bot_message": "<string>",
  "live_audio_required": {
    "websocket_url": "<string>"
  },
  "live_transcription_required": {
    "webhook_url": "<string>",
    "websocket_url": "<string>"
  },
  "transcription": {
    "deepgram": {
      "model": "<string>",
      "language": "<string>"
    }
  },
  "bot_image_url": "<string>",
  "socket_connection_url": "<string>",
  "custom_attributes": {
    "tag": "<string>",
    "sample": "<string>"
  },
  "join_at": "<string>",
  "callback_url": "<string>",
  "recording_config": {
    "transcript": {
      "provider": {
        "deepgram": {
          "language": "<string>",
          "model": "<string>"
        },
        "deepgram_streaming": {
          "model": "<string>",
          "language": "<string>"
        },
        "assemblyai": {
          "model": "<string>",
          "language": "<string>"
        },
        "assemblyai_streaming": {
          "model": "<string>",
          "language": "<string>"
        }
      }
    },
    "retention": {
      "type": "timed",
      "hours": 123
    },
    "realtime_endpoints": [
      {
        "type": "webhook",
        "url": "<string>",
        "events": [
          "participant_events.join",
          "participant_events.leave"
        ]
      }
    ]
  },
  "automatic_leave": {
    "waiting_room_timeout": 123,
    "everyone_left_timeout": 123,
    "in_call_recording_timeout": 123,
    "recording_permission_denied_timeout": 123
  }
}'
{
  "bot_id": "<string>"
}

Live Transcription and Audio Streaming

The bot creation API supports real-time transcription and audio streaming through webhooks and WebSocket connections.

Live Transcription Configuration

To enable live transcription, include the live_transcription_required field:
{
  "live_transcription_required": {
    "webhook_url": "https://your-domain.com/transcripts"
  }
}

Live Audio Streaming Configuration

To enable live audio streaming, include the live_audio_required field:
{
  "live_audio_required": {
    "websocket_url": "wss://your-domain.com/audio"
  }
}
For detailed information about live transcripts, see the Live Transcripts documentation.

Recording Configuration

The recording_config parameter allows you to configure transcription providers, data retention policies, and real-time event webhooks.

Transcription Provider Configuration

Configure your preferred transcription provider within the recording_config.transcript.provider field. You can choose from multiple providers:

Deepgram (Post-Processing)

{
  "recording_config": {
    "transcript": {
      "provider": {
        "deepgram": {
          "language": "en",
          "model": "nova-3"
        }
      }
    }
  }
}

Deepgram Streaming

{
  "recording_config": {
    "transcript": {
      "provider": {
        "deepgram_streaming": {
          "model": "nova-3",
          "language": "en"
        }
      }
    }
  }
}

AssemblyAI (Post-Processing)

{
  "recording_config": {
    "transcript": {
      "provider": {
        "assemblyai": {
          "model": "universal",
          "language": "en"
        }
      }
    }
  }
}

AssemblyAI Streaming

{
  "recording_config": {
    "transcript": {
      "provider": {
        "assemblyai_streaming": {
          "model": "universal",
          "language": "en"
        }
      }
    }
  }
}

Data Retention Policy

Configure how long the bot’s data should be retained using the retention field:
{
  "recording_config": {
    "retention": {
      "type": "timed",
      "hours": 24
    }
  }
}
Retention Options:
  • type: "timed" (data deleted after specified hours) or (Data will be deleted after 7days )
  • hours: Number of hours to retain data (only applicable when type is "timed")

Real-time Event Webhooks

Subscribe to real-time events during the meeting using the realtime_endpoints array:
{
  "recording_config": {
    "realtime_endpoints": [
      {
        "type": "webhook",
        "url": "https://your-domain.com/webhook",
        "events": [
          "participant_events.join",
          "participant_events.leave"
        ]
      }
    ]
  }
}
Available Events:
  • participant_events.join - Triggered when a participant joins the meeting
  • participant_events.leave - Triggered when a participant leaves the meeting

Complete Recording Config Example

{
  "recording_config": {
    "transcript": {
      "provider": {
        "deepgram": {
          "language": "en",
          "model": "nova-3"
        }
      }
    },
    "retention": {
      "type": "timed",
      "hours": 48
    },
    "realtime_endpoints": [
      {
        "type": "webhook",
        "url": "https://your-domain.com/webhook",
        "events": [
          "participant_events.join",
          "participant_events.leave"
        ]
      }
    ]
  }
}

Automatic Leave Configuration

The automatic_leave parameter configures conditions under which the bot will automatically exit the meeting. All timeout values are specified in seconds.
{
  "automatic_leave": {
    "waiting_room_timeout": 600,
    "everyone_left_timeout": 600,
    "in_call_recording_timeout": 14400,
    "recording_permission_denied_timeout": 60
  }
}

Timeout Parameters

ParameterDescriptionExample
waiting_room_timeoutSeconds to wait if bot is stuck in waiting room600 (10 minutes)
everyone_left_timeoutSeconds to wait after all participants have left600 (10 minutes)
in_call_recording_timeoutMaximum recording duration in seconds14400 (4 hours)
recording_permission_denied_timeoutSeconds to wait if recording permission is denied (Zoom only)60 (1 minute)

Use Cases

  • Waiting Room Protection: Prevent bot from waiting indefinitely if not admitted
  • Empty Meeting Cleanup: Automatically exit when meeting is empty
  • Recording Limits: Enforce maximum recording duration for cost control (Default 4Hrs)
  • Permission Handling: Handle scenarios where recording permission is denied

Callback Events

When a callback_url is provided in the request, the API will send POST requests to notify you about various bot status changes. Here are the events you can expect:

Bot Joining Event

{
  "bot_id": "5b0ff6e7-3cea-4c9f-a6b4-851c5f11cf4f",
  "bot_status": "joining",
  "message": "Bot is joining the meeting",
  "status_code": 102
}

Bot Successfully Joined Event

{
  "bot_id": "5b0ff6e7-3cea-4c9f-a6b4-851c5f11cf4f",
  "message": "Successfully joined the meeting",
  "bot_status": "InMeeting",
  "status_code": 200
}

Bot Stopped Event

{
  "bot_id": "5b0ff6e7-3cea-4c9f-a6b4-851c5f11cf4f",
  "message": "Bot exited and step function was triggered",
  "bot_status": "Stopped",
  "status_code": 500
}

Audio Processing Completed Event

{
  "bot_id": "5b0ff6e7-3cea-4c9f-a6b4-851c5f11cf4f",
  "audio_status": "Success",
  "message": "Audio processing completed successfully",
  "status_code": 200
}

Transcript Processing Completed Event

{
  "bot_id": "5b0ff6e7-3cea-4c9f-a6b4-851c5f11cf4f",
  "transcript_status": "Success",
  "message": "Transcript processing completed successfully",
  "status_code": 200
}

Data Deletion Event

{
  "bot_id": "5b0ff6e7-3cea-4c9f-a6b4-851c5f11cf4f",
  "event": "data_deletion",
  "status": "success",
  "message": "Bot data deleted successfully",
  "deleted_objects": 5,
  "timestamp": "2024-01-15T14:30:00Z",
  "status_code": 200
}
This event is triggered when data is manually deleted or automatically removed through retention policies. For complete callback event documentation, see Callback Events.

Callback Event Fields

FieldTypeDescription
bot_idstringThe unique identifier of the bot
bot_statusstringCurrent status of the bot (joining, InMeeting, Stopped)
messagestringHuman-readable status message
status_codeintegerHTTP-style status code indicating the event type
audio_statusstringStatus of audio processing (Success)
transcript_statusstringStatus of transcript processing (Success)
eventstringEvent type identifier (e.g., data_deletion)
statusstringOperation status (success, failed)
deleted_objectsintegerNumber of objects deleted (data_deletion event only)
timestampstringISO 8601 formatted timestamp of the event

Status Codes

  • 102: Bot is in the process of joining the meeting
  • 200: Successful operation (joined meeting, audio/transcript processing completed, data deletion succeeded)
  • 500: Bot has stopped/exited the meeting, or data deletion failed

Authorizations

Authorization
string
header
required

All API endpoints are authenticated using API Keys. The key should be included in the 'Authorization' header, prefixed with 'Token '. Example: 'Authorization: Token YOUR_API_KEY'.

Body

application/json

Meeting URL to join.

audio_required
boolean
required

Whether audio is required.

video_required
boolean
required

Whether video is required.

bot_message
string

Message for the bot to say on join.

live_audio_required
object

Live audio streaming config.

live_transcription_required
object

Live transcription config.

transcription
object
bot_image_url
string

URL to the bot's profile image. Should be in the format jpeg,png,jpg,gif.

socket_connection_url
string

URL to the bot's socket connection. Should be in the format wss://.

custom_attributes
object
join_at
string

The date and time the bot will join the meeting. YYYY-MM-DD HH:MM:SS Ex:2024-01-15T14:30:00Z

callback_url
string

Callback URL for bot events.

recording_config
object

Configuration for recording, transcription, and data retention.

automatic_leave
object

Configure automatic bot exit conditions with timeout values in seconds.

Response

Bot creation initiated successfully.

bot_id
string
required

Unique identifier for the created bot.