Skip to main content
POST
/
calendar
/
schedule
/
{event_id}
Schedule Bot for Event
curl --request POST \
  --url https://api.meestream.ai/api/v1/calendar/schedule/{event_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deduplication_key": "<string>",
  "bot_config": {
    "bot_name": "<string>",
    "bot_message": "<string>",
    "audio_required": true,
    "video_required": true,
    "meeting_url": "<string>",
    "join_at": "2023-11-07T05:31:56Z",
    "transcription": {},
    "callback_url": "<string>",
    "automatic_leave": {},
    "recording_config": {}
  },
  "occurrence_date": "2023-11-07T05:31:56Z",
  "schedule_all_occurrences": true,
  "occurrence_limit": 123
}
'
{
  "scheduled": true,
  "schedule_id": "<string>",
  "schedule_group": "<string>",
  "event_id": "<string>",
  "scheduled_time": "2023-11-07T05:31:56Z",
  "bot_id": "<string>",
  "bot_config": {},
  "message": "<string>",
  "updated_existing": true,
  "master_event_id": "<string>",
  "occurrences_scheduled": 123,
  "occurrences_failed": 123,
  "total_occurrences": 123,
  "schedules_created": "<array>",
  "failed_occurrences": "<array>"
}

Overview

Schedules a bot to join a calendar event. Creates an EventBridge schedule that triggers 3 minutes before the meeting start time. Supports deduplication, bot sharing, and recurring event scheduling.

Request

Endpoint: POST /calendar/schedule/{event_id} Headers:
Authorization: Token <api_key>
Path Parameters:
ParameterTypeRequiredDescription
event_idstringYesThe EventID of the calendar event
Request Body:
{
  "deduplication_key": "unique_key",
  "bot_config": {
    "bot_name": "MeetStream Bot",
    "bot_message": "Bot joining your meeting",
    "audio_required": true,
    "video_required": false,
    "meeting_url": "optional_override_url",
    "join_at": "optional_override_time_iso8601",
    "transcription": {},
    "callback_url": "https://your-webhook.com",
    "automatic_leave": {},
    "recording_config": {}
  },
  "occurrence_date": "2024-12-20T10:00:00Z",
  "schedule_all_occurrences": false,
  "occurrence_limit": 52
}

Request Body Parameters

ParameterTypeRequiredDescription
deduplication_keystringYesUnique key for deduplication and bot sharing
bot_configobjectYesBot configuration
bot_config.bot_namestringNoDisplay name for the bot
bot_config.bot_messagestringNoMessage to display when bot joins
bot_config.audio_requiredbooleanNoWhether audio is required (default: true)
bot_config.video_requiredbooleanNoWhether video is required (default: false)
bot_config.meeting_urlstringNoOverride meeting URL (uses event URL if not provided)
bot_config.join_atISO 8601NoOverride join time (defaults to 3 minutes before event)
bot_config.transcriptionobjectNoTranscription configuration
bot_config.callback_urlstringNoWebhook URL for bot status updates
bot_config.automatic_leaveobjectNoAutomatic leave configuration
bot_config.recording_configobjectNoRecording configuration
occurrence_dateISO 8601NoFor recurring events: specific occurrence date to schedule
schedule_all_occurrencesbooleanNoFor recurring events: schedule all future occurrences
occurrence_limitintegerNoMaximum number of occurrences to schedule (default: 52)

Response

Success Response - Single Event (200)

{
  "scheduled": true,
  "schedule_id": "bot-abc12345-xyz789012",
  "schedule_group": "google_meet",
  "event_id": "evt_abc123",
  "scheduled_time": "2024-12-20T09:57:00+00:00",
  "bot_id": "uuid",
  "bot_config": {
    "bot_name": "MeetStream Bot",
    "audio_required": true,
    "video_required": false
  },
  "message": "Bot scheduled successfully. Updated existing schedule with deduplication key.",
  "updated_existing": true
}

Success Response - Recurring Series (200)

