---
name: blokforms
description: Build, manage, embed, and analyze EU-hosted forms, payments, e-signatures, approval workflows, and appointment bookings using BlokForms (MCP server, REST API, @blokforms/react, @blokforms/client, and embed.js).
---

# BlokForms Agent Skill

Use this skill whenever the user wants to create, update, embed, or analyze forms with **BlokForms** (`https://blokforms.com`).

## Endpoints & Auth

- **MCP Server (Streamable HTTP):** `https://api.blokforms.com/mcp`
- **REST API:** `https://api.blokforms.com/api/v1` (OpenAPI 3.1: `https://api.blokforms.com/api/v1/openapi.json`)
- **Public Delivery & Embed CDN:** `https://cdn.blokforms.com`
- **Authentication:** `Authorization: Bearer bf_pat_...` (Personal Access Token created in `https://app.blokforms.com/organization` -> Developers & API).

## Standard Workflows

### 1. Creating a New Form via MCP
1. Call `list_projects` to find the target `projectId` (or `create_project` if none exists).
2. Either pick a starter template via `list_form_templates` or call `generate_form_with_ai` with `{ prompt, locale }` (`"en" | "nl" | "de" | "fr" | "es"`) to obtain a validated schema blueprint.
3. Call `create_form` with `{ projectId, name, fields, settings }` (or `templateId`).
4. Call `get_embed_snippets` with `{ formId }` to retrieve copy-ready `<script>`, popup, drawer, `<iframe>`, and React `<BlokForm>` snippets.

### 2. Embedding in a Website or App
- **Any HTML / Astro / WordPress / Webflow site:**
  ```html
  <div data-blokform="frm_ID" data-theme="light" data-locale="en"></div>
  <script src="https://cdn.blokforms.com/embed.js" async></script>
  ```
- **React / Next.js:** Install `@blokforms/react` and render `<BlokForm formId="frm_ID" baseUrl="https://cdn.blokforms.com" />`.
- **Vue / Svelte / Headless JS:** Install `@blokforms/client` and call `createFormController({ formId: "frm_ID", baseUrl: "https://cdn.blokforms.com" })`.

### 3. Safe Submission Analysis & GDPR Compliance
- **Zero-PII metrics first:** Prefer `get_form_stats`, `get_form_analytics`, `get_form_visual_report`, or `ask_submissions_ai` (which scrubs PII by default when `includePii` is omitted/`false`).
- **PII minimization:** When using `list_submissions` or `get_submission`, avoid echoing full submitter emails, phone numbers, IBANs, or addresses unless explicitly asked.
- **GDPR Art. 17 erasure:** ALWAYS call `erase_submissions_by_email` with `{ email, dryRun: true }` first, report matched counts, and only run `dryRun: false` after explicit user confirmation.

### 4. Schema Rules & Gotchas
- Every `showIf` condition must reference an input field appearing **earlier** in `fields[]`.
- Valid field types: `text`, `email`, `textarea`, `number`, `tel`, `url`, `date`, `time`, `select`, `radio`, `checkboxes`, `checkbox`, `consent`, `file`, `hidden`, `signature`, `rating`, `matrix`, `address`, `repeater`, `image_choice`, `calculation`, `product_list`, `appointment`, plus layout blocks `heading`, `paragraph`, `divider`, `image`, `section`.
- Password-protected forms require unlocking via `POST https://cdn.blokforms.com/f/:id/unlock` and passing `X-BlokForms-Access`.
- Interactive `org.manage` endpoints (Mollie/Stripe keys, custom domain mutations) require a browser session and return `403` for PATs.

## Full Documentation
Fetch `https://blokforms.com/llms-full.txt` or individual Markdown docs at `https://blokforms.com/docs/{quickstart,mcp,embed,sdk,fields,workflows,api}.md`.
