Getting Started with Docmail
Docmail is a print-and-post API. You send us documents and addresses; we print, envelope, and post them via Royal Mail.
Quick Orientation
| What you want to do | Where to go |
|---|---|
| Send your first test letter | Quickstart guides |
| Understand test vs live mode | Test Mode |
| Set up your account | Account Setup |
| Go live with real mailings | Going Live |
The 60-Second Version
- Create account at https://www.cfhdocmail.com (free, instant)
- Enable API access - visit Admin, then My Login Details and ensure "Allow web service access?" is checked
- Send test mailing - prefix the name in the
CustomerApplicationfield with[Test] - Check status - poll
GetStatusuntil you receive a response ofMailing submitted - Go live - Complete the approval questionnaire, configure payment and remove
[Test]prefix
How Docmail Works
Every mailing follows the same lifecycle:
Key concept: Docmail processes asynchronously. When you submit a mailing, you get a tracking ID immediately. The actual processing (validation, proof generation, pricing) happens in the background. You must poll GetStatus or use callbacks to know when it's complete.
Two Ways to Submit
| Approach | Best for | Calls needed |
|---|---|---|
| Zip file (recommended) | Most integrations, batch processing | 3 calls |
| Individual calls | Fine-grained control, conditional logic | 6+ calls |
The zip approach bundles your document, address list, and configuration into a single file. Docmail unpacks and processes it asynchronously. Simpler, faster, fewer round-trips.
It's a SOAP API
Docmail uses SOAP over HTTPS, not REST. If you're used to REST APIs:
| REST concept | SOAP equivalent |
|---|---|
| Endpoint per resource | Single endpoint, operation in payload |
| HTTP status codes | Always 200; check response body for errors |
| JSON | XML (with JSON option in response payload) |
| OpenAPI spec | WSDL at https://www.cfhdocmail.com/LiveAPI2/DMWS.asmx?WSDL |
Most languages have SOAP client libraries that handle the XML for you. See the quickstart for your language.
Environments
| Environment | Purpose | Endpoint |
|---|---|---|
| Live | Real mailings, real money, real post | https://www.cfhdocmail.com/LiveAPI2/DMWS.asmx |
| Test | Same endpoint, [Test] prefix triggers test mode | Same as above |
There is no separate sandbox server. Test mode is activated by prefixing your CustomerApplication parameter with [Test]. See Test Mode.
Next Steps
First time? Pick your language and follow the quickstart:
- cURL - test from terminal, no setup
- Java
- C#
- Python
- JavaScript/Node.js
Already explored? Read about going live when you're ready for production.