SynqDocs
Management APIBrands

Preview a brand's next sign-in email

The sign-in code email the brand's users get next, drawn exactly as it is sent now, from its saved settings: its subject, who it is from and where replies go (`effective`), and the whole HTML document, with a sample code and a link that goes nowhere. It sends nothing. Render `html` only in a sandboxed iframe (`srcdoc`, with neither `allow-scripts` nor `allow-same-origin`) under the returned `content_security_policy`, never inline. Needs `org.brands.view`.

GET/v1/orgs/{org}/brands/{brand}/email/preview

The sign-in code email the brand's users get next, drawn exactly as it is sent now, from its saved settings: its subject, who it is from and where replies go (effective), and the whole HTML document, with a sample code and a link that goes nowhere. It sends nothing. Render html only in a sandboxed iframe (srcdoc, with neither allow-scripts nor allow-same-origin) under the returned content_security_policy, never inline. Needs org.brands.view.

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string

The org's id

Match^org_[0-9a-hjkmnp-tv-z]{26}$
brand*string

The brand's id

Match^brd_[0-9a-hjkmnp-tv-z]{26}$

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/brands/brd_01h455vb4pex5vsknk084sn02q/email/preview" \  -H "Authorization: Bearer $SYNQ_API_KEY"
{  "subject": "Your code to sign in to Acme",  "effective": {    "from": {      "name": "Acme via Synq",      "address": "notifications@mail.synq.build"    },    "reply_to": "support@acme.com",    "kind": "fallback",    "fallback_reason": "no_domain"  },  "html": "string",  "content_security_policy": "default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"}