Setting the domain and completing onboarding require the admin scope (
security(("bearer_pat" = ["admin"]))); a non-admin caller gets a 403. Reading status and checking a domain only require an authenticated caller.The flow
Check onboarding status
Start by reading where the workspace stands. The response tells you what’s left to do and which wizard track applies.Fields:
completed(bool) — whether onboarding has finished.domain_confirmed(bool) — whether the business domain has been confirmed.business_domain(string ornull) — the configured business domain, if any.track(string) — the wizard track the SPA should render:slack,teams, orweb. It is derived from the workspace’s primary corpus source (aslacksource wins, thenteams, otherwiseweb).
Live-validate a domain
Before submitting, pre-check the value the user typed so a typo is caught early. Pass the candidate as the The response reports:
domain query parameter:valid_format(bool) — whether the input normalizes to a usable bare host.normalized(string) — the normalized host (scheme,www., path/query stripped, lowercased). Present only when the format is valid.resolves(bool) — whether that host resolves to at least one usable public address.
{ "valid_format": false, "resolves": false } (no normalized field).See Check a domain.Set and confirm the domain
Once the candidate looks good, submit it. The request body is a single The server re-normalizes and re-validates the value, then confirms it (this sets
domain field:domain_confirmed in the status) and kicks off a profile crawl of that website. The API is the boundary, so it does not trust the live pre-check:- An invalid or unresolvable domain is rejected with
400. - A non-admin caller is rejected with
403.
Complete onboarding
Finally, mark the workspace complete. This lifts the onboarding gate that can otherwise block normal API access for a new workspace.The call is idempotent — it only stamps the completion time if onboarding wasn’t already complete, so calling it twice is safe. A non-admin caller is rejected with
403.See Complete onboarding.Putting it together
Re-read status after completing to confirm the gate is lifted:completed: true is the signal that the workspace is fully onboarded; domain_confirmed: true with a non-null business_domain reflects a successful domain step.