SynqDocs
Management APIBrands

Preview a brand's sign-in page

The brand's hosted sign-in page in any state (a new visitor, someone coming back whose device last used a given way, or the step after the email address with an address), with draft theme and sign-in page settings on top of the brand's, saving nothing. Answers the brand's look and the page's view as values, which @synq/sign-in-ui draws as visitors get it, and what saving the theme needs. Needs `org.brands.view`.

POST/v1/orgs/{org}/brands/{brand}/sign-in-page/preview

The brand's hosted sign-in page in any state (a new visitor, someone coming back whose device last used a given way, or the step after the email address with an address), with draft theme and sign-in page settings on top of the brand's, saving nothing. Answers the brand's look and the page's view as values, which @synq/sign-in-ui draws as visitors get it, and what saving the theme needs. 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}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

What to draw: theme, settings on top of the brand's theme as PATCH …/theme takes them; sign_in_page, settings on top of the brand's sign-in page as PATCH …/sign-in-page takes them, held to the same rules; and view, which state of the page

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/brands/brd_01h455vb4pex5vsknk084sn02q/sign-in-page/preview" \  -H "Authorization: Bearer $SYNQ_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "theme": {      "font": "system",      "surface_color": "#ffffff",      "glow_color": "#ffffff",      "button_style": "pill",      "card_radius": 0,      "card_shadow": "none",      "heading": "Welcome back",      "heading_font": "rubik",      "heading_case": "upper",      "muted_color": "#ffffff",      "background_blur": 0,      "default_avatar_style": "aura",      "powered_by": true    },    "sign_in_page": {      "methods": [        {          "method": "google",          "placement": "shown",          "off_for": "everyone"        }      ],      "place": [        {          "method": "discord",          "placement": "shown",          "position": 1        }      ],      "email": {        "password": true,        "code": true,        "lead": "password"      },      "returning": "last_only"    },    "view": {      "visitor": "returning",      "last_used": "google",      "step": "email",      "email": "ada@example.com",      "screen": "sign-in"    }  }'
{  "look": {    "brand": {      "name": "Acme",      "support_email": "ana@acme.example",      "privacy_policy_url": "https://app.acme.example",      "terms_of_service_url": "https://app.acme.example",      "unclaimed": true    },    "primary_color": "string",    "background_color": "string",    "theme": {      "font": "system",      "heading_font": "system",      "heading_case": "upper",      "surface_color": "string",      "muted_color": "string",      "glow_color": "string",      "button_style": "pill",      "card_radius": 0,      "card_shadow": "none",      "background_image_url": "https://app.acme.example",      "background_blur": 0    },    "logo": {      "url": "https://app.acme.example",      "width": 0,      "height": 0    },    "phone_background_url": "https://app.acme.example",    "icon": "string",    "powered_by": true  },  "view": {    "screen": "sign-in",    "step": "start",    "heading": "string",    "methods": [      {        "method": "google",        "name": "Google",        "kind": "provider",        "placement": "shown",        "off_for": null,        "icon_url": null      }    ],    "email": {      "address": "you@example.com",      "password": true,      "code": true,      "lead": "password"    },    "returning": "last_only",    "last_used": null  },  "needs": []}