Skip to content
Account and onboarding

Complete onboarding

Finishes the signed-in person's onboarding: saves their account type (onboarding.set_account_type) and Google sign-in to their account and marks onboarding done, after which the app opens normally.

POST /onboarding/complete

Scope setup · Access Changes data · Operation id onboarding.complete

Try it

productmetrics runs after productmetrics login; curl needs PM_TOKEN (see Authentication).

productmetrics onboarding complete --json

Response

API response (200):

{
  "data": {
    "success": true
  },
  "request_id": "req_01JX01AGM02C4Q5VGA1V971PF1"
}

CLI output: productmetrics onboarding complete --json prints { "ok": true, "data": …, "request_id": "…" } with the same data.

Before you call

Call it right after onboarding.set_account_type, before creating a workspace: companies.create refuses an account whose type is not saved yet. The other setup steps (Google Ads, store, tracking) come after it. It cannot be undone.

Errors

A failure answers with its HTTP status and { error: { code, message, details? }, request_id }. Branch on code (stable, lower_snake); show message to the person. The CLI prints the same error with "ok": false.

{
  "error": {
    "code": "insufficient_scope",
    "message": "This operation needs the setup scope; connect again and allow it.",
    "details": {
      "required_scope": "setup"
    }
  },
  "request_id": "req_01JFZ465YR10RE30Q3937DHAQC"
}
StatusCodeWhen
401invalid_tokenThe token is missing, expired or revoked: sign in again (productmetrics login). The WWW-Authenticate header says why.
403insufficient_scopeThe token lacks the setup scope (details.required_scope): sign in again and allow it.
429rate_limitedMore than 600 requests a minute for this person: wait the Retry-After seconds (60) and retry.

All Account and onboarding operations