Developer guide
Send letters to us from your own website or system, and follow each one to Royal Mail.
1. Get a connection key
Log in to your account and open Connect your system. Press Create a connection key and copy it: it's shown once. Keep it on your server only, never in a web page or app. Send it with every request:
Authorization: Bearer tfr_live_…
2. Send a letter
POST https://thefrankingroom.co.uk/api/v1/letters
Content-Type: application/json
{
"client_ref": "member-1042",
"recipient": {
"name": "Jane Smith",
"address": ["12 High Street", "Anytown"],
"postcode": "AB12 3CD"
},
"letter": { "text": "Dear Jane,
Welcome to the club..." },
"options": { "colour": false, "sides": 1, "paper": "standard", "fold": "dl", "return_envelope": false },
"card": { "name": "Jane Smith", "number": "0001042" }
}
- letter: either
text(we lay it out on our letterhead) orpdf_base64(a ready-made PDF up to 10 MB, printed as it is, with the address placed to show through a DL window). - options: all optional.
sides1 or 2;paper"standard" or "premium";fold"dl", "c5" or "flat". - card: leave it out for no membership card.
- All letters go Royal Mail 2nd class.
The answer (201) gives the tracking code and price at once:
{
"ref": "K7QM3XWP",
"client_ref": "member-1042",
"status": "Waiting to print",
"stages": [{ "stage": "Received/queued", "at": "2026-12-02T09:14:03.000Z" }, …],
"post_by": null,
"expected_by": null,
"price": { "per_letter": 1.61, "currency": "GBP", "lines": [ … ] },
"tracking_url": "https://thefrankingroom.co.uk/account/letters/K7QM3XWP"
}
Letters sent this way go straight through: there's no check-and-send step. Mistakes come back as status 400 with an error in plain English, for example a postcode we don't recognise.
3. Follow a letter
GET https://thefrankingroom.co.uk/api/v1/letters/K7QM3XWP
Stages: Received/queued, Letter printed, Card printed (cards only), Packed, Franked, Queued for Royal Mail, Received by Royal Mail. Once posted, expected_by is the latest expected delivery date (2nd class, within 3 working days).
Limits and care
- Up to 600 requests a minute.
- Only send people you're allowed to write to. We keep letters and addresses for 91 days after posting and tracking records for 12 months, as our privacy notice says.
- Questions: contact us.