# Auto-join rules Configure rules to automatically join Meeting Buddy to calendar events that match specific criteria. List all auto-join rules for the authenticated user. Rules are evaluated in priority order (highest first) against upcoming calendar events. ## Returns Returns a list of auto-join rule objects with a `total` count. ### Auto-Join Rule Object | Field | Type | Description | | --- | --- | --- | | `id` | string | Unique rule ID (`majr_` prefix) | | `name` | string | Rule name | | `is_enabled` | boolean | Whether the rule is active | | `calendar_provider` | string or null | Limit to specific provider | | `match_mode` | string | Match mode: `all`, `keyword`, `organizer`, `custom` | | `keywords` | array or null | Keywords to match in event title/description | | `organizer_emails` | array or null | Organizer emails to match | | `exclude_patterns` | array or null | Patterns to exclude events | | `min_attendees` | integer | Minimum attendee count | | `max_attendees` | integer or null | Maximum attendee count | | `time_window_start` | string or null | Start of allowed time window (HH:MM) | | `time_window_end` | string or null | End of allowed time window (HH:MM) | | `days_of_week` | array or null | Allowed days (0=Monday, 6=Sunday) | | `timezone` | string | Timezone for time window evaluation | | `bot_name` | string or null | Custom bot name for matched sessions | | `priority` | integer | Rule priority (higher = evaluated first) | | `created_at` | string | Rule creation time (ISO 8601) | | `updated_at` | string | Last update time (ISO 8601) | Request ```bash cURL curl -s -X GET "https://api.aitronos.com/v1/meeting-buddy/auto-join/rules" \ -H "Authorization: Bearer $ACCESS_TOKEN" | python3 -m json.tool ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.meeting_buddy.auto_join.list_rules() for rule in result.items: print(f"{rule.name}: {rule.match_mode} (priority={rule.priority})") print(f"Total: {result.total}") ``` ```python Python import os import requests access_token = os.environ["ACCESS_TOKEN"] url = "https://api.aitronos.com/v1/meeting-buddy/auto-join/rules" headers = {"Authorization": f"Bearer {access_token}"} response = requests.get(url, headers=headers) data = response.json() for rule in data["items"]: print(f"{rule['name']}: {rule['match_mode']}") ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const response = await fetch( 'https://api.aitronos.com/v1/meeting-buddy/auto-join/rules', { headers: { 'Authorization': `Bearer ${accessToken}`, }, } ); const data = await response.json(); data.items.forEach(rule => { console.log(`${rule.name}: ${rule.match_mode}`); }); ``` Response ```json 200 OK { "items": [ { "id": "majr_abc123def456", "name": "Join all standups", "is_enabled": true, "calendar_provider": null, "match_mode": "keyword", "keywords": ["standup", "daily"], "organizer_emails": null, "exclude_patterns": ["1:1", "personal"], "min_attendees": 2, "max_attendees": null, "time_window_start": "09:00", "time_window_end": "17:00", "days_of_week": [0, 1, 2, 3, 4], "timezone": "US/Eastern", "bot_name": "Standup Bot", "priority": 10, "created_at": "2026-03-01T12:00:00Z", "updated_at": "2026-03-01T12:00:00Z" } ], "total": 1 } ``` ## Create an auto-join rule Create a new auto-join rule. The rule will be evaluated against upcoming calendar events to determine which meetings Meeting Buddy should automatically join. #### Request Body **`name`** string required Rule name (max 255 characters). **`match_mode`** string optional · Defaults to `all` How to match events. Valid values: `all` (match all events), `keyword` (match by title/description keywords), `organizer` (match by organizer email), `custom` (combine multiple conditions). **`keywords`** array optional Keywords to match in event title or description. Required when `match_mode` is `keyword` or `custom`. **`organizer_emails`** array optional Organizer emails to match. Required when `match_mode` is `organizer` or `custom`. **`exclude_patterns`** array optional Patterns to exclude events (case-insensitive match against title and description). **`calendar_provider`** string optional Limit rule to a specific calendar provider. **`min_attendees`** integer optional · Defaults to `0` Minimum number of attendees required. **`max_attendees`** integer optional Maximum number of attendees allowed. **`time_window_start`** string optional Start of allowed time window in HH:MM format (e.g., `09:00`). **`time_window_end`** string optional End of allowed time window in HH:MM format (e.g., `17:00`). **`days_of_week`** array optional Allowed days of the week (0=Monday through 6=Sunday). **`timezone`** string optional · Defaults to `UTC` Timezone for time window evaluation (e.g., `US/Eastern`, `Europe/London`). **`bot_name`** string optional Custom bot name for sessions created by this rule (max 100 characters). **`priority`** integer optional · Defaults to `0` Rule priority. Higher values are evaluated first. ## Returns Returns the created [Auto-Join Rule object](#auto-join-rule-object) with HTTP 201 status. Request ```bash cURL curl -s -X POST "https://api.aitronos.com/v1/meeting-buddy/auto-join/rules" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Join all standups", "match_mode": "keyword", "keywords": ["standup", "daily"], "exclude_patterns": ["1:1", "personal"], "min_attendees": 2, "time_window_start": "09:00", "time_window_end": "17:00", "days_of_week": [0, 1, 2, 3, 4], "timezone": "US/Eastern", "priority": 10 }' | python3 -m json.tool ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") rule = client.meeting_buddy.auto_join.create_rule( name="Join all standups", match_mode="keyword", keywords=["standup", "daily"], exclude_patterns=["1:1", "personal"], min_attendees=2, time_window_start="09:00", time_window_end="17:00", days_of_week=[0, 1, 2, 3, 4], timezone="US/Eastern", priority=10, ) print(f"Created rule: {rule.id}") ``` ```python Python import os import requests access_token = os.environ["ACCESS_TOKEN"] url = "https://api.aitronos.com/v1/meeting-buddy/auto-join/rules" headers = { "Authorization": f"Bearer {access_token}", "Content-Type": "application/json", } data = { "name": "Join all standups", "match_mode": "keyword", "keywords": ["standup", "daily"], "min_attendees": 2, "priority": 10, } response = requests.post(url, headers=headers, json=data) rule = response.json() print(f"Created rule: {rule['id']}") ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const response = await fetch( 'https://api.aitronos.com/v1/meeting-buddy/auto-join/rules', { method: 'POST', headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ name: 'Join all standups', match_mode: 'keyword', keywords: ['standup', 'daily'], min_attendees: 2, priority: 10, }), } ); const rule = await response.json(); console.log(`Created rule: ${rule.id}`); ``` Response ```json 201 Created { "id": "majr_abc123def456", "name": "Join all standups", "is_enabled": true, "calendar_provider": null, "match_mode": "keyword", "keywords": ["standup", "daily"], "organizer_emails": null, "exclude_patterns": ["1:1", "personal"], "min_attendees": 2, "max_attendees": null, "time_window_start": "09:00", "time_window_end": "17:00", "days_of_week": [0, 1, 2, 3, 4], "timezone": "US/Eastern", "bot_name": null, "priority": 10, "created_at": "2026-03-03T10:00:00Z", "updated_at": "2026-03-03T10:00:00Z" } ``` ```json 422 Validation Error { "success": false, "error": { "code": "VALIDATION_ERROR", "message": "The provided data is invalid.", "type": "client_error", "status": 422, "details": {}, "trace_id": "abc-123-def", "timestamp": "2026-03-03T10:00:00Z" } } ``` ## Update an auto-join rule Update an existing auto-join rule. Only provided fields are updated (partial update). #### Path Parameters **`rule_id`** string required The auto-join rule ID (`majr_` prefix). #### Request Body All fields from [Create an auto-join rule](#create-an-auto-join-rule) are accepted, plus: **`is_enabled`** boolean optional Enable or disable the rule. ## Returns Returns the updated [Auto-Join Rule object](#auto-join-rule-object). Request ```bash cURL curl -s -X PATCH "https://api.aitronos.com/v1/meeting-buddy/auto-join/rules/majr_abc123def456" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"priority": 20, "is_enabled": false}' | python3 -m json.tool ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") rule = client.meeting_buddy.auto_join.update_rule( rule_id="majr_abc123def456", priority=20, is_enabled=False, ) print(f"Updated: {rule.name} (enabled={rule.is_enabled})") ``` ```python Python import os import requests access_token = os.environ["ACCESS_TOKEN"] rule_id = "majr_abc123def456" url = f"https://api.aitronos.com/v1/meeting-buddy/auto-join/rules/{rule_id}" headers = { "Authorization": f"Bearer {access_token}", "Content-Type": "application/json", } response = requests.patch(url, headers=headers, json={"priority": 20, "is_enabled": False}) rule = response.json() print(f"Updated: {rule['name']}") ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const ruleId = 'majr_abc123def456'; const response = await fetch( `https://api.aitronos.com/v1/meeting-buddy/auto-join/rules/${ruleId}`, { method: 'PATCH', headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ priority: 20, is_enabled: false }), } ); const rule = await response.json(); console.log(`Updated: ${rule.name}`); ``` Response ```json 200 OK { "id": "majr_abc123def456", "name": "Join all standups", "is_enabled": false, "calendar_provider": null, "match_mode": "keyword", "keywords": ["standup", "daily"], "organizer_emails": null, "exclude_patterns": ["1:1", "personal"], "min_attendees": 2, "max_attendees": null, "time_window_start": "09:00", "time_window_end": "17:00", "days_of_week": [0, 1, 2, 3, 4], "timezone": "US/Eastern", "bot_name": null, "priority": 20, "created_at": "2026-03-03T10:00:00Z", "updated_at": "2026-03-03T10:05:00Z" } ``` ```json 404 Not Found { "success": false, "error": { "code": "AUTO_JOIN_RULE_NOT_FOUND", "message": "The requested auto-join rule could not be found.", "system_message": "Auto-join rule not found", "type": "client_error", "status": 404, "details": { "rule_id": "majr_nonexistent" }, "trace_id": "abc-123-def", "timestamp": "2026-03-03T10:00:00Z" } } ``` ## Delete an auto-join rule Delete an auto-join rule. Events already scheduled by this rule are not affected. #### Path Parameters **`rule_id`** string required The auto-join rule ID (`majr_` prefix). ## Returns Returns no content on success (204). Request ```bash cURL curl -s -X DELETE "https://api.aitronos.com/v1/meeting-buddy/auto-join/rules/majr_abc123def456" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") client.meeting_buddy.auto_join.delete_rule( rule_id="majr_abc123def456", ) print("Rule deleted") ``` ```python Python import os import requests access_token = os.environ["ACCESS_TOKEN"] rule_id = "majr_abc123def456" url = f"https://api.aitronos.com/v1/meeting-buddy/auto-join/rules/{rule_id}" headers = {"Authorization": f"Bearer {access_token}"} response = requests.delete(url, headers=headers) assert response.status_code == 204 ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const ruleId = 'majr_abc123def456'; const response = await fetch( `https://api.aitronos.com/v1/meeting-buddy/auto-join/rules/${ruleId}`, { method: 'DELETE', headers: { 'Authorization': `Bearer ${accessToken}`, }, } ); console.log(response.status); // 204 ``` Response ```text 204 No Content (empty response body) ``` ```json 404 Not Found { "success": false, "error": { "code": "AUTO_JOIN_RULE_NOT_FOUND", "message": "The requested auto-join rule could not be found.", "system_message": "Auto-join rule not found", "type": "client_error", "status": 404, "details": { "rule_id": "majr_nonexistent" }, "trace_id": "abc-123-def", "timestamp": "2026-03-03T10:00:00Z" } } ``` ## Related Resources - [Calendar Events](/docs/api-reference/meeting-buddy/calendar-events) - [Calendar Sync](/docs/api-reference/meeting-buddy/calendar-sync) - [Calendar Connections](/docs/api-reference/meeting-buddy/calendar-connections) - [Start Session](/docs/api-reference/meeting-buddy/start-session) - [List Sessions](/docs/api-reference/meeting-buddy/list-sessions)