Skip to content

The Postbox skill gives AI coding agents the context they need to integrate with the Postbox API - create forms, submit data, configure processing pipelines, and manage submissions. With the skill installed, your AI agent can generate accurate integration code without you having to copy-paste documentation.

There are two ways to set it up: connect the MCP server for live, interactive access (Pro plan), or add a skill file for static API context (all plans).

The MCP server gives your AI agent live access to your Postbox data - it can list forms, read submissions, run spam analysis, draft replies, and more.

  1. Add the MCP server config

    Add Postbox to your agent’s MCP configuration:

    Add to your project’s .mcp.json or global settings:

    {
    "mcpServers": {
    "postbox": {
    "type": "http",
    "url": "https://usepostbox.com/mcp"
    }
    }
    }
  2. Authenticate

    The first time your agent uses a Postbox tool, it will trigger an OAuth flow. Sign in to your Postbox account and approve access.

  3. Verify the connection

    Ask your agent:

    “List my Postbox forms”

    It should call the list_forms tool and return your forms. If you don’t have any yet, it will return an empty list.

The skill works with any AI coding agent that supports MCP or custom context files:

PlatformMCPSkill File
Claude CodeYesYes (CLAUDE.md)
CursorYesYes (.cursor/rules/)
WindsurfYesYes (.windsurfrules)
VS Code (Copilot)YesYes (.github/copilot-instructions.md)
OpenCodeYes-
Codex-Yes
Gemini CLI-Yes (GEMINI.md)
Amp-Yes

Once installed, try these prompts with your AI agent:

Creating forms:

“Create a Postbox feedback form with fields for email (required), rating (number, required), and comment (optional)”

Submitting data:

“Write a script that submits deploy notifications to my Postbox form after each CI build”

Reading submissions:

“Show me the last 10 submissions for my contact form and summarize the common themes”

Full integration:

“Build a contact form component that submits to my Postbox endpoint, handles validation errors inline, and shows a success message”

With MCP (Pro):

“Analyze my form submissions from the past week - how many were spam? What languages were they in?”

“Draft a reply to the latest support submission using my knowledge base”

  1. Create a Postbox account

    Sign up at usepostbox.com. A “Try Me” form is created automatically so you can start testing immediately.

  2. Generate an API key

    Go to Integrations > API Keys, click Generate New Key, name it, and copy the key. Store it as POSTBOX_API_TOKEN in your environment.

  3. For MCP: Upgrade to Pro

    The MCP server requires a Pro plan ($19/mo or $199/yr). The skill file approach works on all plans.

All management API requests use Bearer token authentication:

Authorization: Bearer {api_key}

Public form endpoints (submitting data, discovering schemas) require no authentication. Private forms require a submission_token as a Bearer token.

MethodEndpointDescription
POST/api/formsCreate a form
GET/api/formsList all forms
GET/api/forms/{id}Get form details
PUT/api/forms/{id}Update a form
DELETE/api/forms/{id}Delete a form

Forms accept a fields_schema with typed fields (string, email, number, boolean, date), each with name, type, required, and optional honeypot properties.

MethodEndpointDescription
POST/api/.../f/{slug}Submit data (public endpoint)
GET/api/.../f/{slug}Discover form schema
GET/api/forms/{id}/submissionsList submissions
GET/api/forms/{id}/submissions/{id}Get a submission
DELETE/api/forms/{id}/submissions/{id}Delete a submission

Submissions accept Content-Type: application/json only. The submission endpoint URL is returned in the endpoint field when creating or retrieving a form.

MethodEndpointDescription
POST/api/knowledge_basesCreate a knowledge base
GET/api/knowledge_basesList knowledge bases
GET/api/knowledge_bases/{id}Get a knowledge base
PUT/api/knowledge_bases/{id}Update a knowledge base
DELETE/api/knowledge_bases/{id}Delete a knowledge base

Knowledge bases contain text content (FAQs, docs, policies) that power smart replies.

All AI features are configurable per-form and use AI credits:

FeatureSettingCredit Cost
Spam detection (AI)spam_protection_strategy: "intelligent"$0.005/submission
Translationlocalisation_enabled: true$0.005/submission
Smart repliessmart_reply_enabled: true + knowledge_base_id$0.01/reply

Standard spam protection (heuristics, honeypot) is free and uses no credits.

When connected via MCP, agents have access to:

ToolDescription
list_formsList all forms
get_formGet form details and schema
list_submissionsList submissions with filtering
get_submissionGet full submission details
get_dashboard_statsOverview statistics
translate_submissionTranslate a submission on demand
analyze_spamRun AI spam analysis
draft_replyGenerate a reply using a knowledge base
summarize_submissionsSummarize recent submissions with insights