This guide assumes you have already created a Postbox account and generated your first API Key.
If you havenât done that yet, start here to get your credentials before continuing.
Once you have your POSTBOX_API_KEY, you are ready to move from a static web to the Agentic Web. Here is how to wire up your first endpoint.
1. Connecting your Agents
Postbox isnât just a place to store data; itâs a bridge for your agents. Before you even create a form, you should decide how your AI will interact with Postbox.
For Coding Agents (Claude Code, Cursor, etc.)
If you use a coding harness, the easiest way to give it âPostbox powersâ is via our built-in Skill. This allows your agent to create forms and query submissions directly from your terminal or editor.
For Chat Agents (ChatGPT, Claude.ai)
If you want to âtalkâ to your data in a browser-based agent, connect our MCP Server.
- Open your Agentâs MCP settings.
-
Add a new server with the URL:
https://usepostbox.com/mcp. - Follow the OAuth flow to authorize access.
Now your agent can see your forms and summarize your submissions just by asking.
2. Defining the Contract
In Postbox, we donât âbuildâ forms; we define contracts. Head to your dashboard and create a new form.
Youâll define a Schema â a machine-readable list of fields, types, and rules.
-
Fields:
email,feedback_score,message. -
Types: Strictly enforced (
email,number,boolean). -
Rules:
required,min_length, or evenhoneypotto trap bots.
The moment you save, you get a unique, versioned URL. This is your Endpoint.
3. Testing the Endpoint
Your endpoint is self-documenting. To see what your agent sees, try a GET request with a JSON header:
curl -H "Accept: application/json" https://usepostbox.com/api/.../f/your-slugYouâll get back the full schema. Now, send your first submission:
curl -X POST https://usepostbox.com/api/.../f/your-slug \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com", "message": "It works!"}'4. Activating Intelligence
This is where Postbox gets âsmart.â Within your form settings, you can toggle on Opt-in AI Features:
- Intelligent Spam: Uses the intent of your form to block off-topic noise.
- Auto-translation: Detects the language of the submission and localizes it instantly.
- Smart Replies: Links a Knowledge Base to your form to draft or auto-send context-aware responses.
5. Connecting your Stack
Finally, tell Postbox where to send the cleaned, processed data. Add a Destination:
- Webhooks: For your custom backend (with HMAC signing for security).
- Discord/Slack: For instant team notifications in rich, structured blocks.
The data your systems receive is now âclean-room qualityâ â validated, filtered, and ready for action.
Ready to go deeper? Explore the REST API Reference or join our Discord to see what others are building.