> ## Documentation Index
> Fetch the complete documentation index at: https://996f455-productmetrics.manicule.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://996f455-productmetrics.manicule.dev/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://996f455-productmetrics.manicule.dev/docs/api/mcp.
> Every agent surface: https://996f455-productmetrics.manicule.dev/docs/.well-known/llms-manifest.json

# Complete onboarding (/docs/api/account/onboarding-complete)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 671 · updated: 2026-11-16 -->
Related: [Create a checkout link](/docs/api/account/billing-create-checkout-link.md), [Create workspace](/docs/api/account/companies-create.md), [Send feedback](/docs/api/account/feedback-send.md), [Get the Google connect link](/docs/api/account/google-get-connect-link.md), [Invite teammates](/docs/api/account/invitations-send.md), [Get onboarding state](/docs/api/account/onboarding-get-state.md)

> 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 https://prod-backend.productmetrics.io/api/public/v1/onboarding/complete`

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

## Try it

`productmetrics` runs after `productmetrics login`; curl needs `PM_TOKEN` (see [Authentication](/docs/api/overview#authentication)).



**productmetrics CLI:**

```bash
productmetrics onboarding complete --json
```

**curl:**

```bash
curl -X POST "https://prod-backend.productmetrics.io/api/public/v1/onboarding/complete" \
  -H "Authorization: Bearer $PM_TOKEN"
```

## Response

API response (200):

```json
{
  "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`](/docs/api/account/onboarding-set-account-type), before creating a workspace: [`companies.create`](/docs/api/account/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`.

```json
{
  "error": {
    "code": "insufficient_scope",
    "message": "This operation needs the setup scope; connect again and allow it.",
    "details": {
      "required_scope": "setup"
    }
  },
  "request_id": "req_01JFZ465YR10RE30Q3937DHAQC"
}
```

| 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 `setup` 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.                           |

[All Account and onboarding operations](/docs/api/account)
