---
title: "Inbound Postmark"
method: POST
path: "/inbound/postmark"
---

# Inbound Postmark

`POST /inbound/postmark`

## Request

- Base URL: `https://www.tandem-cc.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.tandem-cc.com/inbound/postmark`
- Auth: none declared

Postmark inbound webhook + Cloudflare Email Worker target.

Shared-secret validation: Postmark is configured to POST to
``/inbound/postmark?token=<TANDEM_POSTMARK_INBOUND_TOKEN>``. The
query-string token matches the ``TANDEM_POSTMARK_INBOUND_TOKEN`` env
var. Any mismatch returns 401 without parsing. Empty env var =
accept unauthenticated (dev-mode only — do NOT run in prod with the
token unset).

Flow:
  1. Validate shared-secret query param
  2. Parse Postmark inbound JSON → envelope dict (tandem.api.inbound)
  3. Persist via repository.save_envelope()
  4. Return the created message_id/thread_id so Postmark's retry
     logic can see a 2xx and move on.

## Response `200`

Successful Response

- object

---

[API](https://skmtc.dev/tandem-cc/apis/tandem-api.md) · [All operations](https://skmtc.dev/tandem-cc/apis/tandem-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tandem-cc/apis/tandem-api/revisions/3b804877b47c?raw)
