Guide

Multiple Products (One Account Per Brand)

The recommended setup when each app has its own contacts, domain, and custom preference UX. Each product gets a separate ArtaMail account (ACP account). Accounts are fully isolated — no shared contacts, settings, or legal entities.

Account identity

Every account stores brand and compliance fields locally. They are never shared or linked across accounts. Configure them in Settings → Brand & compliance.

FieldPurposeExampleTemplate variable
BrandProduct identity — sender name, preference UX, in-email voiceSuperWidget{{brand}}
Legal entityRegistered company name for footers and copyrightAcme Holdings s.r.o.{{legal_entity}}
Legal addressPostal address for compliance footers (optional)123 Main St, Prague 110 00{{legal_address}}
Legal detailsRegistration IDs, court register, VAT, etc. (optional)IČO: 12345678 · DIČ: CZ12345678{{legal_details}}
Same real-world company, multiple products
If two accounts use the same legal entity name, that is coincidental manual entry — not a platform link. Edit each account independently.

Subscription types live inside each account

Do not create extra accounts just for newsletter vs product updates — that is what subscription types and subtypes are for within one brand. Use separate accounts only for separate brands (different contacts, domains, API keys).

Subscriptions & Consent guide (one type vs several) →

Template variables

VariableSourceUse in
{{brand}}Account brand name (auto-injected)Headers, product voice, preference UI title
{{legal_entity}}Legal entity setting (falls back to brand)Copyright lines, compliance footers
{{legal_address}}Settings → Brand & compliance (when set)Postal address in footers
{{legal_details}}Settings → Brand & compliance (when set)Registration IDs, court register, etc.
{{company}}Legacy — explicit API data, else brandDeprecated; use {{brand}} instead
Legacy: {{company}}
{{company}} is still auto-injected for older templates but may be removed in a future release. Use {{brand}} for product voice, {{legal_entity}}, {{legal_address}}, and {{legal_details}} for compliance footers.

Provisioning a new account

  1. Create an account in the ACP Account service; name it after the brand.
  2. Add team members; log in and switch to the new account in the dashboard.
  3. Fill in legal entity, legal address, and legal detailsin Settings → Brand & compliance (address and details are optional but recommended for marketing footers).
  4. Complete the account setup checklist (domain, sender, API key, preferences URL, DOI).
  5. Create an API key; configure ARTAMAIL_API_KEY in that app only.

Custom confirm (double opt-in)

One consent-confirmtemplate per account with that app's success redirect URL. Set DOI redirect hosts in Settings if you use an allowlist.

signup.ts
await artamail.upsertContact({
optInSubtypeSlugs: ['weekly-digest'],
// default consent-confirm template for this account
});
// User clicks confirm_url → ArtaMail confirms → redirects to your app

See the Double Opt-In Redirect guide for redirect URL details.

Custom preferences

Set preferences_url_template per account, e.g. https://prefs.superwidget.com/manage?token={{token}}. Your app proxies GET/POST to ArtaMail; /api/u/{token}/data returns orgName (brand) and legalEntityName for your UI. Postal address and registration details are available as {{legal_address}} and {{legal_details}} in email templates only — not via this API.

Custom Preference URLs guide →

Monorepo pattern

bash
# App A (.env)
ARTAMAIL_API_KEY=am_live_sk_app_a_xxx
# App B (.env)
ARTAMAIL_API_KEY=am_live_sk_app_b_xxx

Never share API keys across apps. Each key scopes to one account's contacts and settings.