Lightning PayrollPartner API · White-label
← API documentation
Manage API Client → Branding

API Branding & White-Label Guide

Everything a partner configures from one screen. Make the app, the hosted login, and the emails your customers receive look like your product, not Lightning Payroll’s. This guide is a tour of the Branding admin panel, section by section, with the endpoint that backs each control.

Admin / Manage API Client / Branding

00 Who this is for

This page covers the partner branding / white-label subsystem. Read the panel walkthrough whichever hat you wear; the endpoint chips and the reference at the end are there when you need to wire it up.

What a white-label partner is

A white-label partner is a Lightning Payroll account that has been granted API-admin access. That account owns an OAuth client and a single branding record, and its customers experience a branded version of Lightning Payroll. The flagship example is Farm Focus, the reseller these paths were first built for.

Provisioning the account and OAuth client is covered in the API Admin Setup guide; this page picks up at the branding record and the screen that edits it.

The golden rule. A resolved reseller must never leak Lightning Payroll’s own name, support email, or phone into its branding. Once a partner has branding set, blank fields stay blank for that partner rather than falling back to Lightning Payroll’s details. The Lightning Payroll defaults appear only when there is no branding identity at all.

01 How branding resolves

Most API-admin responses carry two branding objects. Knowing which is which saves a lot of “why isn’t my logo showing” debugging.

configured_branding
The values saved directly on the partner’s own account, exactly as entered in this panel.
effective_branding
What Lightning Payroll will actually use after fallbacks and overrides are applied. This is what the app and emails render from.

effective_branding.source_type tells you where the resolved branding came from:

source_typeMeaning
noneNo branding identity. Falls back to Lightning Payroll defaults.
selfResolved from the API-admin’s own branding record. The common case once setup is done.
oauth_clientResolved via the customer’s live OAuth link to a partner client.
add_onResolved via an add-on entitlement assignment (for example Farm Focus).

02 The Branding panel

Everything below lives on one screen: Manage API Client → Branding. It is a single Whitelabel Branding card plus a live email preview and, once configured, a branded-login card. Here is the whole panel, then each control in turn.

/admin/manage-api · Branding
The Branding admin panel with a sample brand (Aurora Payroll) configured
The Branding panel with a sample brand configured. Upload controls sit top-right of each section; previews update live.

Dark mode logo

An alternate logo for dark mode. Rendered on a dark preview swatch so you can check contrast.

Optional

Same limits as the primary logo (jpg, jpeg, png, gif; 1 MB). If unset, the primary logo is used in dark mode. Match its dimensions for a consistent look.

GET·POST·DEL/api/api-client/whitelabel-dark-logo

Favicon

The small icon in the browser tab and when the app is installed as a PWA.

Optional

The favicon is the only asset that accepts .ico (also png, jpg, gif; 1 MB). Use a square image — 32×32, 48×48, or 64×64. If unset, the primary logo is used.

GET·POST·DEL/api/api-client/whitelabel-favicon

Email banner

A wide header image for branded emails. When set, it replaces the logo and brand name in the email header.

Optional

This is the single most misunderstood control, so it is worth being explicit:

  • The banner is one uploaded image. There is no banner text field and no banner colour field. “Configurable” means upload, replace, or remove — nothing more.
  • It is on when an image is present, off when it isn’t. There is no separate toggle.
  • When on, it renders full-width at the top of the email and replaces both the logo and the brand-name heading.
  • It is email-only — not used on login/auth screens, not inside the app, not on PDFs.

Accepted types: png, jpg, gif. This is the only asset with a 2 MB ceiling (all others are 1 MB). Recommended: a wide image about 600px across, for example 600×150.

Two nearby settings are often mistaken for banner config but are separate: the email accent colour (drives link/button/heading colour) and the subtitle (drives the “Powered by Lightning Payroll” attribution line). Both live in Edit Branding Details.

GET·POST·DEL/api/api-client/whitelabel-banner

Email header preview

A live, approximate render of how the branded email header will look with the current assets.

Email header preview showing the banner replacing the logo and brand name

The preview updates as you upload, so a designer can see the “banner replaces logo and name” effect without sending a test email. It renders the same branch logic the real email uses (see How branded email renders).

The preview is approximate: it shows the light-mode header and does not reflect the email accent colour or dark-mode logo switching. The authoritative render is always the sent email.

Custom stylesheet

Optional CSS to theme the authenticated app: colours, typography, and layout details across the admin shell.

Optional

Upload a UTF-8 .css file up to 64 KB; changes apply immediately. Include body.lp-dark-mode rules for dark-mode support. The panel calls out the recommended theming hooks — --lp-branding-header-text, --lp-branding-muted-text, --lp-branding-action-text, --lp-branding-nav-text, and the --lp-table-* family for data tables.

CSS Generator Help

The CSS Generator Help button opens a modal with a browser-console command that generates a first-pass whitelabel CSS file from a reference app, copies it to your clipboard, and downloads generated-whitelabel.css. It is a strong starting point, not a final theme — expect to tweak navbar contrast, dark mode, and one-off components.

CSS Generator Help modal with the workflow, console command, and post-generation checks
GET·POST·DEL/api/api-client/whitelabel-style

