Retrieve a company profile
Use any supported SDK for the underlying lookup. The PHP tab uses the SDK’s low-level Brand method; the backend and UI example below uses TypeScript and React.What to prefill
Every field is optional. A successful response can still contain a partial profile.
Look up the company
The browser calls your backend. Your backend validates the email and calls Context.dev withCONTEXT_DEV_API_KEY.
Here is a Next.js route using the HTTPS API directly so the fallback behavior is explicit:
app/api/company-profile/route.ts
Fill blank fields
Start the lookup when the user submits the email step. Fill only blank fields so a slow response cannot replace edits made while the request was running.- Label the step “Confirm your company details.”
- Make text fields editable and the logo replaceable.
- Let the user continue when no profile is found.
- Do not treat a physical address as a legal or headquarters address without separate verification.
- Record which values the user confirmed if downstream logic depends on them.
Seed an editable workspace theme
After the user confirms the company, usebrand.branding from the route above as suggestions for that tenant. Listener uses brand context for customer-specific experiences; the same pattern can personalize a workspace header or customer portal.
Keep automatic candidates separate from saved user choices. A logo may belong to a parent brand or the platform hosting the website, so provide a replacement or Use no logo option.
workspace-theme.ts
Workspace header
ThemeChoices against your tenant ID, independently from the automatic Brand snapshot. Refresh only the suggestions; reapply saved choices afterward. Do not apply a late lookup for an earlier email address to the current form or tenant: associate each response with the email and request that initiated it.
Keep signup resilient
If you know the email before the profile is needed, subscribers can queue a prefetch. Prefetch is an optimization, not a completion signal; the later Brand response remains the source of truth.
Run email validation and abuse controls before the upstream call. Track matched, unmatched, partial, and failed lookups without logging full email addresses unnecessarily.
Retrieve a brand by email
Map work email addresses to company profiles.
Prefetching
Queue a lookup before the profile is needed.
Generate a branded website
Turn confirmed branding into a complete editable page theme.
Troubleshooting
Understand invalid email responses.