Skip to content
← mailer

Mail a physical letter with an API

For developers and AI agents that need paper to arrive at a Canadian address.

Email is easy to send from code. Some documents still have to arrive on paper: formal notices, statements, letters to banks and governments, anything a recipient might ignore on screen. mailer turns one API call into a printed, sealed, stamped envelope in the Canadian mail, so your app or your agent does not need a printer, envelopes or a trip to the post office.

How it works

  1. You send a PDF and a Canadian address. Up to 5 A4 pages, black and white, per envelope.
  2. The letter is printed, sealed with your return address, and handed to Canada Post, normally by the end of the next business day.
  3. You check its status by API. Tracked and registered mail return a tracking number once it is mailed.

Try it for free first

A sandbox key behaves exactly like a live one but never prints, mails or charges, so you can build the whole integration before paying anything.

curl -X POST https://mailer.websystems.co/api/keys/test
# -> { "secret_key": "test_..." }   nothing sent with this key is printed, mailed or charged

Send a letter (Python)

import requests

KEY = "test_..."  # sandbox key; swap in a live key when you are ready
r = requests.post(
    "https://mailer.websystems.co/v1/letters",
    headers={"Authorization": f"Bearer {KEY}", "Idempotency-Key": "invoice-7841-letter-1"},
    files={"pdf": open("letter.pdf", "rb")},
    data={
        "address_line1": "Jane Doe, 123 Maple St",
        "city": "Toronto", "province": "ON", "postal_code": "M5V 1J2",
        "service_level": "standard",   # or "tracked", "registered"
    },
    timeout=60,
)
print(r.json())   # id, status, and a tracking number for tracked and registered mail

The same call works from any language that can send a multipart request. The full contract is in the OpenAPI spec.

Retries are safe

Every send takes an Idempotency-Key. If your request times out and you retry with the same key, you get the original letter back. It is never printed twice and never charged twice. Use one key per letter, for example your invoice or case number.

What it costs

ServiceWhat you getPer envelope (CAD)
StandardCanada Post Lettermail, no tracking$10.00
TrackedXpresspost, tracking number$25.00
RegisteredRegistered Mail, signature and mailing receipt$29.00

Prepaid credit, cheaper in bulk. See pricing. Live prices are also available as JSON at /v1/pricing.

Using it from an AI agent

mailer is also a remote MCP server at https://mailer.websystems.co/mcp. An agent calls get_sandbox_key, then passes the key as api_key to send_letter. Agents cannot hold a payment card, so a human funds a live key through a Stripe link the agent hands them. See the agent page.

Limits to know before you build

  • Canadian destinations only.
  • Black and white, A4, up to 5 pages per envelope. Longer documents go in several envelopes.
  • Mail cannot be undone once printed. Test with the sandbox key first.
  • No deceptive, threatening or unsolicited bulk mail. See acceptable use.
  • This is a mailing service, not legal service of documents.

Get a sandbox key · For AI agents · Pricing

157 Adelaide Street West, Suite 242, Toronto, Ontario M5H 4E7