curl https://thepostalcompany.com/api/v1/letters/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer tpc_your_api_key"
const response = await fetch(
"https://thepostalcompany.com/api/v1/letters/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
{
headers: { "Authorization": "Bearer tpc_your_api_key" },
}
);
const letter = await response.json();
console.log(letter.status);
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "sent",
"recipient": "Jane Doe",
"address": {
"street": "Keizersgracht",
"number": "123",
"suffix": "",
"postalcode": "1015 CJ",
"city": "Amsterdam",
"country": "NL",
"fullAddress": "Keizersgracht 123, 1015 CJ Amsterdam, NL"
},
"content": "Dear Jane,\n\nThis is a letter sent via the API.\n\nBest regards",
"created_at": "2026-04-14T10:00:00.000Z",
"updated_at": "2026-04-14T10:00:05.000Z"
}
{
"error": "Letter not found"
}
Letters
Get a Letter
Retrieve a single letter by its ID.
GET
/
api
/
v1
/
letters
/
{letterId}
curl https://thepostalcompany.com/api/v1/letters/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer tpc_your_api_key"
const response = await fetch(
"https://thepostalcompany.com/api/v1/letters/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
{
headers: { "Authorization": "Bearer tpc_your_api_key" },
}
);
const letter = await response.json();
console.log(letter.status);
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "sent",
"recipient": "Jane Doe",
"address": {
"street": "Keizersgracht",
"number": "123",
"suffix": "",
"postalcode": "1015 CJ",
"city": "Amsterdam",
"country": "NL",
"fullAddress": "Keizersgracht 123, 1015 CJ Amsterdam, NL"
},
"content": "Dear Jane,\n\nThis is a letter sent via the API.\n\nBest regards",
"created_at": "2026-04-14T10:00:00.000Z",
"updated_at": "2026-04-14T10:00:05.000Z"
}
{
"error": "Letter not found"
}
Get a Letter
Retrieve the details of a letter by its ID. You can only access letters that belong to your account.Path parameters
string
required
The unique letter ID returned when the letter was created.
Response
string
The unique letter ID.
string
The letter status. One of:
draft, processing, sent, delivered, failed.string
The recipient name, if provided.
object
The structured address object.
string
The letter body text.
string
ISO 8601 timestamp of when the letter was created.
string
ISO 8601 timestamp of the last update.
Examples
curl https://thepostalcompany.com/api/v1/letters/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer tpc_your_api_key"
const response = await fetch(
"https://thepostalcompany.com/api/v1/letters/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
{
headers: { "Authorization": "Bearer tpc_your_api_key" },
}
);
const letter = await response.json();
console.log(letter.status);
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "sent",
"recipient": "Jane Doe",
"address": {
"street": "Keizersgracht",
"number": "123",
"suffix": "",
"postalcode": "1015 CJ",
"city": "Amsterdam",
"country": "NL",
"fullAddress": "Keizersgracht 123, 1015 CJ Amsterdam, NL"
},
"content": "Dear Jane,\n\nThis is a letter sent via the API.\n\nBest regards",
"created_at": "2026-04-14T10:00:00.000Z",
"updated_at": "2026-04-14T10:00:05.000Z"
}
{
"error": "Letter not found"
}
Error codes
| Status | Description |
|---|---|
401 | Missing, invalid, or revoked API key |
404 | Letter not found or does not belong to your account |