{
  "scheduled": true,
  "master_event_id": "master_event_id",
  "occurrences_scheduled": 10,
  "occurrences_failed": 0,
  "total_occurrences": 10,
  "schedules_created": [
    {
      "schedule_id": "bot-abc12345-xyz789012",
      "event_id": "evt_occurrence_1",
      "scheduled_time": "2024-12-20T09:57:00+00:00",
      "bot_id": "uuid"
    }
  ],
  "failed_occurrences": [],
  "bot_config": {
    "bot_name": "MeetStream Bot",
    "audio_required": true
  }
}

Response Fields

FieldTypeDescription
scheduledbooleanWhether scheduling was successful
schedule_idstringEventBridge schedule ID
schedule_groupstringSchedule group (zoom, google_meet, microsoft_teams, default)
event_idstringEvent ID that was scheduled
scheduled_timeISO 8601When the bot will join (3 minutes before event start)
bot_idstringBot ID created for this schedule
bot_configobjectApplied bot configuration
messagestringSuccess message
updated_existingbooleanWhether an existing schedule was updated
master_event_idstring(Recurring) Master event ID
occurrences_scheduledinteger(Recurring) Number of occurrences scheduled
occurrences_failedinteger(Recurring) Number of occurrences that failed
total_occurrencesinteger(Recurring) Total occurrences found
schedules_createdarray(Recurring) List of created schedules
failed_occurrencesarray(Recurring) List of failed occurrences

Error Responses

400 Bad Request

  • Missing deduplication_key
  • Event has no meeting link
  • Event time has already passed
  • Invalid occurrence_date format
  • Invalid occurrence_limit

401 Unauthorized

Missing user_id in token or invalid authentication.

404 Not Found

  • Event not found
  • User not found

500 Internal Server Error

An error occurred while scheduling the bot.

Features

Deduplication

Using the same deduplication_key on the same event will update the existing bot configuration instead of creating a new schedule.

Bot Sharing

Using the same deduplication_key across different events will reuse the bot schedule, allowing you to share bot configurations across multiple events.

Recurring Events

For recurring events, you have two options:
  1. Single Occurrence: Use occurrence_date to schedule a specific occurrence
  2. All Occurrences: Set schedule_all_occurrences: true to schedule all future occurrences (up to occurrence_limit)
You cannot schedule the master event directly. You must schedule specific occurrences using occurrence_date or use schedule_all_occurrences for bulk scheduling.

Schedule Groups

Schedule groups are automatically determined by the meeting platform:
  • zoom - For Zoom meetings
  • google_meet - For Google Meet meetings
  • microsoft_teams - For Microsoft Teams meetings
  • default - For other platforms

Join Time

By default, bots are scheduled to join 3 minutes before the meeting start time. You can override this using bot_config.join_at.

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'.

Path Parameters

event_id
string
required

The EventID of the calendar event.

Body

application/json
deduplication_key
string
required

Unique key for deduplication and bot sharing

bot_config
object
required

Bot configuration

occurrence_date
string<date-time>

For recurring events: specific occurrence date to schedule

schedule_all_occurrences
boolean

For recurring events: schedule all future occurrences

occurrence_limit
integer

Maximum number of occurrences to schedule (default: 52)

Response

Bot scheduled successfully.

scheduled
boolean
required

Whether scheduling was successful

schedule_id
string

EventBridge schedule ID

schedule_group
string

Schedule group (zoom, google_meet, microsoft_teams, default)

event_id
string

Event ID that was scheduled

scheduled_time
string<date-time>

When the bot will join (3 minutes before event start)

bot_id
string

Bot ID created for this schedule

bot_config
object

Applied bot configuration

message
string

Success message

updated_existing
boolean

Whether an existing schedule was updated

master_event_id
string

Master event ID (for recurring events)

occurrences_scheduled
integer

Number of occurrences scheduled (for recurring events)

occurrences_failed
integer

Number of occurrences that failed (for recurring events)

total_occurrences
integer

Total occurrences found (for recurring events)

schedules_created
array

List of created schedules (for recurring events)

failed_occurrences
array

List of failed occurrences (for recurring events)