PIETERPOST API
API dashboard
Generate secure compose links, launch hosted checkout, top up credits, and track letter or postcard orders from one place.
Overview
Send real letters and postcards from your own product.
Use PieterPost to create prepared mail orders, hosted checkout links, wallet-funded direct sends, and secure compose links. Start in test mode, then go live when the payment and credit path is ready.
MCP
Connect PieterPost directly from an MCP client.
Add the hosted MCP server to ChatGPT, Claude, Vercel AI SDK clients, or another MCP host. The OAuth flow handles sign up, authorization, wallet top-ups, uploads, checkout links, and direct-send tools.
Server URL
https://pieterpost.com/mcp/How it works
Create a test API key in the dashboard.
Send a test letter or postcard payload to the sandbox.
Move hosted checkout live, or add credits for direct send.
Track every order by id, status, request type, and payment reference.
Choose the flow that matches your product
Hosted checkout
Create a payment link for a prepared letter or postcard. PieterPost collects payment and sends the mail after checkout succeeds.
Direct send
Use wallet credits to create direct-send orders from your own backend. Test keys simulate fulfillment before you go live.
Compose links
Generate a secure composer URL with the address and message prefilled, then let the user review and pay in PieterPost.
What the API supports
- Letters with one or more recipients and optional PDF/image attachments
- Postcards with a default front image or an uploaded custom front
- Template messages with recipient variables
- Test mode and live mode API keys
curl -X POST https://pieterpost.com/v1/checkout-links \
-H "Authorization: Bearer pp_test_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"requestType": "postcard",
"senderEmail": "sender@example.com",
"returnUrl": "https://example.com/return",
"postcard": {
"frontImageAssetId": "asset_postcard_front_123",
"message": "A quick card from PieterPost.",
"recipient": {
"name": "Ada Lovelace",
"streetAddress": "1 Example Street",
"postalCode": "1011 AB",
"city": "Amsterdam",
"country": "Netherlands"
}
}
}'