Print and mail API for sending postal letters
Streamline your letter sending with LetterAPI. Use our SDKs to start sending letters in minutes via Royal Mail — with prices from £0.86 per letter.Send your first letter — bash# 1. Request an upload URLcurl https://api.letterapi.uk/file-upload \-H "Authorization: Bearer INSERT_YOUR_ACCESS_TOKEN_HERE"# 2. Upload the file to the returned URLcurl -X PUT "SIGNED_UPLOAD_URL" --upload-file letter.pdf# 3. Create the lettercurl -X POST https://api.letterapi.uk/organisations/YOUR_ORGANISATION_UUID/letters \-H "Authorization: Bearer INSERT_YOUR_ACCESS_TOKEN_HERE" \-H "Content-Type: application/vnd.api+json" \-d '{"data": {"type": "letters","attributes": {"file_original_name": "letter.pdf","file_url": "SIGNED_UPLOAD_URL","file_url_signature": "URL_SIGNATURE","address_position": "left","auto_send": false}}}'
API for print and mail automation
Everything you need to send physical mail from code
Free of charge
We're passionate about process automation. That's why our print and mail API has no monthly fee — you only pay per letter sent.SDKs for many languages
Integrate our API in no time with SDKs for PHP, Python, Go, JavaScript, Java, .NET and Rust.Seamless scalability
Our high-performance infrastructure enables you to process thousands of letters per hour.Made for developers
A developer-friendly letter API with clear documentation, crafted by experts for easy integration.Track & Trace
Real-time progress updates and full transparency for every letter sent through the API.Enterprise grade API
Our API supports Idempotency-Key headers, rate limiting, and configurable send limits.Easy to set up — simple to use
LetterAPI is made for flexibility and simplicity, ensuring effortless integration. Alongside user-friendly documentation, we provide code examples for a swift start.pythonimport requestsaccess_token = "INSERT_YOUR_ACCESS_TOKEN_HERE"organisation_id = "YOUR_ORGANISATION_UUID"# 1. Request an upload URLupload = requests.get("https://api.letterapi.uk/file-upload",headers={"Authorization": f"Bearer {access_token}"},).json()["data"]["attributes"]# 2. Upload the filewith open("letter.pdf", "rb") as f:requests.put(upload["url"], data=f)# 3. Create the letterresponse = requests.post(f"https://api.letterapi.uk/organisations/{organisation_id}/letters",headers={"Authorization": f"Bearer {access_token}","Content-Type": "application/vnd.api+json",},json={"data": {"type": "letters","attributes": {"file_original_name": "letter.pdf","file_url": upload["url"],"file_url_signature": upload["url_signature"],"address_position": "left","auto_send": False,},}},)print(response.status_code, response.json())
“We like to make things easy for developers — not just during integration, but also in the long run. A happy developer is our best sales strategy.”
LT
The LetterAPI teamBuilt by developers, for developers
Powerful SDKs
Our SDKs simplify sending postal letters via Royal Mail and other carriers
With support for a wide range of programming languages, our SDKs get you from signup to your first letter in minutes, not days.Ready-to-usePre-built modules streamline setup and save time.
Simple integrationAn intuitive dashboard for quick and seamless API management.
Always up to dateEnsures compatibility as LetterAPI evolves.
Time savingsMinimise development and maintenance effort.
Various languagesAvailable for PHP, Go, Python, JavaScript, Java, .NET and Rust.
Clear docsClear guides and examples for fast implementation.
Real-time status updates via webhooks
LetterAPI provides automatic webhook notifications for key events, delivering real-time updates for each letter. React to delivery, return, and failure events without having to actively poll the print and mail API.webhook payload — json{"event": "letter.undeliverable","data": {"id": "ltr_8f2c1a9d","status": "returned","reason": "addressee_unknown","tracking_url": "https://track.letterapi.uk/ltr_8f2c1a9d"}}