A letter posting API. Built for your software.

The Send Letters Online REST API lets approved accounts create and pay for physical letter orders, upload documents and check order status. Authenticate with a bearer API key, fund your prepaid balance and submit an order. We handle the printing, folding and posting through the selected Royal Mail service.

Illustration of digital documents becoming an enveloped physical letter

Manage API access Read the endpoint guide

How do I get started with the letter API?

Sign in and open balance and API-access settings. API access must be enabled for the account; adding money to a website wallet alone does not enable the API. Keep your key on a trusted server, never in public frontend code, a mobile bundle or a source repository.

  • Confirm that API access is enabled and create or manage your key.
  • Add enough prepaid balance for the orders you intend to submit.
  • Start with the read-only balance request below to verify your integration.
  • Review the order fields and current price before submitting a paid order.

Which REST API endpoints are available?

All paths below are relative to the Send Letters Online website and require Authorization: Bearer YOUR_API_KEY. The public integration API is /api/v1, not the session-authenticated endpoints used internally by the website.

  • GET /api/v1/balance: read balanceCents and currency.
  • GET /api/v1/orders: list your orders; use limit and offset for pagination.
  • GET /api/v1/orders/:id: read one of your orders, its status and available tracking information.
  • POST /api/v1/uploads/request-url: obtain uploadURL and objectPath for a document upload.
  • POST /api/v1/orders: create and immediately pay for one letter order from your balance.

What does a letter order need?

Supply the recipientName, recipientLine1, recipientCity, recipientPostcode and recipientCountry fields, the serviceClass, and the printing options. Text orders use contentType: TEXT with contentText. For uploaded documents, first request an upload URL, upload the bytes with PUT, then use the returned objectPath as contentUploadPath.

An uploaded document must belong to the same authenticated customer. Wait for the upload to complete before creating the order, and provide an accurate pages count. Validate your document, address and selected service before any paid submission.

  • Recipient: full name and deliverable postal address.
  • Print settings: pages, colour and doubleSided.
  • Text content: contentType and contentText.
  • Uploaded content: contentUploadPath from your own upload request.

When does an API call charge my balance?

POST /api/v1/orders is a real paid operation, not a draft or sandbox request. A successful order debits the prepaid account immediately. There is no Stripe checkout step in this API path and no public free-send sandbox advertised here.

Do not blindly retry an order-creation POST after a network timeout: the first request may already have succeeded. Check recent orders and investigate the result before resubmitting. No idempotency-key contract is documented for this endpoint.

  • 400: review invalid content, address or upload details.
  • 401: check the bearer key is present and valid.
  • 402: insufficient prepaid balance; top up before trying again.
  • 403: check account access is enabled.
  • 404: the requested order was not found for your account.
  • 429: slow down and handle the rate-limit response before retrying a read.

How can my application follow a letter after posting?

Poll GET /api/v1/orders/:id for the current status. Treat creation, printing, posting and delivery as different events. Tracking numbers are returned when available for the chosen service; a tracking number alone does not prove delivery.

Use polling with a reasonable delay and handle transient errors. This guide does not offer customer webhooks or official JavaScript and Python SDKs: integrate with standard HTTP clients. If you prefer an assistant instead of writing an integration, use the MCP server.

Read-only authentication example

curl "https://sendlettersonline.co.uk/api/v1/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"

Frequently asked questions

Is the letter API the same as the website checkout API?

No. The public integration uses /api/v1 with a bearer API key for an enabled account. Website checkout uses session-authenticated routes and is not the public API contract.

Is there a free sandbox for sending test letters?

No public free-send sandbox is documented here. Use GET /api/v1/balance to verify authentication without ordering. POST /api/v1/orders creates a real paid letter, so do not use it as a harmless connectivity test.

Can I upload a PDF through the API?

Yes. Request an upload URL, PUT the document to uploadURL, then reference objectPath as contentUploadPath in an order. The upload must be associated with the same customer account.

Do you provide webhooks or official SDKs?

This integration guide documents HTTP endpoints and order-status polling. It does not advertise customer webhooks or official language SDKs; use your standard HTTP client.

Can I retry a paid order automatically?

Do not blindly retry POST /api/v1/orders after an uncertain response. Check whether the order was created before resubmitting, because creation is a paid operation and no idempotency-key contract is documented here.

Can I use the same account with an AI assistant?

Yes. MCP and REST access use the same enabled customer account, prepaid balance and order history. MCP adds tool-based interaction and an explicit price-confirmation contract.