{"skill":{"slug":"calendly-api","displayName":"Calendly","summary":"Calendly API integration with managed OAuth. Access event types, scheduled events, invitees, availability, and manage webhooks. Use this skill when users wan...","description":"---\nname: calendly\ndescription: |\n  Calendly API integration with managed OAuth. Access event types, scheduled events, invitees, availability, and manage webhooks. Use this skill when users want to view scheduling data, check availability, book meetings, or integrate with Calendly workflows. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).\ncompatibility: Requires network access and valid Maton API key\nmetadata:\n  author: maton\n  version: \"1.0\"\n  clawdbot:\n    emoji: 🧠\n    requires:\n      env:\n        - MATON_API_KEY\n---\n\n# Calendly\n\nAccess the Calendly API with managed OAuth authentication. Retrieve event types, scheduled events, invitees, availability data, and manage webhook subscriptions for scheduling automation.\n\n## Quick Start\n\n```bash\n# Get current user\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/users/me')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps://api.maton.ai/calendly/{native-api-path}\n```\n\nMaton proxies requests to `api.calendly.com` and automatically injects your OAuth token.\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https://maton.ai)\n2. Go to [maton.ai/settings](https://maton.ai/settings)\n3. Copy your API key\n\n## Connection Management\n\nManage your Calendly OAuth connections at `https://api.maton.ai`.\n\n### List Connections\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/connections?app=calendly&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'calendly'}).encode()\nreq = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"{connection_id}\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"calendly\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple Calendly connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/users/me')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '{connection_id}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf you have multiple connections, always include this header to ensure requests go to the intended account.\n\n## Security & Permissions\n\n- Access is scoped to event types, scheduled events, invitees, availability, and manage webhooks within the connected Calendly account.\n- **All write operations require explicit user approval.** Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.\n\n## API Reference\n\n### Users\n\n#### Get Current User\n\n```bash\nGET /calendly/users/me\n```\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/users/me')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"resource\": {\n    \"uri\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n    \"name\": \"Alice Johnson\",\n    \"slug\": \"alice-johnson\",\n    \"email\": \"alice.johnson@acme.com\",\n    \"scheduling_url\": \"https://calendly.com/alice-johnson\",\n    \"timezone\": \"America/New_York\",\n    \"avatar_url\": \"https://example.com/avatar.png\",\n    \"created_at\": \"2024-01-15T10:30:00.000000Z\",\n    \"updated_at\": \"2025-06-20T14:45:00.000000Z\",\n    \"current_organization\": \"https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB\"\n  }\n}\n```\n\n#### Get a User\n\n```bash\nGET /calendly/users/{uuid}\n```\n\n### Event Types\n\n#### List Event Types\n\n```bash\nGET /calendly/event_types\n```\n\nQuery parameters:\n- `user` - User URI to filter event types\n- `organization` - Organization URI to filter event types\n- `active` - Filter by active status (true/false)\n- `count` - Number of results to return (default 20, max 100)\n- `page_token` - Token for pagination\n- `sort` - Sort order (e.g., `name:asc`, `created_at:desc`)\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/event_types?user=https://api.calendly.com/users/AAAAAAAAAAAAAAAA&active=true')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"collection\": [\n    {\n      \"uri\": \"https://api.calendly.com/event_types/CCCCCCCCCCCCCCCC\",\n      \"name\": \"30 Minute Meeting\",\n      \"active\": true,\n      \"slug\": \"30min\",\n      \"scheduling_url\": \"https://calendly.com/alice-johnson/30min\",\n      \"duration\": 30,\n      \"kind\": \"solo\",\n      \"type\": \"StandardEventType\",\n      \"color\": \"#0066FF\",\n      \"created_at\": \"2024-02-01T09:00:00.000000Z\",\n      \"updated_at\": \"2025-05-15T11:30:00.000000Z\",\n      \"description_plain\": \"A quick 30-minute catch-up call\",\n      \"description_html\": \"<p>A quick 30-minute catch-up call</p>\",\n      \"profile\": {\n        \"type\": \"User\",\n        \"name\": \"Alice Johnson\",\n        \"owner\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n      }\n    }\n  ],\n  \"pagination\": {\n    \"count\": 1,\n    \"next_page_token\": null\n  }\n}\n```\n\n#### Get an Event Type\n\n```bash\nGET /calendly/event_types/{uuid}\n```\n\n### Scheduled Events\n\n#### List Scheduled Events\n\n```bash\nGET /calendly/scheduled_events\n```\n\nQuery parameters:\n- `user` - User URI to filter events\n- `organization` - Organization URI to filter events\n- `invitee_email` - Filter by invitee email\n- `status` - Filter by status (`active`, `canceled`)\n- `min_start_time` - Filter events starting after this time (ISO 8601)\n- `max_start_time` - Filter events starting before this time (ISO 8601)\n- `count` - Number of results (default 20, max 100)\n- `page_token` - Token for pagination\n- `sort` - Sort order (e.g., `start_time:asc`)\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/scheduled_events?user=https://api.calendly.com/users/AAAAAAAAAAAAAAAA&status=active&min_start_time=2025-03-01T00:00:00Z')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"collection\": [\n    {\n      \"uri\": \"https://api.calendly.com/scheduled_events/DDDDDDDDDDDDDDDD\",\n      \"name\": \"30 Minute Meeting\",\n      \"status\": \"active\",\n      \"start_time\": \"2025-03-15T14:00:00.000000Z\",\n      \"end_time\": \"2025-03-15T14:30:00.000000Z\",\n      \"event_type\": \"https://api.calendly.com/event_types/CCCCCCCCCCCCCCCC\",\n      \"location\": {\n        \"type\": \"zoom\",\n        \"join_url\": \"https://zoom.us/j/123456789\"\n      },\n      \"invitees_counter\": {\n        \"total\": 1,\n        \"active\": 1,\n        \"limit\": 1\n      },\n      \"created_at\": \"2025-03-10T09:15:00.000000Z\",\n      \"updated_at\": \"2025-03-10T09:15:00.000000Z\",\n      \"event_memberships\": [\n        {\n          \"user\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n        }\n      ]\n    }\n  ],\n  \"pagination\": {\n    \"count\": 1,\n    \"next_page_token\": null\n  }\n}\n```\n\n#### Get a Scheduled Event\n\n```bash\nGET /calendly/scheduled_events/{uuid}\n```\n\n#### Cancel a Scheduled Event\n\n```bash\nPOST /calendly/scheduled_events/{uuid}/cancellation\nContent-Type: application/json\n\n{\n  \"reason\": \"Meeting rescheduled\"\n}\n```\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'reason': 'Meeting rescheduled'}).encode()\nreq = urllib.request.Request('https://api.maton.ai/calendly/scheduled_events/DDDDDDDDDDDDDDDD/cancellation', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Invitees\n\n#### List Event Invitees\n\n```bash\nGET /calendly/scheduled_events/{event_uuid}/invitees\n```\n\nQuery parameters:\n- `status` - Filter by status (`active`, `canceled`)\n- `email` - Filter by invitee email\n- `count` - Number of results (default 20, max 100)\n- `page_token` - Token for pagination\n- `sort` - Sort order (e.g., `created_at:asc`)\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/scheduled_events/DDDDDDDDDDDDDDDD/invitees')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"collection\": [\n    {\n      \"uri\": \"https://api.calendly.com/scheduled_events/DDDDDDDDDDDDDDDD/invitees/EEEEEEEEEEEEEEEE\",\n      \"email\": \"bob.smith@example.com\",\n      \"name\": \"Bob Smith\",\n      \"status\": \"active\",\n      \"timezone\": \"America/Los_Angeles\",\n      \"event\": \"https://api.calendly.com/scheduled_events/DDDDDDDDDDDDDDDD\",\n      \"created_at\": \"2025-03-10T09:15:00.000000Z\",\n      \"updated_at\": \"2025-03-10T09:15:00.000000Z\",\n      \"questions_and_answers\": [\n        {\n          \"question\": \"What would you like to discuss?\",\n          \"answer\": \"Project timeline review\",\n          \"position\": 0\n        }\n      ],\n      \"tracking\": {\n        \"utm_source\": null,\n        \"utm_medium\": null,\n        \"utm_campaign\": null\n      },\n      \"cancel_url\": \"https://calendly.com/cancellations/EEEEEEEEEEEEEEEE\",\n      \"reschedule_url\": \"https://calendly.com/reschedulings/EEEEEEEEEEEEEEEE\"\n    }\n  ],\n  \"pagination\": {\n    \"count\": 1,\n    \"next_page_token\": null\n  }\n}\n```\n\n#### Get an Invitee\n\n```bash\nGET /calendly/scheduled_events/{event_uuid}/invitees/{invitee_uuid}\n```\n\n#### Create Event Invitee (Scheduling API)\n\nSchedule a meeting programmatically by creating an invitee. Requires a paid Calendly plan.\n\n```bash\nPOST /calendly/event_types/{event_type_uuid}/invitees\nContent-Type: application/json\n\n{\n  \"start_time\": \"2025-03-20T15:00:00Z\",\n  \"email\": \"bob.smith@example.com\",\n  \"name\": \"Bob Smith\",\n  \"timezone\": \"America/Los_Angeles\",\n  \"location\": {\n    \"kind\": \"zoom\"\n  },\n  \"questions_and_answers\": [\n    {\n      \"question_uuid\": \"QQQQQQQQQQQQQQQ\",\n      \"answer\": \"Project timeline review\"\n    }\n  ]\n}\n```\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'start_time': '2025-03-20T15:00:00Z', 'email': 'bob.smith@example.com', 'name': 'Bob Smith'}).encode()\nreq = urllib.request.Request('https://api.maton.ai/calendly/event_types/CCCCCCCCCCCCCCCC/invitees', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Note:** The `start_time` must correspond to a valid available slot. Use the `/event_type_available_times` endpoint to find available times.\n\n### Availability\n\n#### Get Event Type Available Times\n\n```bash\nGET /calendly/event_type_available_times\n```\n\nQuery parameters:\n- `event_type` - Event type URI (required)\n- `start_time` - Start of time range (ISO 8601, required)\n- `end_time` - End of time range (ISO 8601, required, max 7 days from start)\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/event_type_available_times?event_type=https://api.calendly.com/event_types/CCCCCCCCCCCCCCCC&start_time=2025-03-15T00:00:00Z&end_time=2025-03-22T00:00:00Z')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"collection\": [\n    {\n      \"status\": \"available\",\n      \"invitees_remaining\": 1,\n      \"start_time\": \"2025-03-17T14:00:00.000000Z\",\n      \"scheduling_url\": \"https://calendly.com/alice-johnson/30min/2025-03-17T14:00:00Z\"\n    },\n    {\n      \"status\": \"available\",\n      \"invitees_remaining\": 1,\n      \"start_time\": \"2025-03-17T14:30:00.000000Z\",\n      \"scheduling_url\": \"https://calendly.com/alice-johnson/30min/2025-03-17T14:30:00Z\"\n    }\n  ]\n}\n```\n\n#### Get User Busy Times\n\n```bash\nGET /calendly/user_busy_times\n```\n\nQuery parameters:\n- `user` - User URI (required)\n- `start_time` - Start of time range (ISO 8601, required)\n- `end_time` - End of time range (ISO 8601, required, max 7 days from start)\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/user_busy_times?user=https://api.calendly.com/users/AAAAAAAAAAAAAAAA&start_time=2025-03-15T00:00:00Z&end_time=2025-03-22T00:00:00Z')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"collection\": [\n    {\n      \"type\": \"calendly\",\n      \"start_time\": \"2025-03-17T10:00:00.000000Z\",\n      \"end_time\": \"2025-03-17T11:00:00.000000Z\"\n    },\n    {\n      \"type\": \"external\",\n      \"start_time\": \"2025-03-18T14:00:00.000000Z\",\n      \"end_time\": \"2025-03-18T15:00:00.000000Z\"\n    }\n  ]\n}\n```\n\n#### Get User Availability Schedules\n\n```bash\nGET /calendly/user_availability_schedules\n```\n\nQuery parameters:\n- `user` - User URI (required)\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/user_availability_schedules?user=https://api.calendly.com/users/AAAAAAAAAAAAAAAA')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Organization\n\n#### List Organization Memberships\n\n```bash\nGET /calendly/organization_memberships\n```\n\nQuery parameters:\n- `organization` - Organization URI (required)\n- `user` - User URI to filter\n- `email` - Email to filter\n- `count` - Number of results (default 20, max 100)\n- `page_token` - Token for pagination\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/organization_memberships?organization=https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"collection\": [\n    {\n      \"uri\": \"https://api.calendly.com/organization_memberships/FFFFFFFFFFFFFFFF\",\n      \"role\": \"admin\",\n      \"user\": {\n        \"uri\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n        \"name\": \"Alice Johnson\",\n        \"email\": \"alice.johnson@acme.com\"\n      },\n      \"organization\": \"https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB\",\n      \"created_at\": \"2024-01-15T10:30:00.000000Z\",\n      \"updated_at\": \"2025-06-20T14:45:00.000000Z\"\n    }\n  ],\n  \"pagination\": {\n    \"count\": 1,\n    \"next_page_token\": null\n  }\n}\n```\n\n### Webhooks\n\nWebhooks require a paid Calendly plan (Standard, Teams, or Enterprise).\n\n#### List Webhook Subscriptions\n\n```bash\nGET /calendly/webhook_subscriptions\n```\n\nQuery parameters:\n- `organization` - Organization URI (required)\n- `scope` - Filter by scope (`user`, `organization`)\n- `user` - User URI to filter (when scope is `user`)\n- `count` - Number of results (default 20, max 100)\n- `page_token` - Token for pagination\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/webhook_subscriptions?organization=https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB&scope=organization')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n#### Create Webhook Subscription\n\n```bash\nPOST /calendly/webhook_subscriptions\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/webhook\",\n  \"events\": [\"invitee.created\", \"invitee.canceled\"],\n  \"organization\": \"https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB\",\n  \"scope\": \"organization\",\n  \"signing_key\": \"your-secret-key\"\n}\n```\n\nAvailable events:\n- `invitee.created` - Triggered when an invitee schedules an event\n- `invitee.canceled` - Triggered when an invitee cancels an event\n- `routing_form_submission.created` - Triggered when a routing form is submitted\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'url': 'https://example.com/webhook', 'events': ['invitee.created', 'invitee.canceled'], 'organization': 'https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB', 'scope': 'organization'}).encode()\nreq = urllib.request.Request('https://api.maton.ai/calendly/webhook_subscriptions', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"resource\": {\n    \"uri\": \"https://api.calendly.com/webhook_subscriptions/GGGGGGGGGGGGGGGG\",\n    \"callback_url\": \"https://example.com/webhook\",\n    \"created_at\": \"2025-03-01T12:00:00.000000Z\",\n    \"updated_at\": \"2025-03-01T12:00:00.000000Z\",\n    \"retry_started_at\": null,\n    \"state\": \"active\",\n    \"events\": [\"invitee.created\", \"invitee.canceled\"],\n    \"scope\": \"organization\",\n    \"organization\": \"https://api.calendly.com/organizations/BBBBBBBBBBBBBBBB\",\n    \"user\": null,\n    \"creator\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n  }\n}\n```\n\n#### Get a Webhook Subscription\n\n```bash\nGET /calendly/webhook_subscriptions/{uuid}\n```\n\n#### Delete a Webhook Subscription\n\n```bash\nDELETE /calendly/webhook_subscriptions/{uuid}\n```\n\n**Example:**\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/webhook_subscriptions/GGGGGGGGGGGGGGGG', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nReturns `204 No Content` on success.\n\n## Pagination\n\nUse `page_token` for pagination. Response includes `pagination.next_page_token` when more results exist:\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/calendly/scheduled_events?user=USER_URI&page_token=NEXT_PAGE_TOKEN')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Code Examples\n\n### JavaScript\n\n```javascript\nconst response = await fetch(\n  'https://api.maton.ai/calendly/scheduled_events?user=https://api.calendly.com/users/AAAAAAAAAAAAAAAA&status=active',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\nresponse = requests.get(\n    'https://api.maton.ai/calendly/scheduled_events',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={\n        'user': 'https://api.calendly.com/users/AAAAAAAAAAAAAAAA',\n        'status': 'active'\n    }\n)\ndata = response.json()\n```\n\n## Notes\n\n- Resource identifiers are URIs (e.g., `https://api.calendly.com/users/AAAAAAAAAAAAAAAA`)\n- Timestamps are in ISO 8601 format\n- The Scheduling API (Create Event Invitee) requires a paid Calendly plan\n- Webhooks are not available on Calendly's free plan\n- Availability endpoints have a 7-day maximum range per request and `start_time` must be in the future\n- The API does not support creating or managing event types programmatically\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments. You may get \"Invalid API key\" errors when piping.\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Bad request or missing Calendly connection |\n| 401 | Invalid or missing Maton API key |\n| 403 | Forbidden - insufficient permissions or plan restrictions |\n| 404 | Resource not found |\n| 424 | External calendar error (calendar integration issue on Calendly side) |\n| 429 | Rate limited |\n| 4xx/5xx | Passthrough error from Calendly API |\n\n### Troubleshooting: API Key Issues\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://api.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Troubleshooting: Invalid App Name\n\n1. Ensure your URL path starts with `calendly`. For example:\n\n- Correct: `https://api.maton.ai/calendly/users/me`\n- Incorrect: `https://api.maton.ai/users/me`\n\n## Resources\n\n- [Calendly Developer Portal](https://developer.calendly.com/)\n- [API Reference](https://developer.calendly.com/api-docs)\n- [API Use Cases](https://developer.calendly.com/api-use-cases)\n- [Maton Community](https://discord.com/invite/dBfFAcefs2)\n- [Maton Support](mailto:support@maton.ai)\n","topics":["Api Integration"],"tags":{"latest":"1.0.4"},"stats":{"comments":5,"downloads":17871,"installsAllTime":674,"installsCurrent":12,"stars":14,"versions":5},"createdAt":1770117246515,"updatedAt":1781739759130},"latestVersion":{"version":"1.0.4","createdAt":1777593246105,"changelog":"- Updated API base URLs from gateway.maton.ai and ctrl.maton.ai to api.maton.ai throughout documentation and examples.\n- Expanded security and permissions section; clarified the requirement for explicit user approval for all write operations.\n- Adjusted connection management instructions, consolidating endpoints under api.maton.ai.\n- Minor clarifications on using the Maton-Connection header when working with multiple accounts.\n- Removed the LICENSE.txt file.","license":"MIT-0"},"metadata":{"setup":[{"key":"MATON_API_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"byungkyu","userId":"s174c3s2kc1ehqj1ytzntezj2983e2aj","displayName":"byungkyu","image":"https://avatars.githubusercontent.com/u/16563684?v=4"},"moderation":null}