-
-
>}
navbar={<>>}
+ nextThemes={{ forcedTheme: 'light', defaultTheme: 'light' }}
>
{children}
diff --git a/components/Sidebar/Sidebar.jsx b/components/Sidebar/Sidebar.jsx
index c5ee3c3..49017bb 100644
--- a/components/Sidebar/Sidebar.jsx
+++ b/components/Sidebar/Sidebar.jsx
@@ -145,6 +145,12 @@ const iconMap = {
'/platform/organizations/multi-tenancy': TreeStructure,
'/platform/organizations/settings': SlidersHorizontal,
+ // Platform > Automations
+ '/platform/automations': Lightning,
+ '/platform/automations/webhooks': Plug,
+ '/platform/automations/zapier': ArrowsClockwise,
+ '/platform/automations/events': ListChecks,
+
// Enterprise
'/enterprise/sso': IdentificationBadge,
'/enterprise/audit-logs': Scroll,
diff --git a/content/platform/_meta.json b/content/platform/_meta.json
index 8cf4ffe..46fcbb4 100644
--- a/content/platform/_meta.json
+++ b/content/platform/_meta.json
@@ -14,5 +14,6 @@
"payments": "Payments",
"ai": "AI",
"users": "Users & Access",
- "organizations": "Organizations"
+ "organizations": "Organizations",
+ "automations": "Automations"
}
diff --git a/content/platform/automations/_meta.json b/content/platform/automations/_meta.json
new file mode 100644
index 0000000..04315e1
--- /dev/null
+++ b/content/platform/automations/_meta.json
@@ -0,0 +1,6 @@
+{
+ "index": "Overview",
+ "webhooks": "Webhooks",
+ "zapier": "Zapier",
+ "events": "Event Catalogue"
+}
diff --git a/content/platform/automations/events.mdx b/content/platform/automations/events.mdx
new file mode 100644
index 0000000..09109ec
--- /dev/null
+++ b/content/platform/automations/events.mdx
@@ -0,0 +1,426 @@
+import { Callout } from 'nextra/components'
+
+# Event Catalogue
+
+Every event that can fire from LearnHouse, grouped by category. Each event delivers the same envelope (`event`, `delivery_id`, `timestamp`, `org_id`, `data`) — only the shape of `data` varies.
+
+
+The event registry is the single source of truth. At runtime, dispatched payloads are validated against these schemas and any drift is logged as a warning. You can also fetch the live registry from your LearnHouse instance:
+```http
+GET /api/v1/{org_id}/webhooks/events
+```
+
+
+## System
+
+### `ping`
+
+Test event sent to verify endpoint connectivity. Fired by the **Send test event** button and the `POST /webhooks/{uuid}/test` endpoint.
+
+```json
+{ "message": "string" }
+```
+
+## Learning progress
+
+### `course_completed`
+
+Triggered when a user completes every activity in a course.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "course": { "course_uuid": "string", "name": "string" }
+}
+```
+
+### `course_enrolled`
+
+Triggered when a user enrols in a course.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "course": { "course_uuid": "string", "name": "string" }
+}
+```
+
+### `activity_completed`
+
+Triggered when a user completes an activity.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "activity": { "activity_uuid": "string", "activity_type": "string" },
+ "course": { "course_uuid": "string", "name": "string" }
+}
+```
+
+### `assignment_submitted`
+
+Triggered when a user submits an assignment.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "assignment": { "assignment_uuid": "string" },
+ "course": { "course_uuid": "string", "name": "string" }
+}
+```
+
+### `assignment_graded`
+
+Triggered when an instructor grades an assignment submission.
+
+```json
+{
+ "user_id": "integer",
+ "assignment_uuid": "string",
+ "course_uuid": "string",
+ "grade": "integer"
+}
+```
+
+### `certificate_claimed`
+
+Triggered when a user receives a certificate.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "course": { "course_uuid": "string", "name": "string" },
+ "certificate": { "user_certification_uuid": "string" }
+}
+```
+
+## User & access
+
+### `user_signed_up`
+
+Triggered when a new user signs up for the organization.
+
+```json
+{
+ "user": {
+ "user_uuid": "string",
+ "email": "string",
+ "username": "string",
+ "first_name": "string",
+ "last_name": "string"
+ },
+ "signup_method": "string"
+}
+```
+
+### `user_email_verified`
+
+Triggered when a user verifies their email address.
+
+```json
+{ "user_uuid": "string", "email": "string" }
+```
+
+### `user_role_changed`
+
+Triggered when a user's role is changed in the organization.
+
+```json
+{ "user_id": "integer", "org_id": "integer", "new_role_uuid": "string" }
+```
+
+### `user_invited_to_org`
+
+Triggered when users are invited to the organization. A single event is fired per invite batch.
+
+```json
+{
+ "org_id": "integer",
+ "emails": "list[string]",
+ "invite_code_uuid": "string",
+ "invited_by": "string"
+}
+```
+
+### `user_removed_from_org`
+
+Triggered when a user is removed from the organization.
+
+```json
+{ "user_id": "integer", "org_id": "integer" }
+```
+
+## Course lifecycle
+
+### `course_created`
+
+Triggered when a new course is created.
+
+```json
+{ "course_uuid": "string", "name": "string", "org_id": "integer" }
+```
+
+### `course_published`
+
+Triggered when a course is published or unpublished.
+
+```json
+{ "course_uuid": "string", "name": "string", "published": "boolean" }
+```
+
+### `course_deleted`
+
+Triggered when a course is deleted.
+
+```json
+{ "course_uuid": "string", "name": "string" }
+```
+
+### `course_update_published`
+
+Triggered when an announcement is posted to a course.
+
+```json
+{ "courseupdate_uuid": "string", "course_uuid": "string" }
+```
+
+## Content management
+
+### `activity_version_created`
+
+Triggered when an activity version snapshot is created.
+
+```json
+{ "activity_id": "integer", "version_number": "integer", "created_by_id": "integer" }
+```
+
+### `activity_version_restored`
+
+Triggered when an activity is restored to a previous version.
+
+```json
+{
+ "activity_uuid": "string",
+ "restored_version_number": "integer",
+ "new_version_number": "integer"
+}
+```
+
+### `course_contributor_added`
+
+Triggered when contributors are added to a course.
+
+```json
+{ "course_uuid": "string", "contributors": "list[object]" }
+```
+
+### `course_contributor_removed`
+
+Triggered when contributors are removed from a course.
+
+```json
+{ "course_uuid": "string", "contributors": "list[object]" }
+```
+
+### `collection_created`
+
+Triggered when a new course collection is created.
+
+```json
+{ "collection_uuid": "string", "name": "string" }
+```
+
+### `podcast_episode_created`
+
+Triggered when a new podcast episode is added.
+
+```json
+{
+ "episode_uuid": "string",
+ "podcast_uuid": "string",
+ "title": "string",
+ "episode_number": "integer"
+}
+```
+
+## Collaboration
+
+### `board_created`
+
+Triggered when a new whiteboard is created.
+
+```json
+{ "board_uuid": "string", "name": "string", "created_by": "integer" }
+```
+
+### `board_member_added`
+
+Triggered when a member is added to a whiteboard.
+
+```json
+{ "board_uuid": "string", "user_id": "integer", "role": "string" }
+```
+
+### `playground_created`
+
+Triggered when a new playground is created.
+
+```json
+{ "playground_uuid": "string", "name": "string", "created_by": "integer" }
+```
+
+## Community
+
+### `discussion_posted`
+
+Triggered when a user creates a discussion.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "discussion": { "discussion_uuid": "string", "title": "string" },
+ "community": { "community_uuid": "string" }
+}
+```
+
+### `comment_created`
+
+Triggered when a user posts a comment on a discussion.
+
+```json
+{
+ "user": { "user_uuid": "string", "email": "string", "username": "string" },
+ "comment": { "comment_uuid": "string" },
+ "discussion": { "discussion_uuid": "string", "title": "string" },
+ "community": { "community_uuid": "string" }
+}
+```
+
+### `discussion_pinned`
+
+Triggered when a discussion is pinned or unpinned.
+
+```json
+{
+ "discussion_uuid": "string",
+ "title": "string",
+ "is_pinned": "boolean",
+ "community_uuid": "string"
+}
+```
+
+### `discussion_locked`
+
+Triggered when a discussion is locked or unlocked.
+
+```json
+{
+ "discussion_uuid": "string",
+ "title": "string",
+ "is_locked": "boolean",
+ "community_uuid": "string"
+}
+```
+
+### `discussion_vote_cast`
+
+Triggered when a user upvotes a discussion.
+
+```json
+{ "discussion_uuid": "string", "user_id": "integer", "upvote_count": "integer" }
+```
+
+## Groups
+
+### `usergroup_created`
+
+Triggered when a new user group is created.
+
+```json
+{ "usergroup_uuid": "string", "name": "string" }
+```
+
+### `usergroup_deleted`
+
+Triggered when a user group is deleted.
+
+```json
+{ "usergroup_uuid": "string", "name": "string" }
+```
+
+### `usergroup_users_added`
+
+Triggered when users are added to a user group.
+
+```json
+{
+ "usergroup_id": "integer",
+ "usergroup_uuid": "string",
+ "user_ids": "list[integer]"
+}
+```
+
+### `usergroup_resources_added`
+
+Triggered when resources are assigned to a user group.
+
+```json
+{
+ "usergroup_id": "integer",
+ "usergroup_uuid": "string",
+ "resource_uuids": "list[string]"
+}
+```
+
+## Subscriptions
+
+### `pack_activated`
+
+Triggered when a subscription pack is activated.
+
+```json
+{
+ "pack_id": "string",
+ "pack_type": "string",
+ "quantity": "integer",
+ "platform_subscription_id": "string"
+}
+```
+
+### `pack_deactivated`
+
+Triggered when a subscription pack is cancelled.
+
+```json
+{
+ "pack_id": "string",
+ "pack_type": "string",
+ "platform_subscription_id": "string"
+}
+```
+
+## Organization
+
+### `org_signup_method_changed`
+
+Triggered when the organization signup method is changed.
+
+```json
+{ "signup_mechanism": "string" }
+```
+
+### `org_ai_config_changed`
+
+Triggered when the organization AI configuration is updated.
+
+```json
+{ "ai_enabled": "boolean", "copilot_enabled": "boolean" }
+```
+
+### `org_payments_config_changed`
+
+Triggered when the organization payments configuration is updated.
+
+```json
+{ "payments_enabled": "boolean" }
+```
diff --git a/content/platform/automations/index.mdx b/content/platform/automations/index.mdx
new file mode 100644
index 0000000..9922472
--- /dev/null
+++ b/content/platform/automations/index.mdx
@@ -0,0 +1,37 @@
+import { Callout } from 'nextra/components'
+
+# Automations
+
+LearnHouse pushes real-time events to your own systems and to no-code automation tools. Use these to sync learners into your CRM, notify a Slack channel on course completion, trigger certificate printing, or feed any downstream workflow.
+
+
+Automations are available on the **Pro plan** or higher. Both webhooks and Zapier rely on API tokens scoped to a single organization.
+
+
+## What's available
+
+- **[Webhooks](/platform/automations/webhooks)** — Direct, signed HTTP `POST` deliveries to any URL you control. Best for custom backends and self-hosted services.
+- **[Zapier](/platform/automations/zapier)** — Official Zapier app with triggers for every LearnHouse event and actions for enrolling users, completing activities, and looking up learners. Best for no-code workflows into Slack, Google Sheets, HubSpot, and 6,000+ other Zapier apps.
+- **[Event Catalogue](/platform/automations/events)** — The canonical list of every event that can fire, with payload schemas.
+
+## How it works
+
+Every automation is powered by the same internal event bus:
+
+1. Something happens inside LearnHouse (a learner completes a course, a user is invited, an assignment is graded, …).
+2. The event is dispatched to every active subscriber for that organization — webhook endpoints you configured manually, and any Zapier REST Hook subscriptions created by your active Zaps.
+3. Each endpoint receives the same JSON envelope with an event name, a delivery ID, an organization ID, and an event-specific `data` payload.
+
+Signing, retries, delivery logs, and SSRF protection all work identically across both paths. Choosing between webhooks and Zapier is a question of where you want to handle the event, not whether you'll get a different payload.
+
+## Choosing between webhooks and Zapier
+
+| You want to… | Use |
+| --- | --- |
+| Call a custom backend you control | **Webhooks** |
+| Route events into Slack, Google Sheets, HubSpot, Airtable, Notion, etc. | **Zapier** |
+| Verify cryptographic signatures on payloads | **Webhooks** (Zapier handles its own auth internally) |
+| Run a **LearnHouse action** from another app (e.g., enroll a user when a HubSpot form is submitted) | **Zapier** |
+| Keep infrastructure dependencies to a minimum | **Webhooks** |
+
+You can use both at the same time for the same events.
diff --git a/content/platform/automations/webhooks.mdx b/content/platform/automations/webhooks.mdx
new file mode 100644
index 0000000..f197017
--- /dev/null
+++ b/content/platform/automations/webhooks.mdx
@@ -0,0 +1,237 @@
+import { Callout } from 'nextra/components'
+
+# Webhooks
+
+Webhooks deliver real-time event notifications to any HTTPS endpoint you control. When something happens in LearnHouse — a learner completes a course, a user signs up, an assignment is graded — LearnHouse sends a signed `POST` request with a JSON payload to every matching endpoint.
+
+
+Webhooks are available on the **Pro plan** or higher. Manage endpoints under **Settings → Automations** in the organization dashboard, or via the [REST API](#api-reference) with an API token.
+
+
+## Quick start
+
+1. In the dashboard go to **Settings → Automations → Webhooks → New endpoint**.
+2. Enter the target URL (must be HTTPS and publicly reachable).
+3. Select the events you want to subscribe to — see the [Event Catalogue](/platform/automations/events) for the full list.
+4. Click **Create**. The signing secret is shown **once** on this screen — copy it into your server's secret store immediately.
+5. From the endpoint detail page, click **Send test event** to deliver a `ping` payload and confirm your server is reachable.
+
+## Payload format
+
+Every delivery has the same outer envelope:
+
+```json
+{
+ "event": "course_completed",
+ "delivery_id": "dlv_9f1e3c7b22a44f0d",
+ "timestamp": "2026-04-19T14:31:02Z",
+ "org_id": 1,
+ "data": {
+ "user": {
+ "user_uuid": "user_abc",
+ "email": "alice@example.com",
+ "username": "alice"
+ },
+ "course": {
+ "course_uuid": "course_xyz",
+ "name": "Intro to Python"
+ }
+ }
+}
+```
+
+The shape of `data` varies per event. See the [Event Catalogue](/platform/automations/events) for the canonical schema of every event.
+
+### Headers
+
+| Header | Value |
+| --- | --- |
+| `Content-Type` | `application/json` |
+| `User-Agent` | `LearnHouse-Webhooks/1.0` |
+| `X-Webhook-Event` | Event name (e.g. `course_completed`) |
+| `X-Webhook-Delivery` | Unique delivery ID (matches `delivery_id` in the body) |
+| `X-Webhook-Signature` | `sha256=` — HMAC-SHA256 of the raw body |
+
+## Verifying the signature
+
+LearnHouse signs every payload with HMAC-SHA256, using the endpoint's signing secret. The signature covers the **raw request body** (exactly the bytes sent over the wire, before any JSON parsing) and is delivered in the `X-Webhook-Signature` header as `sha256=` — the same convention used by GitHub and Stripe.
+
+
+Always verify the signature before trusting a payload. Anyone who discovers your endpoint URL can send unsigned requests; the signature is the only thing that proves the request came from LearnHouse.
+
+
+### Node.js
+
+```js
+import crypto from 'node:crypto'
+
+function verifyWebhook(rawBody, signatureHeader, secret) {
+ const expected = 'sha256=' + crypto
+ .createHmac('sha256', secret)
+ .update(rawBody)
+ .digest('hex')
+
+ // Constant-time compare to resist timing attacks
+ const a = Buffer.from(signatureHeader)
+ const b = Buffer.from(expected)
+ return a.length === b.length && crypto.timingSafeEqual(a, b)
+}
+```
+
+### Python
+
+```python
+import hmac
+import hashlib
+
+def verify_webhook(raw_body: bytes, signature_header: str, secret: str) -> bool:
+ expected = "sha256=" + hmac.new(
+ secret.encode(), raw_body, hashlib.sha256
+ ).hexdigest()
+ return hmac.compare_digest(expected, signature_header)
+```
+
+
+If your framework parses the body into a dict before you see it (Express without `express.raw`, FastAPI without the raw bytes, etc.), you must re-read the raw body. Re-serialising the parsed JSON produces a different byte sequence and the signature will not match.
+
+
+## Delivery and retries
+
+- **Transport**: HTTPS `POST` with a 10-second timeout. Redirects are not followed.
+- **Retries**: Up to **3 attempts** per event, with exponential backoff of **1 s, 4 s, 16 s**. Any non-2xx response, timeout, or network error triggers a retry.
+- **Success**: A response with an HTTP status in `2xx` marks the delivery as successful and stops further retries.
+- **Ordering**: Deliveries are fire-and-forget and may arrive slightly out of order under load. Use the `timestamp` field if you need strict ordering.
+- **Delivery logs**: The most recent **200 attempts per endpoint** are retained. Each log entry records the HTTP status, a truncated response body (first 500 bytes), the attempt number, and any transport-level error.
+
+Logs are visible from the endpoint detail page in the dashboard and via `GET /{org_id}/webhooks/{webhook_uuid}/deliveries`.
+
+## Your endpoint: what to return
+
+- **Respond quickly.** LearnHouse uses a 10 s per-attempt timeout; if your handler does heavy work, enqueue a job and return `200` immediately.
+- **Respond with any 2xx status.** Body content is ignored (but captured in the delivery log for debugging).
+- **Be idempotent.** Because of retries and rare duplicate deliveries, handle the same `delivery_id` arriving twice as a no-op.
+- **Verify the signature.** Do this before any database write.
+
+## Security
+
+- **HTTPS only.** `http://` URLs are rejected at create time.
+- **Private address protection (SSRF guard).** LearnHouse resolves every webhook URL to an IP before calling it and refuses to deliver to private ranges (`10.0.0.0/8`, `127.0.0.0/8`, `169.254.0.0/16`, `172.16.0.0/12`, `192.168.0.0/16`, `::1`, link-local, etc.). The same check is repeated **after** the connection is established to defeat DNS rebinding.
+- **Signing secret at rest.** Secrets are stored encrypted (Fernet, key derived from the application's JWT secret) and are returned in plaintext **only** at creation and when you click **Regenerate**. LearnHouse cannot recover a lost secret — you can only rotate it.
+- **Scope.** A webhook endpoint is scoped to a single organization. It can only subscribe to events fired for that org.
+
+## Regenerating a secret
+
+If a secret leaks, go to **Settings → Automations → Webhooks → *endpoint* → Regenerate secret**. The new secret is returned once and replaces the old one immediately. Every subsequent delivery will be signed with the new secret, so update your consumer before regenerating (or accept a brief window of rejected signatures while you roll out the change).
+
+## API reference
+
+All endpoints require authentication (session cookie or API token) and are scoped to `org_id`.
+
+### List available events
+
+```http
+GET /api/v1/{org_id}/webhooks/events
+```
+
+Returns the full catalogue of event names, categories, descriptions, and data schemas. This is the same data shown in the Event Catalogue.
+
+### Create an endpoint
+
+```http
+POST /api/v1/{org_id}/webhooks
+Content-Type: application/json
+
+{
+ "url": "https://example.com/hooks/learnhouse",
+ "description": "Main backend",
+ "events": ["course_completed", "user_signed_up"]
+}
+```
+
+Response (200):
+
+```json
+{
+ "webhook_uuid": "webhook_b5f2…",
+ "url": "https://example.com/hooks/learnhouse",
+ "description": "Main backend",
+ "events": ["course_completed", "user_signed_up"],
+ "is_active": true,
+ "secret": "whsec_…",
+ "created_by_user_id": 1,
+ "creation_date": "2026-04-19 14:31:02"
+}
+```
+
+
+The `secret` is returned **only on this response**. Store it immediately — it cannot be retrieved again.
+
+
+### List endpoints
+
+```http
+GET /api/v1/{org_id}/webhooks
+```
+
+### Get an endpoint
+
+```http
+GET /api/v1/{org_id}/webhooks/{webhook_uuid}
+```
+
+### Update an endpoint
+
+```http
+PUT /api/v1/{org_id}/webhooks/{webhook_uuid}
+Content-Type: application/json
+
+{
+ "url": "https://example.com/hooks/v2",
+ "events": ["course_completed"],
+ "is_active": true
+}
+```
+
+All fields are optional; omit to leave unchanged.
+
+### Delete an endpoint
+
+```http
+DELETE /api/v1/{org_id}/webhooks/{webhook_uuid}
+```
+
+Deletes the endpoint **and** all of its delivery logs.
+
+### Regenerate the signing secret
+
+```http
+POST /api/v1/{org_id}/webhooks/{webhook_uuid}/regenerate-secret
+```
+
+Returns a `WebhookEndpointCreatedResponse` with the fresh `secret`. Subsequent deliveries use the new secret immediately.
+
+### Send a test event
+
+```http
+POST /api/v1/{org_id}/webhooks/{webhook_uuid}/test
+```
+
+Delivers a synthetic `ping` event:
+
+```json
+{
+ "event": "ping",
+ "delivery_id": "dlv_…",
+ "timestamp": "2026-04-19T14:31:02Z",
+ "org_id": 1,
+ "data": { "message": "This is a test webhook event from LearnHouse." }
+}
+```
+
+### List delivery logs
+
+```http
+GET /api/v1/{org_id}/webhooks/{webhook_uuid}/deliveries?limit=50
+```
+
+Returns up to `limit` of the most recent delivery attempts (capped at 200 retained per endpoint), each including HTTP status, truncated response body, attempt number, and error message when applicable.
diff --git a/content/platform/automations/zapier.mdx b/content/platform/automations/zapier.mdx
new file mode 100644
index 0000000..0847140
--- /dev/null
+++ b/content/platform/automations/zapier.mdx
@@ -0,0 +1,111 @@
+import { Callout } from 'nextra/components'
+
+# Zapier
+
+The official LearnHouse Zapier app lets you build no-code workflows across Slack, Google Sheets, HubSpot, Notion, Airtable, Mailchimp, and every other Zapier app — without writing a webhook consumer yourself.
+
+
+The Zapier integration is available on the **Pro plan** or higher. It is implemented on top of the same event system as [Webhooks](/platform/automations/webhooks), so the two can be used together.
+
+
+## What you can do
+
+### Triggers (LearnHouse → other apps)
+
+Every event in the [Event Catalogue](/platform/automations/events) is available as a Zapier trigger. When that event fires in LearnHouse, the Zap runs and can push data into any of Zapier's supported apps.
+
+Common patterns:
+
+- **Course Completed → Slack**: post a celebration message to a channel when a learner finishes a course.
+- **User Signed Up → HubSpot**: create or update a contact when someone signs up for your org.
+- **Assignment Submitted → Google Sheets**: append a row for every submission.
+- **Certificate Claimed → Mailchimp**: tag the contact in your newsletter audience.
+
+### Actions (other apps → LearnHouse)
+
+Actions run a LearnHouse operation from any step of a Zap. They call existing admin endpoints under `/api/v1/admin/{org_slug}/*` using the API token you connected.
+
+| Action | What it does |
+| --- | --- |
+| **Enroll User** | Enrols an existing user in a course. |
+| **Unenroll User** | Removes a user's enrolment from a course. |
+| **Complete Activity** | Marks a specific activity complete for a user. |
+| **Complete Course** | Marks an entire course complete for a user. |
+
+### Searches
+
+| Search | What it does |
+| --- | --- |
+| **Find User by Email** | Looks up a LearnHouse user by email — use the result to feed a user ID into a follow-up action. |
+
+## Setup
+
+### 1. Get a LearnHouse API token
+
+1. In the LearnHouse dashboard open **Settings → API Access**.
+2. Click **Create token** and give it a descriptive name (e.g., "Zapier").
+3. Copy the `lh_…` token immediately. The token is scoped to your current organization.
+
+
+API tokens are shown only once at creation. Store the value somewhere you can retrieve later; if you lose it, revoke the token and create a new one.
+
+
+### 2. Connect the Zapier app
+
+1. In Zapier, click **Create Zap** and search for **LearnHouse** as the trigger app.
+2. Pick an event (e.g., **Course Completed**) and click **Continue**.
+3. When prompted to sign in, paste your `lh_…` API token.
+4. Zapier calls LearnHouse's `/integrations/zapier/me` endpoint to verify the token and then displays your organization name.
+
+### 3. Configure the trigger
+
+Pick the event, optionally filter by course or user group using the dynamic dropdowns Zapier populates from your org, and click **Test trigger**. Zapier pulls a recent sample payload so you can map fields into the action step.
+
+### 4. Turn on the Zap
+
+When you toggle the Zap on, Zapier calls `POST /integrations/zapier/subscriptions` on LearnHouse with its own callback URL. LearnHouse records the subscription (as a webhook endpoint tagged `source="zapier"`) and starts delivering the event to Zapier. Toggling the Zap off removes the subscription automatically.
+
+## How it works under the hood
+
+The Zapier integration is implemented on top of LearnHouse's webhook pipeline using the Zapier **REST Hooks** pattern:
+
+1. Zapier calls LearnHouse endpoints under `/api/v1/integrations/zapier/*` — `/me` for auth verification, `/events` for the trigger catalogue, `/courses` / `/users` / `/usergroups` for dropdown sources, and `/subscriptions` for registering callbacks.
+2. Each enabled Zap registers one subscription, which is stored as a webhook endpoint with `source = "zapier"`, a single event, and Zapier's callback URL.
+3. When the event fires, the existing webhook dispatcher delivers the payload to Zapier using the same retries, SSRF guard, and delivery logging described in [Webhooks](/platform/automations/webhooks).
+
+Subscriptions show up in the same **Settings → Automations** dashboard as manual webhooks, labelled with the Zap name Zapier provided at subscribe time. You can view delivery logs for a Zapier subscription the same way you do for a manual webhook.
+
+
+Signatures are still computed and sent, but Zapier does not verify them — its REST Hook URL is protected by its own secret path. You don't need to do anything with the signature as an end user.
+
+
+## Managing Zapier subscriptions
+
+- The canonical place to enable / disable a Zap is the **Zapier UI**. Toggling a Zap on or off there adds or removes the corresponding LearnHouse subscription.
+- Deleting a subscription from the LearnHouse dashboard will stop deliveries, but Zapier will not know the subscription is gone — the Zap will silently receive nothing. Prefer turning the Zap off from Zapier.
+- If you revoke the underlying API token, every Zap that was connected with that token will fail to re-subscribe when Zapier next syncs. Create a new token and reconnect the account in Zapier.
+
+## Zapier integration endpoints
+
+These endpoints are called by the Zapier Platform on your organization's behalf — you typically won't call them directly, but they are documented here for completeness.
+
+| Method | Endpoint | Purpose |
+| --- | --- | --- |
+| `GET` | `/api/v1/integrations/zapier/me` | Auth test; returns org and token identity |
+| `GET` | `/api/v1/integrations/zapier/events` | Full event registry with schemas |
+| `GET` | `/api/v1/integrations/zapier/courses` | Course list for dynamic dropdowns (max 500) |
+| `GET` | `/api/v1/integrations/zapier/users` | User list for dynamic dropdowns (max 500) |
+| `GET` | `/api/v1/integrations/zapier/usergroups` | User-group list for dynamic dropdowns (max 500) |
+| `POST` | `/api/v1/integrations/zapier/subscriptions` | Called when a Zap is turned on |
+| `GET` | `/api/v1/integrations/zapier/subscriptions` | Lists your org's Zap subscriptions |
+| `DELETE` | `/api/v1/integrations/zapier/subscriptions/{id}` | Called when a Zap is turned off or deleted |
+
+All Zapier endpoints require `Authorization: Bearer lh_…` — the org scope is carried by the token, so no `org_id` appears in the URL.
+
+## Troubleshooting
+
+- **"This endpoint requires an API token"** — You tried to connect with session-cookie auth instead of an `lh_…` token. Generate one in **Settings → API Access**.
+- **"Zapier integration requires a Pro plan or higher"** — Upgrade the organization's plan; the Zapier endpoints are gated at Pro.
+- **"Unknown event"** — The Zapier app was pushed with an event name that no longer exists in LearnHouse (or vice versa). Make sure the Zapier app and the LearnHouse instance are on compatible versions.
+- **Zap runs but no data comes through** — Check **Settings → Automations** in LearnHouse; the subscription row shows recent delivery attempts, their status, and the response body Zapier returned.
+- **SSRF block** — Zapier's callback URL is public, so this should not happen in production. If it does, check the delivery log's `error_message` — it'll explain which IP was blocked.
diff --git a/content/platform/index.mdx b/content/platform/index.mdx
index 1ceb4f2..2ec6fcc 100644
--- a/content/platform/index.mdx
+++ b/content/platform/index.mdx
@@ -19,3 +19,4 @@ This section covers all the features and capabilities of the LearnHouse platform
- **[AI](/platform/ai)** — Context-aware AI assistant for students and teachers.
- **[Users & Access](/platform/users)** — User management, roles, permissions, and authentication.
- **[Organizations](/platform/organizations)** — Multi-tenant organization management, branding, and settings.
+- **[Automations](/platform/automations)** — Webhooks and the official Zapier app for connecting LearnHouse events to your own systems or 6,000+ no-code tools.