Get onboarding state
Where the signed-in person is in Product Metrics onboarding: the current step, the steps already done, the account type and Google Ads connection mode, and demo status.
GET /onboarding
Scope read · Access Read only · Operation id onboarding.get_state
Try it
productmetrics runs after productmetrics login; curl needs PM_TOKEN (see Authentication).
productmetrics onboarding get-state --jsonResponse
API response (200), shortened:
{
"data": {
"id": 1,
"user_id": "3e9b5c71-2f4a-4d8e-b6c0-1a2b3c4d5e6f",
"current_step": "welcome",
"completed_steps": [
"welcome"
],
"skipped": true,
"completed_at": 1
// … 4 more fields
},
"request_id": "req_01JGD0RPYTZD1YXTH69VCY3ZAF"
}CLI output: productmetrics onboarding get-state --json prints { "ok": true, "data": …, "request_id": "…" } with the same data.
Before you call
Call this first to decide which setup step comes next. For a person who was invited to a workspace they can already open, reading the state marks onboarding complete, as opening the app does.
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 read scope; connect again and allow it.",
"details": {
"required_scope": "read"
}
},
"request_id": "req_01JEPDWBHG0ASBQHSZ5S0B4RA3"
}| Status | Code | When |
|---|---|---|
| 401 | invalid_token | The token is missing, expired or revoked: sign in again (productmetrics login). The WWW-Authenticate header says why. |
| 403 | insufficient_scope | The token lacks the read scope (details.required_scope): sign in again and allow it. |
| 429 | rate_limited | More than 600 requests a minute for this person: wait the Retry-After seconds (60) and retry. |