Branded login URL

A copyable link that opens the login page pre-branded for this partner.

Branded Login URL card with the copyable branding-token link
The URL host (localhost:3001) and token shown are from a local sample environment; your customers see your own production host.

This card appears once a public branding token exists. The link looks like:

https://app.lightningpayroll.com.au/auth/login?branding_token=<public-branding-token>

Opening it renders the standard login page pre-branded (logo, name, colours), resolved from the public branding token. Share it as the partner’s “log in here” link.

Edit branding details

The modal behind “App Branding Text”: display name, subtitle, support contacts, links, and theme options.

Edit Branding Details modal with the brand text, links, and theme fields

The modal groups the text and link fields that make up the brand identity:

FieldWhat it drives
Brand display nameThe name in the admin header/sidebar and the email heading.
Brand subtitleTagline; also drives the “Powered by Lightning Payroll” attribution line.
Support email / phoneShown on branded login, reset-password, and support prompts.
Homepage URLReplaces Lightning Payroll links in navigation and emails.
Support / FAQ URLReplaces LP support links in emails and navigation.
Lock to light modePrevents users switching to dark mode — use when your stylesheet has no dark rules.

Brand text fields are saved through the API-admin update endpoint, not a per-asset upload:

POST/api/update-api-client

03 Asset specifications

Every value here is enforced by the backend; an upload that violates it is rejected with a 400. Two odd-ones-out are worth remembering: only the favicon accepts .ico, and only the email banner has a 2 MB ceiling.

AssetTypesMax sizeRecommendedWhere it appears
Primary logojpg, jpeg, png, gif1 MBNative aspect, scaled to fitApp, hosted login, branded email header
Dark-mode logojpg, jpeg, png, gif1 MBMatch the primary logoSame as primary, in dark mode
Faviconico, png, jpg, gif1 MBSquare — 32, 48, or 64pxBrowser tab, installed-PWA icon
Email bannerjpg, jpeg, png, gif2 MBWide, ~600px (e.g. 600×150)Branded email header only
Custom stylesheet.css, UTF-864 KBAuthenticated app

04 How branded email renders

The email header renders in one of three states. This is exactly what the in-panel Email Header Preview mirrors.

  1. Banner set → the banner image, full-width. No logo, no brand-name heading.
  2. No banner, logo(s) set → the logo (light + dark pair, or a single logo), then the brand name as a heading, then the optional subtitle.
  3. No branding identity at all → the default Lightning Payroll header.

The banner is served to the email as an <img src> from the public serve endpoint (below). It scales down only to fit, never up, and degrades safely: if the banner bytes or the branding token are missing, the header quietly falls back to the logo/heading branch, so a misconfigured banner never breaks an email.

05 Endpoint reference

The management endpoints below are gated by API-admin auth — a normal Lightning Payroll bearer token for the partner’s own account, not OAuth client credentials. The public serve/resolve endpoints are unauthenticated and resolve by client_id or branding_token.

MethodsPathPurpose
GET POST DELETE/api/api-client/whitelabel-logoPrimary logo
GET POST DELETE/api/api-client/whitelabel-dark-logoDark-mode logo
GET POST DELETE/api/api-client/whitelabel-faviconFavicon
GET POST DELETE/api/api-client/whitelabel-bannerEmail banner
GET POST DELETE/api/api-client/whitelabel-styleCustom stylesheet
POST/api/update-api-clientBrand text, contacts, links, theme flags
GET/api/public-brandingResolve branding by client_id or branding_token (public)
GET/api/public-branding/logoServe logo / dark / favicon / banner bytes (public)

Asset upload semantics

POST handlers are multipart/form-data with a file field and an overwrite_existing boolean (default false). Error semantics are consistent across the asset endpoints:

StatusMeaning
400Empty file, wrong type, or oversized payload
404Delete of an asset that doesn’t exist
409Asset exists and overwrite_existing=true was not supplied — body carries requires_overwrite: true
422Stylesheet upload not valid UTF-8

Example — email banner CRUD

# Read banner metadata
curl -sS "$BASE_URL/api/api-client/whitelabel-banner" \
  -H "Authorization: Bearer $ADMIN_TOKEN"

# Upload (first time)
curl -sS "$BASE_URL/api/api-client/whitelabel-banner" \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -F "file=@partner-banner.png"

# Replace an existing banner
curl -sS "$BASE_URL/api/api-client/whitelabel-banner" \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -F "overwrite_existing=true" \
  -F "file=@partner-banner.png"

# Delete
curl -sS -X DELETE "$BASE_URL/api/api-client/whitelabel-banner" \
  -H "Authorization: Bearer $ADMIN_TOKEN"

Serving an asset publicly

The unauthenticated serve endpoint returns image bytes; the mode query parameter selects which asset. mode=banner is what a branded email embeds as its banner image source.

curl -sS "$BASE_URL/api/public-branding/logo?branding_token=<token>&mode=banner" \
  --output banner.bin

Other modes fall back favicon → dark → primary logo.

Field-level shapes are always live: FastAPI serves interactive docs at /docs, /redoc, and /openapi.json. Treat the live schema as the reference.

06 Related guides