MohB

All apps › Documentation: Newsletter

Technical documentation

Architecture, data protection and API.

For IT contacts, data protection officers and developers who connect agents or automations.

Architecture at a glance

  • Web app for the admin interface and the public pages (signup, confirmation, unsubscribe, preferences).
  • Worker, a separate background process. It is the only part that sends email; the web app only puts messages into a queue.
  • Database: PostgreSQL. Uploaded images and PDFs are stored on the same server.
  • Sending: Amazon SES in the EU (Stockholm, eu-north-1), from your verified domain with DKIM.
  • Login: the shared MohB account (single sign-on). Roles per workspace: owner and editor.
  • Hosting: servers in the EU. No ad networks, no third-party tracking, no external fonts in emails.

Separation of workspaces

Every record belongs to one workspace. All database access goes through one central layer that adds the workspace to every query; a request for another workspace's record answers "not found". Automated tests include a canary: data of workspace B must stay invisible and unchangeable for workspace A.

Data protection and records

WhatWhere it is kept
Consent text shown, time, IP addressOn the contact and on each signup
Form and source code of a signupPer signup (?src=…)
Double opt-in confirmationTime of confirmation
Consent to click trackingSeparate, optional; can be withdrawn on the unsubscribe page
  • Opens are never measured. Clicks are counted per person only with that separate consent; links are rewritten only for those people.
  • Unsubscribe works by button (POST, so link scanners cannot unsubscribe anyone) and as one-click unsubscribe (RFC 8058) in the email header.
  • Bounce and complaint reports from SES are accepted only with a valid signature from the configured notification topic.

Safety nets

  • Abort rule per workspace: a campaign stops when more than 2 % bounce or more than 1 % unsubscribe (from 20 emails on).
  • Blocked stays blocked: unsubscribed, bounced or complained contacts cannot be re-added by import.
  • Stop switch: the operator can halt all sending at once.
  • Rate limits on public forms.

Modules

Optional features are modules that an owner turns on per workspace (Settings → Modules). A module brings its own pages, tables and API rights. Turned off, its menu item and pages disappear; its data is kept. The first module is Outreach.

API v1

Base URL: https://newsletter.mohb.de/api/v1. JSON in, JSON out.

Authentication

Create a token under Settings → API (owners only). It belongs to one workspace and carries only the rights you tick. The token is shown once; the server keeps only its SHA-256 fingerprint. Send it as a bearer token:

curl -H "Authorization: Bearer mohb_nl_…" https://newsletter.mohb.de/api/v1/me
StatusMeaning
401Token missing, malformed, unknown or revoked
403Token lacks the right for this endpoint
404Not found in this workspace, or the module is turned off
409Conflict, e.g. draft is already approved

Rights

RightAllows
outreach:readRead occasions, rules and contact memory
outreach:writeWrite drafts, record signals, report a hand-off to a mailbox

Approving and sending are not available through the API. They stay with a person in the app.

Endpoints

Method and pathPurpose
GET /meWorkspace, rights and active modules of the token
GET /outreach/occasions?view=openList occasions. view: open, approved or done; optional channel: mailbox or ses
GET /outreach/occasions/{id}One occasion with contact, contact memory, recent signals, rule hint and draft
PUT /outreach/occasions/{id}/draftWrite or update the draft: {"subject": "…", "body": "…"}
POST /outreach/occasions/{id}/handoffReport that the approved draft is in a mailbox: {"ref": "<draft id>"}
POST /outreach/signalsRecord a signal: {"email": "…", "type": "manual.note", "payload": {"topic": "…", "note": "…"}, "dedupeKey": "…"}
GET /outreach/rulesList rules

A repeated dedupeKey does not create a second signal. A repeated hand-off with the same ref is accepted; a different ref is rejected.